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
open List | |
let num_devs = 20 | |
let failure_rate = 0.20 | |
let build_time = (15. (* mins *) /. 60.) (* hours *) | |
let commit_wait_timeslots = 4. /. build_time (* on average *) | |
let working_hours = 8. | |
let num_timeslots = working_hours /. build_time |> int_of_float | |
type build_status = Idle | Building | Pass | Retry | Fail |
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
alias tailcat='echo -ne "\033]0;Tomcat log\007"; tail -f $CATALINA_HOME/logs/catalina.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
;; select numbers, then run: | |
;; M-x calc-grab-rectangle | |
;; to load them into calc, then: | |
;; v R + | |
;; to call calc-reduce and pass it the + operator |
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
VERSION=1.2.0 | |
EMACS=/Applications/Emacs.app/Contents/MacOS/Emacs | |
PREFIX=/Applications/Emacs.app/Contents/Resources | |
SYSCONFDIR=/Applications/Emacs.app/Contents/Resources/site-lisp | |
ELS=magit.el magit-svn.el magit-topgit.el magit-stgit.el magit-key-mode.el magit-bisect.el magit-wip.el rebase-mode.el magit-blame.el | |
ELS_CONTRIB=contrib/magit-simple-keys.el contrib/magit-classic-theme.el | |
ELCS=$(ELS:.el=.elc) | |
ELCS_CONTRIB=$(ELS_CONTRIB:.el=.elc) | |
DIST_FILES=$(ELS) Makefile magit.texi magit.info README.md magit.spec.in magit-pkg.el.in | |
DIST_FILES_CONTRIB=$(ELS_CONTRIB) contrib/magit |
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
# what package provides this file? | |
rpm -qf `which gem` | |
# rubygems-1.3.7-1.el6.noarch | |
# what packages depend on this package? | |
rpm -q --whatrequires rubygems | |
# rubygem-bundler-1.0.21-0.noarch |
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
# more docs: http://ffmpeg.org/ffmpeg.html | |
FRAME_RATE=20 | |
ffmpeg -r $FRAME_RATE -pattern_type glob -i "frame_*.png" anim.mp4 |
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
;; Based on a queue polling function from Chas Emerick's bandalore: | |
;; https://github.com/cemerick/bandalore/blob/master/src/main/clojure/cemerick/bandalore.clj#L124 | |
(defn wait-for | |
"Invoke predicate every interval (default 10) seconds until it returns true, | |
or timeout (default 150) seconds have elapsed. E.g.: | |
(wait-for #(< (rand) 0.2) :interval 1 :timeout 10) | |
Returns nil if the timeout elapses before the predicate becomes true, otherwise |
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/sh | |
set -e | |
CREDENTIAL_FILE=~/.aws-creds | |
PROFILE_NAME=${1:-"default"} | |
SECTION=$(grep -A 3 "\[${PROFILE_NAME}\]" ${CREDENTIAL_FILE}) | |
CREDENTIAL_LINES=$(echo "$SECTION" | | |
grep "^\(aws_access_key_id\|aws_secret_access_key\|region\)=") |
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
;; http://www.plope.com/Members/chrism/flymake-mode | |
(when (load "flymake" t) | |
(defun flymake-pyflakes-init () | |
(let* ((temp-file (flymake-init-create-temp-buffer-copy | |
'flymake-create-temp-inplace)) | |
(local-file (file-relative-name | |
temp-file | |
(file-name-directory buffer-file-name)))) |
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
# bash function | |
defcomp () { | |
local name="$1" && shift | |
local functionName="$( echo "${name}_completion" | tr - _ )" | |
source <(cat <<EOM | |
$functionName () { | |
local cur | |
_get_comp_words_by_ref -n =: cur | |
COMPREPLY=( \$(compgen -W "\$( $@ )" -- "\$cur") ) | |
} |
OlderNewer