This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name ChatGPT: Export Current Conversation as JSON | |
| // @namespace https://chatgpt.com/ | |
| // @version 0.1.0 | |
| // @description Export the currently open ChatGPT conversation as a JSON file. | |
| // @match https://chatgpt.com/c/* | |
| // @match https://chatgpt.com/g/*/c/* | |
| // @grant GM_registerMenuCommand | |
| // @run-at document-idle | |
| // ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env -S awk -f walkarray.awk -f getopt.awk --exec | |
| # ghc-pkg.awk: Inspect GHC package information files. | |
| # | |
| # This script parses GHC package description files (InstalledPackageInfo files) | |
| # and extracts information about packages. It supports specifying package | |
| # databases to search, listing specific fields, and recursively processing | |
| # dependencies. | |
| # | |
| # Usage: ghc-pkg.awk [options] <unit-id>... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {-# LANGUAGE TemplateHaskell #-} | |
| module NgxDistributionTest where | |
| import NgxExport | |
| import Data.ByteString (ByteString) | |
| import qualified Data.ByteString.Lazy.Char8 as C8L | |
| import Data.Aeson | |
| import Data.Maybe |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| inputs.nixpkgs.url = "github:NixOs/nixpkgs/22.11"; | |
| outputs = { self, nixpkgs }: | |
| let | |
| pkgs = import nixpkgs { system = "x86_64-linux"; }; | |
| inherit (pkgs) lib; | |
| lines = txt: | |
| (builtins.filter (line: line != "") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| matchMaybe :: forall a. TomlBiMap a AnyValue -> Key -> TomlCodec (Maybe a) | |
| matchMaybe Toml.BiMap {forward, backward} key = Toml.Codec input output | |
| where | |
| input :: Toml.TomlEnv (Maybe a) | |
| input toml = case HashMap.lookup key (Toml.tomlPairs toml) of | |
| Nothing -> pure Nothing | |
| Just anyVal -> pure <$> Toml.whenLeftBiMapError key (backward anyVal) pure | |
| output :: Maybe a -> Toml.TomlState (Maybe a) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #/usr/bin/bash | |
| set -e | |
| USAGE="Usage: $0 repository installables..." | |
| if [ "$#" == "0" ]; then # If zero arguments were supplied, | |
| echo "Error: no repository or installables provided." | |
| echo "$USAGE" # display a help message | |
| exit 1 # and return an error. | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| inputs.nix.url = "github:NixOS/nix/2.13.2"; | |
| outputs = { self, nixpkgs, nix }: { | |
| packages.x86_64-linux.default = | |
| nix.packages.x86_64-linux.nix.overrideAttrs (oldAttrs: { | |
| separateDebugInfo = false; | |
| phases = [ "unpackPhase" "patchPhase" "autoreconfPhase" "configurePhase" "installPhase" ]; | |
| outputs = [ "out" ]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| SESSION_NAME="$USER@$HOST" # or whatever | |
| echo "Requesting federation token" | |
| TOKEN1=$(aws sts get-federation-token --name "$SESSION_NAME" --policy-arns arn=arn:aws:iam::aws:policy/AdministratorAccess --output json) | |
| URL1=$(jq -r '.Credentials | {sessionId:.AccessKeyId,sessionKey:.SecretAccessKey,sessionToken:.SessionToken} | @uri "https://signin.aws.amazon.com/federation?Action=getSigninToken&SessionType=json&Session=\(.)"' <<< "$TOKEN1") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env -S jq -f -r | |
| # | |
| # This jq scripts transforms cabal's plan.json file into a series of fact that souffle can interpret. | |
| # | |
| # Example use | |
| # | |
| # $ ~/plan-to-datalog.jq <dist-newstyle/cache/plan.json >plan.dl | |
| # | |
| # Then create a file query.dl | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # only subvert cabal | |
| PARENT_COMMAND=$(ps -o comm= $PPID) | |
| if [ "$PARENT_COMMAND" != "cabal" ]; then | |
| exec /usr/bin/git "$@" | |
| fi | |
| echo "$PWD /usr/bin/git $*" >> ~/git-log |
NewerOlder