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
# GNU Screen - main configuration file | |
# All other .screenrc files will source this file to inherit settings. | |
# Author: Christian Wills - cwills.sys@gmail.com | |
# Allow bold colors - necessary for some reason | |
attrcolor b ".I" | |
# Tell screen how to set colors. AB = background, AF=foreground | |
termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm' |
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 python2.7 | |
# single producer-multiple consumer parallelism using a queue | |
from ctypes import c_bool | |
import logging | |
import multiprocessing as mp | |
import time | |
TASK_END = 'TASK_END' | |
NUM_CONSUMERS = 2 | |
NUM_TASKS = 4 |
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 | |
show_help() | |
{ | |
cat <<EOB | |
Usage: ${0##*/} [-h] [-t sep] [-n num] file | |
Display a row in CSV file with header vertially. | |
Options: | |
-t specify field separator, default is tab | |
-n specify line to show, default is 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
#!/bin/bash | |
DEFAULT_URL=http://updates.jenkins-ci.org/current/latest/jenkins.war | |
TMP_PATH=/tmp/jenkins.war | |
APP_PATH=/Applications/Jenkins/jenkins.war | |
PLIST_PATH=/Library/LaunchDaemons/org.jenkins-ci.plist | |
url=${1-$DEFAULT_URL} | |
echo 'Downloading WAR package...' |
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
Windows Registry Editor Version 5.00 | |
; Solarized Dark Color Scheme for PuTTY | |
; https://github.com/altercation/solarized/tree/master/putty-colors-solarized | |
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\Default%20Settings] | |
"Colour0"="131,148,150" | |
"Colour1"="147,161,161" | |
"Colour2"="0,43,54" | |
"Colour3"="7,54,66" |
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 python | |
import gevent | |
from gevent.threadpool import ThreadPool | |
from random import randint | |
def worker(id): | |
print('worker %d working...' % (id)) | |
time = randint(1, 5) | |
gevent.sleep(time) |
NewerOlder