- Save files to
~/.git/hooks/
- Make them executable:
chmod +x ~/.git/hooks/pre-{commit,push}
- Configure git to use these hooks:
git config --global core.hooksPath ~/.git/hooks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name WorldTimeBuddy hacks | |
// @description | |
// @namespace http://www.worldtimebuddy.com/ | |
// @include http://www.worldtimebuddy.com/* | |
// @match http://www.worldtimebuddy.com/* | |
// ==/UserScript== | |
(window.setTimeout(function(){ | |
document.getElementsByClassName("wrapper")[0].removeChild(document.getElementById("toprek")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
IPT="/sbin/iptables" | |
# Server IP | |
SERVER_IP="$(ip addr show eth0 | grep 'inet ' | cut -f2 | awk '{ print $2}')" | |
# Your DNS servers you use: cat /etc/resolv.conf | |
DNS_SERVER="8.8.4.4 8.8.8.8" | |
# Allow connections to this package servers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
based on | |
https://github.com/jlafon/ansible-profile | |
https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/callback/timer.py | |
just throw this into a callback_plugins directory inside your playbooks directory | |
""" | |
import time | |
import datetime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
init=true | |
function do_stuff () { | |
while :; do | |
echo -n . | |
sleep .5 | |
done | |
} | |
while :; do | |
if [ "$(nc -l 9999)" = "on" ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
k=k$RANDOM | |
function r { | |
redis-cli -p 16379 $* | |
} | |
count=$1 | |
i=0 | |
while [ $i -lt $count ]; do | |
sleep .1 | |
let i+=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# A script to update all git repositories in a directory tree | |
# Run `rp status` to see the status of all repositories | |
# Run `rp update` to update all repositories that are on the main branch and have no uncommitted changes | |
my_project_dir=/path/to/my/git/repos | |
function print_status() { | |
tput bold |
OlderNewer