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
│ File: .zsh/includes/cleanup.sh | |
───────┼───────────────────────────────────────────────────────────────────────────────────────────────────────── | |
1 │ cleanup () { | |
2 │ find ~/src -name 'node_modules' -type d -prune -exec rm -rf '{}' + | |
3 │ find ~/src -name '.next' -type d -prune -exec rm -rf '{}' + | |
4 │ cargo sweep -r -t 30 ~/src | |
5 │ brew cleanup | |
6 │ is_bin_in_path docker && docker system prune -a -f --volumes || echo "skipping docker" | |
7 │ } | |
8 │ # https://stackoverflow.com/questions/6569478/detect-if-executable-file-is-on-users-path |
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
package main | |
import ( | |
"net/http" | |
"time" | |
"golang.org/x/time/rate" | |
) | |
// ThrottledTransport Rate Limited HTTP Client |
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
package main | |
import "fmt" | |
// WithPrefix | |
type prefixOption struct{} | |
func WithPrefix() interface { | |
GetOption |
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
show_icons() { | |
defaults write com.apple.finder CreateDesktop true | |
killall Finder | |
} | |
hide_icons() { | |
defaults write com.apple.finder CreateDesktop false | |
killall Finder | |
} |
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
--Hammerspoon config to replace Cinch & Size-up (Microsoft Windows style) window management for free | |
--Windows Vista/7's Areo Snap on MacOS | |
--By Jayden Pearse (spartanatreyu) | |
------------------------------------------------------------------- | |
--Options, feel free to edit these: | |
------------------------------------------------------------------- | |
--Set this to true to snap windows by dragging them to the edge of your screen | |
enable_window_snapping_with_mouse = true |
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
package main | |
import ( | |
"encoding/json" | |
"errors" | |
"net/http" | |
"github.com/asaskevich/govalidator" | |
) |
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
This diff is a modified version of a diff written by Arnis Lapsa. | |
[ The original can be found here: https://gist.github.com/ArnisL/6156593 ] | |
This diff adds support to tmux for 24-bit color CSI SRG sequences. This | |
allows terminal based programs that take advantage of it (e.g., vim or | |
emacs with https://gist.github.com/choppsv1/73d51cedd3e8ec72e1c1 patch) | |
to display 16 million colors while running in tmux. | |
The primary change I made was to support ":" as a delimeter as well |
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
# Demo http://ascii.io/a/3019 | |
# build | |
gdbb () { | |
# build with debug flags | |
go build -gcflags "-N -l" -o out | |
# make sure the build didn't fail | |
if [ $? != 0 ]; then return; 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
// code for http://gowithconfidence.tumblr.com/post/31797884887/limit-buffers | |
package main | |
import ( | |
"bytes" | |
"errors" | |
"fmt" | |
"io" | |
"sync" |
NewerOlder