Skip to content

Instantly share code, notes, and snippets.

@eentzel
eentzel / gist:4262923
Created December 11, 2012 22:28
RPM cheatsheet
# 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
@eentzel
eentzel / Makefile
Last active October 2, 2015 23:48
Magit 1.2.0 Makefile for Emacs.app
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
@eentzel
eentzel / gist:1087394
Created July 17, 2011 09:20
sum number in Emacs' calc-mode
;; 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
@eentzel
eentzel / gist:839027
Created February 22, 2011 17:33
setting window title in an alias
alias tailcat='echo -ne "\033]0;Tomcat log\007"; tail -f $CATALINA_HOME/logs/catalina.out'
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