This file contains 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
function! s:read_gemini(url) | |
call s:init_go_url() | |
function! s:init_go_url() | |
endfunction | |
let l:svpos = winsaveview() | |
setlocal bl ro noswapfile | |
if &ft == '' | |
setlocal ft=gmi | |
else | |
let &ft=&ft |
This file contains 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
" Vim syntax file | |
if !exists("main_syntax") | |
if version < 600 | |
syntax clear | |
elseif exists("b:current_syntax") | |
finish | |
endif | |
let main_syntax = 'lambda' | |
endif |
This file contains 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
" Command mode aliases | |
function! SetupCommandAlias(from, to) | |
exec 'cnoreabbrev <expr> ' . a:from | |
\ . ' ((getcmdtype() is# ":" && getcmdline() is# "' . a:from . '")' | |
\ . '? ("' . a:to . '") : ("' . a:from . '"))' | |
endfunction | |
command! -nargs=* Calias call SetupCommandAlias([<f-args>][0], join([<f-args>][1:])) | |
Calias calias Calias | |
Calias nvim visual | |
Calias W! w! |
This file contains 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
sed 's/.\{80\}/\0\n/g' |
This file contains 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
#! /bin/sh | |
for i in $( (echo 'ibase=16;obase=2;'; hexdump -v -e '/1 "%02X\n"' $@) | bc); do \ | |
printf '%08i\n' $i | rev | |
done |
This file contains 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
#! /bin/sh | |
xev -root | grep '(_NET_ACTIVE_WINDOW)' -B 1 --line-buffered | \ | |
grep '^ClientMessage' --line-buffered | sed -u -e 's/^.*window //; s/,//' | \ | |
while read w; do \ | |
if [ -n "$(bspc query -N -n $w.hidden)" ]; then \ | |
bspc node "$w" -g hidden=off | |
bspc node $w.fullscreen -t tiled | |
bspc node $w -l normal | |
bspc node -a $w | |
fi |
This file contains 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 python3 | |
input() #header | |
input() #version | |
cnt = int(input()) #number of colors | |
print("GIMP Palette") | |
print("Columns: {0}".format(cnt)) | |
print("#") | |
for i in range(cnt): | |
print("{0} {1} {2}\tUntitled".format(*(input().split())) + str(i + 1)) |
This file contains 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
#! /bin/sh | |
# static icon, easier to set as a bash alias or directly use as a single command instead of creating a script file. | |
amixer -D pulse set Capture toggle | gawk 'match($0, /(Front Left|Mono).*\[(.*)\]/, a) {print a[2]}' | xargs notify-send --hint=int:transient:1 -i "audio-input-microphone" "Mic switched: $1" |
This file contains 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
M107 | |
M104 S200 | |
G28 | |
G1 Z5 F250.0 | |
M109 S200 | |
G21 |
This file contains 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
javascript:void%28%28document.getElementById%28%22side_bar%22%29.style.display%3Ddocument.getElementById%28%22side_bar%22%29.style.display%3D%3D%22none%22%3F%22block%22%3A%22none%22%29%5E%28document.getElementById%28%22page_body%22%29.style.float%3Ddocument.getElementById%28%22side_bar%22%29.style.display%3D%3D%22none%22%3F%22none%22%3A%22right%22%29%29 |