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
-Xms4g | |
-Xmx4g | |
-XX:-UseParNewGC | |
-XX:-UseConcMarkSweepGC | |
-XX:ReservedCodeCacheSize=1g | |
-XX:+UseG1GC | |
-XX:+DisableExplicitGC |
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
[ | |
["f", "Show next/latest diffs", "setProposedRevRanges()"], | |
["shift+]", "Next unreviewed file", "nextUnreviewedFile()"], | |
["shift+[", "Previous unreviewed file", "prevUnreviewedFile()"], | |
["]", "Next changed file", "nextChangedFile()"], | |
["[", "Previous changed file", "prevChangedFile()"], | |
[null, "Next visible file", "nextVisibleFile()"], | |
[null, "Previous visible file", "prevVisibleFile()"], |
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 | |
set -euo pipefail | |
IFS=$'\n\t' | |
scriptdir=$(cd -P -- "$(dirname -- "$0")" && pwd -P) | |
. $scriptdir/env.sh | |
echo ">>>>> Mac Docker found - making /var/lib/kubelet shared" | |
MOBY_TTY="${HOME}/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty" | |
if [ -c "$MOBY_TTY" ]; then |
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
# This is a shell archive. Save it in a file, remove anything before | |
# this line, and then unpack it by entering "sh file". Note, it may | |
# create directories; files and directories will be owned by you and | |
# have default permissions. | |
# | |
# This archive contains: | |
# | |
# Library/LaunchAgents/com.docker.machine.default.plist | |
# | |
echo x - Library/LaunchAgents/com.docker.machine.default.plist |
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 ruby | |
# find all branches which have been squash merged into master | |
require 'pp' | |
# all branches | |
branches = %x{git branch | sed s/^..//}.split.map(&:chomp) | |
# sort by branch age; generate pretty time stamp while we're at it | |
branch_times = branches.map{|branch| |
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
""" | |
Re-bucket input histogram in linear or exponential buckets. | |
Input: | |
value\tcount | |
Output: | |
quantized_value\tcount | |
""" |
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
from gevent import spawn | |
from gevent.queue import Queue | |
def whisper(left, right): | |
left.put(right.get() + 1) | |
def main(): | |
n = 100000 | |
leftmost = Queue() | |
left, right = None, leftmost |
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/sh | |
OUT="${1%.*}.pdf" | |
$(dirname "$0")/gprof2dot.py -f pstats "$@" | dot -Tpdf > $OUT | |
open $OUT |
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 logging | |
logging.basicConfig( | |
level=logging.INFO, | |
format='%(asctime)s %(levelname)7s: %(message)s', # [%(name)s +%(lineno)d]', | |
datefmt='%Y-%m-%dT%H:%M:%S%z', | |
) | |
logger = logging.getLogger(__name__) | |
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
sed -e '$a\' * |