Bookmarklet to highlight a tab after 30 minutes. Blinks the title when the timer has run out.
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
## Leak file descriptors | |
$ python <<EOF | |
import time | |
a=[] | |
while True: | |
a.append(open("/tmp/z" + str(len(a)), "w")) | |
time.sleep(0.5) | |
EOF | |
## Find leakers |
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
<h1>foo</h1> |
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 | |
# https://gist.github.com/philz/dfca51807d9431b662aa | |
export PAGER= | |
if [[ $# -ne 1 ]]; then | |
echo "$0 finds all branches and tags a commit is in, based on" | |
echo "'git log --grep' and 'git branch --contains'" | |
echo "Usage: $0 <grep_term>" | |
exit 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
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:d2f389e058e5bdca375e594db6578970fa9ed3b67ca98e85e2b9865dd974ef37" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |
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
# See https://gist.github.com/westurner/3196564 | |
brew install readline | |
brew install zeromq | |
virtualenv ~/py | |
~/py/bin/pip install ipython pyzmq tornado pygments numpy python-dateutil pytz scipy matplotlib statsmodels pandas | |
~/py/bin/easy_install pyzmq | |
~/py/bin/easy_install tornado | |
# Remove the version check | |
vi py/lib/python2.7/site-packages/IPython/utils/zmqrelated.py | |
~/py/bin/ipython notebook |
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
-- AppleScript to log into Cisco AnyConnect VPN | |
-- | |
-- Based on https://gist.github.com/andrewh/7135352 | |
-- | |
-- 1. Edit the "vpn" variable below. | |
-- 2. Add your VPN password into your keychain. Use | |
-- "security add-generic-password -a VPN_HOST -s VPN_HOST | |
-- from the command line, and then edit the password using | |
-- the Keychain Access application. | |
-- 3. From AppleScript Editor, use File...Export to export |
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
ls -1 /var/run/cloudera-scm-agent/process/ | \ | |
while read line; do | |
id=$(echo $line | cut -d "-" -f1) | |
process=$(echo $line | sed -e "s/^[0-9]*-//") | |
echo "$process $id" | |
done | sort -k1,1r -k2,2nr | \ | |
while read key value; do | |
if [ "$cur_key" = "$key" ]; then | |
echo -n ",$value" | |
else |
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
[0]theia:cdh5:hdfs(9781)$pwd | |
/Users/philip/src/smokes/hadoop/src/main/groovy/com/cloudera/itest/hadoop/hdfs | |
[0]theia:cdh5:hdfs(9782)$git log --oneline -n 1 HEAD | |
a7ff5ea CDH-16198: itests should accomodate name changes of CDK to Kite(Fixing the skipped morphline) | |
[0]theia:cdh5:hdfs(9783)$git grep -A1 '@Test' | grep public | sed -e 's!.*/!!' | sed -e 's/().*$//' | sed -e 's/ public void//' | sed -e 's/- /:/' | |
TestDFSAdmin.java:testBasic | |
TestDFSAdmin.java:testSafemode | |
TestDFSAdmin.java:testNamespace | |
TestDFSAdmin.java:testRefreshCommands | |
TestDFSAdmin.java:testUpgrades |
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
$paste <(xpath -q -e '//testcase/@name' $(find . -name 'TEST-*.xml') ) <(xpath -q -e '//testcase/@classname' $(find . -name 'TEST-*.xml') ) <(xpath -q -e '//testcase/@time' $(find . -name 'TEST-*.xml') ) | tr '=' ' ' | tr -d '"' | awk '{ print $6, $4, $2 }' | sort -n > testtimes |