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
PATH=~/Applications/gnu-coreutils-wrappers/bin:$PATH |
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 | |
# Usage: toggle-sticky-terminal.sh [above|below] | |
set -x | |
STATUS_FILE=$XDG_RUNTIME_DIR/sticky-terminal-status.json | |
setup() { | |
gnome-terminal --profile=scratchpad |
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
FROM nixos/nix | |
RUN nix-channel --update | |
RUN nix-env -i urbit | |
CMD ["sh", "-c", "urbit -t /var/lib/urbit"] |
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 hsh | |
-- a. The file name should probably be ".hs", but it's nice to have all the syntax highlitng for free using ".hs". | |
-- b. it works by having a shell running as a separate process, while the hscript process piping stuff from these quasi-quote | |
-- template haskell outputs to the shell. | |
-- c. `hsh` preprocessor reduces some boiler plate, so it is extremely terse to start your helloworld program! | |
-- d. Otherwise it all looks your regular Haskell program, feel free to add 20+ more GHC extensions. | |
banner s = "hello world, " <> s |
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
$ git grep -lE '^library' contracts/ | while read i;do grep -E 'public|external' -lE $i | xargs grep -hoE '^library\s+\w+';done | sort | uniq |
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 sh | |
readlinkWithPrint() { | |
link=$(readlink "$1") | |
p=$link | |
[ -n "${p##/*}" ] && p=$(dirname "$1")/$link | |
echo "$p" | |
[ -h "$p" ] && readlinkWithPrint "$p" | |
} |
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
$ f () { if [ $1 -gt 0 ];then less | f $(( $1 - 1 ));else less;fi; } | |
$ cat /dev/random | xxd | f 100 | |
$ ps aux| grep less | wc -l | |
102 |
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
let currentTime = parseInt(Date.now()/1000); // current unix time in seconds | |
class SuperfluidToken { | |
accounts = {}; | |
cfaAgreements = {} | |
_getAccount(owner) { | |
let acc = this.accounts[owner]; | |
if (!acc) { |
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
## ghc 9.4.x, HLS and Agda built with it | |
[ haskell.compiler.ghc94 | |
haskell.packages.ghc94.haskell-language-server | |
haskell.packages.ghc94.Agda | |
] | |
## alternative way of building HLS with ghc versions included | |
(haskell-language-server.override { | |
haskellPackages = haskell.packages.ghc92; | |
supportedGhcVersions = [ |
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
[user] | |
email = your email | |
name = your name | |
signingkey = xxxxxxxx | |
[credential] | |
helper = /run/current-system/sw/bin/git-credential-libsecret | |
# make sure you have gitFull installed on NixOS |
NewerOlder