Skip to content

Instantly share code, notes, and snippets.

Avatar

Philip Dakowitz philmtd

  • Hamburg, Germany
View GitHub Profile
@philmtd
philmtd / copy-commit-messages.sh
Created Jul 17, 2018
macOS: Copies the messages of commits to the clipboard
View copy-commit-messages.sh
#!/bin/sh
export LC_CTYPE="UTF-8"
$(git show -s --format=%B $@ | pbcopy)
@philmtd
philmtd / cherry-pick-squash.sh
Created Jul 17, 2018
Squash Cherry Pick the passed commit hashes and commit immediately using all original commit messages.
View cherry-pick-squash.sh
#!/bin/sh
export LC_CTYPE="UTF-8"
reverse() {
local result=
for word in $@; do
result="$word $result"
done
echo "$result"
}
@philmtd
philmtd / cherry-pick-reverse-sha.sh
Created Jul 17, 2018
cherry-pick -n in reverse order
View cherry-pick-reverse-sha.sh
#!/bin/sh
reverse() {
local result=
for word in $@; do
result="$word $result"
done
echo "$result"
}
SHA=$(reverse $@)
echo $SHA
@philmtd
philmtd / README.md
Created Dec 12, 2017 — forked from trieloff/README.md
A command line alternative to LampStealer
View README.md

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 / introrx.md
Created Jun 13, 2017 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
View introrx.md
@philmtd
philmtd / IEEEtran.bst
Last active Dec 15, 2018
IEEEtran bibstyle with URLdate and ISBN, ISSN + DOI support. Merged this from files I found online.
View IEEEtran.bst
%% 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
@philmtd
philmtd / commit-msg
Last active May 10, 2017
Git hook to replace a "wtc" commit message with a random whatthecommit.com message.
View commit-msg
#!/bin/bash
comm_msg="$(cat $1)"
if [ "$comm_msg" = "wtc" ]; then
curl -L whatthecommit.com/index.txt > $1
fi