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 and install an OLD version of a homebrew formula | |
# and PIN it to prevent upgrading. | |
# Choose formula | |
formula=kubernetes-cli | |
# View homebrew-core git log to find a commit | |
git clone [email protected]:Homebrew/homebrew-core.git | |
cd homebrew-core | |
git log master -- "Formula/$formula.rb" |
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 bash | |
# Adapted from: | |
# https://twitter.com/kapeli/status/649852908025040896 | |
bundle list \ | |
| awk -F'[ ()]+' '$2 == "*" {system("sleep 3"); print "dash-install://repo_name=Ruby%20Docsets&entry_name=" $3 "&version=" $4;}' \ | |
| xargs open |
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
# example usage: docker-compose dahn --remove-orphans | |
docker-compose_dahn() { | |
command docker-compose down "$@" | |
} | |
docker-compose() { | |
local cmd=$1; shift | |
if command -v "docker-compose_$cmd" >/dev/null 2>/dev/null; then | |
"docker-compose_$cmd" "$@" | |
else | |
command docker-compose "$cmd" "$@" |
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
" Indent Guides highlighting | |
" https://github.com/nathanaelkane/vim-indent-guides/issues/38 | |
" https://github.com/nathanaelkane/vim-indent-guides/issues/109 | |
" Taken from 1) :set background=light 2) :hi IndentGuidesEven | |
hi IndentGuidesEven guifg=#E3DDCC guibg=#CCC6B7 | |
" Taken from 1) :set background=light 2) :hi IndentGuidesOdd | |
hi IndentGuidesOdd guifg=#CCC6B7 guibg=#E3DDCC |
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
test { | |
// Log failures in an error format that vim and other tooling can use | |
// Something like: | |
// FILENAME:LINE_NUMBER failed: MESSAGE | |
// For example: | |
// src/test/java/TestFoo.java:42 failed: junit.framework.ComparisonFailure: null expected:<[b]ar> but was:<[B]ar> | |
afterTest { desc, result -> | |
if (result.resultType == TestResult.ResultType.FAILURE) { | |
result.getException().each { e -> | |
e.getStackTrace().each { el -> |
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
set theProcessName to "Safari" | |
set theWindowNumber to 1 | |
tell application "System Events" | |
tell process theProcessName | |
activate | |
tell window theWindowNumber | |
set thePosition to position | |
set theSize to size | |
end tell |
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
on alfred_script(q) | |
tell application "iTerm2" | |
activate | |
tell current window | |
create tab with default profile | |
select | |
tell current session | |
write text q | |
end tell | |
end tell |
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
# convert *.xlsx to *.xlsx.csv using https://github.com/dilshod/xlsx2csv | |
pip install xlsx2csv | |
# (shell-fu from http://stackoverflow.com/a/12965604) | |
find . -iname "*.xlsx" -exec sh -c 'xlsx2csv "$1" > "$1.csv"' x {} \; | |
# grep .csv files | |
brew install ripgrep | |
rg -i -g "*.csv" "waldo" | |
# ...or plain ole grep |
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
all: | |
rebuild: | |
make distclean && make clean && make CMAKE_BUILD_TYPE=Release | |
sudo make install | |
pip2 install --user --upgrade neovim | |
pip3 install --user --upgrade neovim | |
gem update neovim |
NewerOlder