Skip to content

Instantly share code, notes, and snippets.

View philmtd's full-sized avatar
🏝️

Philip Dakowitz philmtd

🏝️
View GitHub Profile
@philmtd
philmtd / commit-msg
Last active May 10, 2017 20:42
Git hook to replace a "wtc" commit message with a random whatthecommit.com message.
#!/bin/bash
comm_msg="$(cat $1)"
if [ "$comm_msg" = "wtc" ]; then
curl -L whatthecommit.com/index.txt > $1
fi
@philmtd
philmtd / introrx.md
Created June 13, 2017 08:37 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@philmtd
philmtd / README.md
Created December 12, 2017 14:34 — forked from trieloff/README.md
A command line alternative to LampStealer

The LampStealer app for Hue does not work with newer versions of the bridge, as the API has changed. This shell script works with fewer dependencies and achieves the same. Install jq and run the shell script after pushing the big button on the bridge.

@philmtd
philmtd / cherry-pick-reverse-sha.sh
Created July 17, 2018 14:39
cherry-pick -n in reverse order
#!/bin/sh
reverse() {
local result=
for word in $@; do
result="$word $result"
done
echo "$result"
}
SHA=$(reverse $@)
echo $SHA
@philmtd
philmtd / cherry-pick-squash.sh
Created July 17, 2018 14:40
Squash Cherry Pick the passed commit hashes and commit immediately using all original commit messages.
#!/bin/sh
export LC_CTYPE="UTF-8"
reverse() {
local result=
for word in $@; do
result="$word $result"
done
echo "$result"
}
@philmtd
philmtd / copy-commit-messages.sh
Created July 17, 2018 14:42
macOS: Copies the messages of commits to the clipboard
#!/bin/sh
export LC_CTYPE="UTF-8"
$(git show -s --format=%B $@ | pbcopy)
@philmtd
philmtd / IEEEtran.bst
Last active February 27, 2024 11:48
IEEEtran bibstyle with URLdate and ISBN, ISSN + DOI support. Merged this from files I found online.
%% IEEEtranUrldate.bst
%% BibTeX Bibliography Style file for IEEE Journals and Conferences (unsorted)
%% Merged GQMJr + Ian Oois versions on 2017.02.14
%%
%% Edited on 2013.05.18 by GQMJr
%% Added ISBN, ISSN, DOI support
%%
%% Edited by Ian Ooi
%% Added urldate field, with accompanying default and CTLname variables to
%% allow for last accessed date on urls