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 | |
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 | |
use() { | |
for i do | |
if ! command -v $i > /dev/null | |
then | |
echo command $i not found | |
exit 1 | |
fi | |
done |
filter { | |
if [type] == "magento" { | |
multiline{ | |
pattern => "^%{TIMESTAMP_ISO8601:timestamp}" | |
what => "previous" | |
negate=> true | |
} | |
grok { | |
match => [ | |
"message", |
/var/lib/docker/containers/*/*-json.log { | |
dateext | |
daily | |
rotate 365 | |
compress | |
delaycompress | |
missingok | |
} |
#!/usr/bin/env bash | |
_usage () { | |
echo Cherry pick merge commits >&2 | |
exit 1 | |
} | |
_error () { | |
echo "$@" >&2 | |
exit 1 |
#!/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 |
success |
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: hostname | |
# Required-Start: | |
# Required-Stop: | |
# Should-Start: glibc | |
# Default-Start: S | |
# Default-Stop: | |
# Short-Description: Set hostname based on /etc/hostname | |
# Description: Read the machines hostname from /etc/hostname, and |
#!/usr/bin/env bash | |
# Set the following SSH configurations to no: | |
# ChallengeResponseAuthentication | |
# PasswordAuthentication | |
# UsePAM | |
test -f /etc/ssh/sshd_config || exit 1 | |
sed -i -r -e \ |