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
| # Modified cd that also displays the directory's contents if the listing is less than 5 lines long | |
| function cd | |
| if test -n "$argv" | |
| if test -e $argv -a ! -d (realpath $argv) | |
| set argv (dirname $argv) | |
| end | |
| end | |
| builtin cd $argv | |
| and test (ls -C -w $COLUMNS |wc -l) -le 5; and ls | |
| end |
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
| #ifdef TEST | |
| #include <stdint.h> | |
| #include <stdio.h> | |
| uint8_t LCDDR0=0, | |
| LCDDR1=0, | |
| LCDDR2=0, | |
| LCDDR3=0, |
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
| import re | |
| censor = lambda s: re.sub('[acemnopqrsuvwxyz]', '▄', re.sub('[bdfhijkltABCDEFGHIJKLMNOPQRSTUVWXYZ]', '█', s)) | |
| # censor('This is a test.') → '███▄ █▄ ▄ █▄▄█.' |
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
| # alike https://github.com/lihaoyi/macropy#string-interpolation | |
| In [23]: class Interpol: | |
| def __getitem__(self, str): | |
| import inspect | |
| return str.format(**inspect.currentframe().f_back.f_locals) | |
| ....: | |
| In [24]: s = Interpol() |
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
| bind \co sudo-execute |
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
| #!/Hello world! |
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
| #include <stdio.h> | |
| main(argc, argv) | |
| int argc; | |
| char **argv; | |
| { | |
| printf("Hello world\n"); | |
| } |
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
| set showtabline=never | |
| set go-=r | |
| set defsearch=duckduckgo | |
| com! search-selection,ss -bang -nargs=? -complete search -js commands.execute((bang ? "open " : "tabopen " ) + args + " " + buffer.currentWord) | |
| map <A-s> :set nss!=<A-Tab> | |
| map <A-C-s> :set nst!=<A-Tab> |
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
| #include <unistd.h> | |
| #include <sys/prctl.h> | |
| #include <stdlib.h> | |
| #include <signal.h> | |
| void hup_handler(int signal){ | |
| exit(0); | |
| } | |
| int main(int argc, char **argv){ |
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
| xkb_symbols "mixed" { | |
| include "pc+jp(OADG109A)+inet(evdev)+level3(ralt_switch)+level3(lalt_switch)" | |
| key <CAPS> { [ Escape , Eisu_toggle ] }; | |
| key <AE05> { [ 5 , percent , EuroSign ] }; | |
| key <AE11> { [ minus , equal , dead_macron ] }; | |
| key <AE12> { [ asciicircum , asciitilde , dead_circumflex ] }; | |
| key <AE13> { [ yen , bar , underscore ] }; | |
| key <AD01> { [ q , Q , adiaeresis , Adiaeresis ] }; |