Skip to content

Instantly share code, notes, and snippets.

View brock's full-sized avatar
😎

Brock Angelo brock

😎
View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.19370138645172119</real>
<key>Green Component</key>
<real>0.15575926005840302</real>
@brock
brock / gbs.sh
Created June 19, 2014 21:11
gbs - git branch sorted (by date)
gbs () {
for k in `git branch | perl -pe 's/^..(.*?)( ->.*)?$/\1/'`
do
echo -e `git show --pretty=format:"%Cgreen%ci %Cblue%cr%Creset" $k -- | head -n 1`\\t$k
done | sort -r | awk '{ print $4, $5, $6, $7}' | head -n 10
}
@brock
brock / groot.sh
Created July 17, 2014 20:37
GROOT - go to the "git root"
#!/bin/bash
# GROOT! v 1.0.0
# Install in your dotfiles, .bashrc, .zshrc or similar
# No more cd ../../../../.. to get to the root of a git project
# Running the command "groot" will look for the closest .git directory and take you there.
# Note that it doesn't traverse up the tree, it takes you directly to the directory with a .git in it...
# ...so the command `cd -` takes you back to where you were.
# Works with *some* submodules (depending on how your submodule was setup - as a file or a dir)
# If you are using submodules, you should be able to figure out how to modify this.

I'd like to be able to control both the sidebar view and the graph view from the dropdown list.

@brock
brock / panes.sh
Last active February 10, 2016 06:16
4 x 4 iTerm Grid
#!/bin/bash
# panes
# make a 4x4 grid of iTerm panes
/usr/bin/env osascript <<-EOF
tell application "iTerm"
activate
set myterm to (make new terminal)
tell myterm
launch session "Panes"
@brock
brock / nodereinstall.sh
Last active March 27, 2025 16:22
Complete Node Reinstall. I've moved this to a repo at http://git.io/node-reinstall
#!/bin/bash
# node-reinstall
# credit: http://stackoverflow.com/a/11178106/2083544
## program version
VERSION="0.0.13"
## path prefix
PREFIX="${PREFIX:-/usr/local}"
@brock
brock / aliascheck.sh
Last active March 19, 2020 04:17
Alias checker
#!/bin/zsh
# aliascheck by @brock
# Description: checks each zsh command and reminds you if you already have an alias for that command
# Instructions:
# copy aliascheck.sh to ~/bin/aliascheck
# chmod +x ~/bin/aliascheck
# uncomment or modify line 14 below to source your aliases
# add the following to your ~/.zshrc or zsh profile:
#
# preexec() { zsh $(which aliascheck) $1}
@brock
brock / ZSH-Auto-Update-Date.md
Last active June 11, 2018 21:31
Update your ZSH Date in the shell automatically

Update your ZSH date automatically

update-time-automatically

@brock
brock / gohome.xml
Created January 15, 2015 04:13
Go Home using Tasker
<TaskerData sr="" dvi="1" tv="4.6u3m">
<Profile sr="prof21" ve="2">
<cdate>1421280614090</cdate>
<edate>1421295126863</edate>
<id>21</id>
<mid0>19</mid0>
<nme>Go Home</nme>
<Event sr="con0" ve="2">
<code>3001</code>
<pri>0</pri>
<TaskerData sr="" dvi="1" tv="4.6u3m">
<Profile sr="prof45" ve="2">
<cdate>1421519030211</cdate>
<clp>true</clp>
<edate>1421529685178</edate>
<id>45</id>
<mid0>47</mid0>
<nme>Sonos Wand</nme>
<Event sr="con0" ve="2">
<cname>Wave For Sonos</cname>