Skip to content

Instantly share code, notes, and snippets.

View danielcosta's full-sized avatar

Daniel Costa danielcosta

View GitHub Profile
2015-02-03 10:23:36 -0200
/usr/local/opt/php56/bin/phpize
Configuring for:
PHP Api Version: 20131106
Zend Module Api No: 20131226
Zend Extension Api No: 220131226
#!/bin/bash
# POMODORO
# usage: pomo | pomo short | pomo long
SLEEPTIME=1500
TITLE="POMODOR0 :)"
SUBTITLE="Take a Break :)"
if [ "$1" = "long" ]; then
@danielcosta
danielcosta / post-merge
Created September 17, 2014 17:41
post-merge hook for bob/alice (mobly)
#/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# git hook to run a command after `git pull` or `git merge` if a specified file was changed
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
echo "$changed_files" | grep --quiet "$1" && eval "$2"
@danielcosta
danielcosta / gist:b89f23547915db999b27
Created May 21, 2014 19:46
Kill all processes by PID identifier
alias pid='ps aux | pgrep -d " " ';
kill -9 $(pid chrome)
@danielcosta
danielcosta / gist:d43efdac1dd08faf08f1
Last active August 29, 2015 14:01
Replace "from" with "to" keeping backup of original files
for i in *; do cat $i | sed s/from/to/g > $i.out; mv $i $i.bkp; mv $i.out $i; done