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:(_ => { | |
const pre = document.querySelector('pre'); | |
pre.innerHTML = JSON.stringify(JSON.parse(pre.innerHTML), null, 2); | |
})() |
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:(_ => { | |
const sheet = document.createElement('style'); | |
sheet.innerHTML = 'img { image-rendering: pixelated; }'; | |
document.head.appendChild(sheet); | |
for(let i = 0; i < frames.length; ++i) { | |
frames[i].document.head.appendChild(sheet); | |
} | |
})() |
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:(_ => { | |
const sheet = document.createElement('style'); | |
sheet.innerHTML = 'a { color: blue !important; } a:visited { color: purple !important; } a img { outline-width: 1px !important; outline-style: solid !important; }'; | |
document.head.appendChild(sheet); | |
})() |
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
"\e[1;3A": "pushd ..\n" # alt-up | |
"\e[1;3C": "pushd -0\n" # alt-right | |
"\e[1;3B": "popd\n" # alt-down | |
"\e[1;3D": "pushd +1\n" # alt-left |
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
# The clipboard provides a very convenient way to exchange data between | |
# different programs and is especially convenient for working with GUIs | |
# which can't use pipelines. Add the following function to your .zshrc / | |
# .bashrc: | |
cb() { | |
# OS X: pbcopy / pbpaste | |
# Cygwin: putclip / getclip | |
# Linux: xclip (and others) | |
if [[ ! -t 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
# Open a file browser GUI in any directory. Add the following to your | |
# .bashrc: | |
case "$OSTYPE" in | |
cygwin) gui() { explorer "${1:-.}"; } ;; | |
linux-gnu) gui() { nautilus "${1:-.}"; } ;; | |
darwin*) gui() { open "${1:-.}"; } ;; | |
*) echo 'Unknown file manager.' >&2 ;; | |
esac | |
# Examples |
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
# not sure if i wrote this or not. a google search turns up similar results from: | |
# http://stackoverflow.com/a/30623864/970346 | |
# https://gist.github.com/hardikdangar/67cb7dc1ad7812966a19 | |
time expect -c " | |
set timeout -1; | |
spawn android update sdk -u -a |
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 \( -name ._\* -o -name .DS_Store \) -type f -size -100k -delete |
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
echo -e 'foo\n\bar\nbaz'|grep -E 'a|$' |
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
# Fixed! https://github.com/kennethreitz/pipenv/issues/11#issuecomment-331073367 | |
# https://docs.pipenv.org/en/latest/advanced.html#importing-from-requirements-txt | |
sed 's%#.*%%;/^\s*$/d' requirements.txt|xargs -rd\\n pipenv install |
OlderNewer