This file contains hidden or 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
git grep --cached <SEARCH STRING> -- **/<PATH>/**.yml |
This file contains hidden or 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
import pip | |
def install(package): | |
pip.main(['install', package]) | |
# Example | |
if __name__ == '__main__': | |
install('argh') |
This file contains hidden or 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
# Description: | |
# Announce bitbucket pushes to a room. | |
# | |
# Example Bitbucket webhook: | |
# http://hubot.example.com/botbucket?room=<room|channel_id> | |
# | |
# based on "bitbucket.coffee" by JRusbatch | |
# | |
# Extended by ajpaulson | |
module.exports = (robot) -> |
This file contains hidden or 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
202.102.200.101 | |
58.242.2.2 | |
202.38.64.1 | |
211.91.88.129 | |
211.138.180.2 | |
218.104.78.2 | |
202.102.199.68 | |
202.175.3.3 | |
202.175.3.8 | |
202.112.144.30 |
This file contains hidden or 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
http://www.kfirlavi.com/blog/2012/11/14/defensive-bash-programming | |
http://bencane.com/2013/02/25/10-nmap-commands-every-sysadmin-should-know/ | |
http://railsware.com/blog/2014/08/11/git-housekeeping-tutorial-clean-up-outdated-branches-in-local-and-remote-repositories/ | |
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf | |
http://jvns.ca/blog/2016/03/16/tcpdump-is-amazing/ | |
http://2048.fi/awk.txt |
This file contains hidden or 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
select concat('KILL ',id,';') from information_schema.processlist | |
where user='root' and time > 200 into outfile '/tmp/a.txt'; | |
source /tmp/a.txt; |
This file contains hidden or 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
awk -F, 'NR==FNR{a[NR]=$0;next} {$15=a[FNR]}1' OFS=, listofcorrect.txt replacemy15thcolumn.csv > output.csv |
This file contains hidden or 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 | |
# count_em - count files in all subdirectories under current directory. | |
echo 'echo $(ls -a "$1" | wc -l) $1' >/tmp/count_em_$$ | |
chmod 700 /tmp/count_em_$$ | |
find . -mount -type d -print0 | xargs -0 -n1 /tmp/count_em_$$ | sort -n | |
rm -f /tmp/count_em_$$ |
This file contains hidden or 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
<VirtualHost *:80> | |
ServerName domain.com | |
ServerAlias www.domain.com | |
ServerAdmin [email protected] | |
DocumentRoot /var/www/domain.com/ | |
<Directory /var/www/domain.com/> | |
Options Indexes FollowSymLinks MultiViews | |
AllowOverride FileInfo | |
Order allow,deny |
This file contains hidden or 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 null ref will have a hash consisting of 40 0s | |
n=0 | |
zero=$(printf "%040d" $n) | |
# Update hooks take 3 args: refname, oldrev, and newrev | |
# --- Command line | |
refname="$1" | |
oldrev="$2" |
NewerOlder