This scripts will find all github remotes in the current repository and add a new configuration that allows you to fetch pull request heads
and merge-heads
+refs/pull/*/head
+refs/pull/*/merge
#!/usr/bin/env bash | |
## | |
# Update your configuration here | |
# You may get your `client_id` and `client_secret` from developer.paypal.com | |
# For membership level, please refer to http://hackerspace.sg/membership | |
## | |
endpoint=api.paypal.com | |
client_id=$client_id |
#!/usr/bin/env bash | |
_usage () { | |
echo Cherry pick merge commits >&2 | |
exit 1 | |
} | |
_error () { | |
echo "$@" >&2 | |
exit 1 |
/var/lib/docker/containers/*/*-json.log { | |
dateext | |
daily | |
rotate 365 | |
compress | |
delaycompress | |
missingok | |
} |
filter { | |
if [type] == "magento" { | |
multiline{ | |
pattern => "^%{TIMESTAMP_ISO8601:timestamp}" | |
what => "previous" | |
negate=> true | |
} | |
grok { | |
match => [ | |
"message", |
#!/usr/bin/env bash | |
use() { | |
for i do | |
if ! command -v $i > /dev/null | |
then | |
echo command $i not found | |
exit 1 | |
fi | |
done |
#!/usr/bin/env bash | |
git remote -v | grep fetch | grep github | \ | |
while read remote url _; do | |
if ! git config --get-all "remote.$remote.fetch" | grep -q refs/pull | |
then | |
git config --add "remote.$remote.fetch" \ | |
'+refs/pull/*/head:refs/remotes/'"$remote"'/pull/*' | |
fi | |
done |
#!/usr/bin/env bash | |
# Source git completion and git prompts | |
command -v __git_ps1 > /dev/null || | |
for i in git-completion.bash git-prompt.sh | |
do | |
echo source ~/bin/$i | |
source ~/bin/$i | |
done | |
if declare -f __git_ps1 2>&1 >/dev/null |
<?php | |
$handle = fopen($argv[1], 'r'); | |
$handle || exit('no readable file'); | |
$handles = array(); | |
while (($line = fgets($handle)) !== false) | |
{ | |
if (preg_match('/^201.-..-../', $line, $match)) |
#!/bin/bash | |
function breakup() | |
{ | |
LAST=$(wc -l "$1" | xargs | cut -d' ' -f1) | |
LAST=$(($LAST + 1)) | |
grep -no ^201.-..-.. "$1" | sort -u -t: -k2 | sort -t: -rnk1 | while read j | |
do | |
DATE=$(echo $j | cut -d: -f2) | |
LINE=$(echo $j | cut -d: -f1) |