Skip to content

Instantly share code, notes, and snippets.

View coderabbi's full-sized avatar

Yitz Willroth coderabbi

View GitHub Profile
#!/bin/bash
set -e
GVERSION="1.7"
GFILE="go$GVERSION.linux-amd64.tar.gz"
GOPATH="$HOME/go"
GOROOT="/usr/local/go"
if [ -d $GOROOT ]; then
echo "Installation directories already exist $GOROOT"
@coderabbi
coderabbi / podcasts-2017-08.opml.xml
Created August 6, 2017 11:06
Podcast Lineup August 2017
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
<opml version="1.0">
<head>
<title>Pocket Casts Feeds</title>
</head>
<body>
<outline text="feeds">
<outline type="rss" text="Inquiring Minds" xmlUrl="HTTP://feeds.feedburner.com/inquiring-minds" />
<outline type="rss" text="The Moth Podcast" xmlUrl="http://feeds.feedburner.com/themothpodcast" />
<outline type="rss" text="Useful Science" xmlUrl="https://rss.simplecast.com/podcasts/1419/rss" />
@coderabbi
coderabbi / git-fix.md
Last active January 28, 2021 10:54
Git Alias: fix

Ever wish you could add something to a prior commit, but you've committed a few times since?

Simple, right? git commit --fixup <hash-to-fix> followed by git rebase -i <last-good-hash>

I don't know about you, but that's one more hash than I want to deal with and since the --autostash option sets up the rebase properly for me, I really don't want to have to deal with my editor, either....

Consider the "git fix" alias.

Definition:

@coderabbi
coderabbi / coderabbi.opml
Created November 14, 2017 10:26
Pocket Casts Export - 20171114
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
<opml version="1.0">
<head>
<title>Pocket Casts Feeds</title>
</head>
<body>
<outline text="feeds">
<outline type="rss" text="15 Minute History" xmlUrl="http://feeds.feedburner.com/15MinuteHistory" />
<outline type="rss" text="Live In The Feast" xmlUrl="http://www.omnycontent.com/d/playlist/2c70f92a-ac02-41d3-afa8-a735012469d5/3cefbd23-a552-4a23-8e08-a73501248aca/e08192a3-cdd5-44bb-8c3c-a73501265f58/podcast.rss" />
<outline type="rss" text="Freakonomics Radio" xmlUrl="http://feeds.feedburner.com/freakonomicsradio" />
@coderabbi
coderabbi / post-checkout
Created December 18, 2017 11:26
'composer install' git post-checkout hook
# .git/hooks/post-checkout
changed_files="$(git diff-tree -r --name-only --no-commit-id $1 $2)"
composer_install_on_changed_lockfile() {
echo "$changed_files" | grep --quiet "composer.lock" &&
echo "Changes to 'composer.lock' detected; running 'composer install'." &&
composer install
}
@coderabbi
coderabbi / post-merge
Created December 18, 2017 11:27
'composer install' git post-merge hook
# .git/hooks/post-merge
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
composer_install_on_changed_lockfile() {
echo "$changed_files" | grep --quiet "composer.lock" &&
echo "Changes to 'composer.lock' detected; running 'composer install'." &&
composer install
}