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
" inspired by https://stackoverflow.com/a/69141482 | |
" the existing highlight rules for tmux.vim create a bunch of highlight definitions similar to this: | |
" for i in range(0,255) | |
" hi tmuxColour$i ctermfg=$i | |
" ...but in neovim, this just resulted in plain white text. after looking at the output of :highlight | |
" in vim for a while, it seemed that other entries with guifg definitions were showing the right colour, | |
" and indeed, the fix was to instead specify RGB values for the guifg style. |
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
.markdown-source-view.mod-cm6 .HyperMD-task-line[data-task]:not([data-task=" "]) { | |
text-decoration:none; | |
color: var(--text-normal); | |
} | |
.markdown-preview-view ul > li.task-list-item.is-checked { | |
text-decoration:none; | |
color:var(--text-normal); | |
} |
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
document.querySelectorAll('a[title*=$foo]').forEach(function(item, i) { console.log([item.title, item.href ]); }) |
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/zsh | |
brew_tmux_path="$( brew info tmux | perl -naE '/[*]$/ and say($F[0])' )" | |
tmux_installed="${${brew_tmux_path//*HEAD-/}%_1}" | |
tmux_head=$(cd $HOME/git_tree/tmux && git pull &> /dev/null && git ls -1 | awk '{print $1}') | |
tmux_head_short=${tmux_head:0:7} | |
if [[ "$tmux_head_short" == "$tmux_installed" ]]; then | |
update_status="$(tput setaf 33)Already up to date.$(tput sgr0)" | |
else |
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 brew-active-path() { | |
brew info "$1" | perl -naE 'm/[*]$/ and say($F[0])' | |
} |
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
brew install --head tmux | |
brew upgrade --fetch-HEAD tmux |
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
find . -type f -print0 | xargs -0 sha256sum | pv -l -s $( find . -type f | wc -l ) | sponge | perl -naE 'my $hash = shift @F; $seen{$hash}++ or next; $ENV{UNLINK_FILES} and unlink "@F"; my $result = $! ? "failed" : ""; say qq{unlinked @F $result}' |
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
find $PWD -type d | ( while read d; do pushd $d; for mp3_filename in *.mp3(N); do lame --quiet --decode "$mp3_filename" && echo $PWD/$(basename "$PWD/$ | |
mp3_filename" .mp3).wav | tee -a converted.txt; done; popd; done ) | ts '[%F %T]' |
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 console: | |
to_fetch = []; $('.machine_names').each(function(i, item) { var u = $(item).attr('href'); if (u.match('rar$')) { to_fetch.push(window.location.origin + "/" + u) } }); console.log(JSON.stringify(to_fetch)) | |
shell: | |
jq -r '.[]' < 'kb6.json' | vipe | ( while read u; do wget --continue --no-glob "$u"; sleep 60; 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
% sudo cp -v $HOME/git_tree/zsh/Completion/Unix/Command/_tmux /opt/homebrew/Cellar/zsh/5.8_1/share/zsh/functions/_tmux |
NewerOlder