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
cd static-sites | |
git checkout -b tmp | |
git branch -D master | |
git checkout master | |
git branch -D tmp |
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
index=_internal type=Usage source=*license_usage.log | eval MB=b/1024/1024 | eval n=strftime(_time , "%Y/%m/%d") | stats sum(MB) by pool, n |
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
ruby -e 'puts $stdin.lines.map{ |l| l.gsub("\n","\\n") }.join ""' |
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/python | |
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford ([email protected]) | |
# The author disclaims copyright to this source code. | |
import sys | |
import struct | |
import socket | |
import time | |
import select |
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
cat .ssh/id_rsa.pub | ssh vagrant.moolb.com "cat >> .ssh/authorized_keys" |
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
# read argf, find migration password if any and write it out. Grep doesn't do a great job of this beacuse we don't know the format of the file, but ruby can just read the json. | |
require 'json' | |
data = JSON.parse( ARGF.read ) | |
id = data['id'] || "Unknown ID" | |
if data['database_schema'] and | |
data['database_schema']['grants'] and | |
data['database_schema']['grants']['migration'] and |
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
for bspec in `git branch | grep -v postfix | grep -v develop | grep -v sftpupload | grep -v doc-update | grep -v splunk-proxy | grep -v splunk-storage-location | grep -v json-reformat | grep -v json-reformat | grep -v flex-pubkey-auth | grep -v prod_mgmt | grep -v netinfra | grep -v ami-baker | grep -v artifact-checksums | grep -v revert-s3-dependencies | grep -v bloom-base-box | grep -v singlestack-appless | grep -v develop | grep -v master`; | |
do | |
i="`echo $bspec | sed -e 's|^[ *]* ||'`"; | |
echo $i | |
read j; | |
if [ "$j" = "y" ]; then | |
echo -e "\033[31;1mremoving\033[31m"; | |
git branch -D "$i"; git push origin ":$i"; | |
echo -e "\033[0m" | |
fi; |
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
# not super awesome but it works | |
curl ipchicken.com | grep "[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}" |
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
rs_tag -q 'bh_mysqlproxy:port=*'| egrep '(hostname|port)=' | |
# blarg, stupid crappy RS doc. Supports wildcards in version only would be an acceptable usage message!!! |
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
# | |
# | |
echo "This Script is deprecated. Please use the script from noctools/maintenance/splunk/ instead" | |
exit -1 | |
# | |
# | |
#/opt/splunk/bin/splunk stop; | |
#mkdir /mnt/splunkvar; | |
#mv -v /opt/splunk/var/* /mnt/splunkvar; |
NewerOlder