Skip to content

Instantly share code, notes, and snippets.

View alerque's full-sized avatar
🩺
Coding as best I can in between dealing with my daughter's medical issues.

Caleb Maclennan alerque

🩺
Coding as best I can in between dealing with my daughter's medical issues.
View GitHub Profile
@alerque
alerque / keybase.md
Last active August 29, 2015 14:04
keybase.md

Keybase proof

I hereby claim:

  • I am alerque on github.
  • I am alerque (https://keybase.io/alerque) on keybase.
  • I have a public key whose fingerprint is 9F37 7DDB 6D31 53A4 8EB3 EB1E 63CC 4964 7526 7693

To claim this, I am signing this object:

@alerque
alerque / csstidy.sh
Last active August 29, 2015 14:03
Simple template for CSS tidy that indents with two spaces
find ./ -iname '*.css' -not -iname '*.min.css' \
-execdir csstidy {} --silent=true --template=~/scratch/csstidy.tpl --compress_colors=true --compress_font-weight=false --discard_invalid_properties=false --preserve_css=true --remove_bslash=true --sort_properties=true --sort_selectors=true --timestamp=false --merge_selectors=0 --case_properties=1 --optimise_shorthands=0 {} \; \
-execdir sed '/{$/s/\(\s*\)\([^,]\+\),/\1\2,\n\1/g' -i {} \; \
-execdir sed '/^@media/s/\(min\|max\)-width\s*\([^ ]\+\)/(\1-width:\2)/' -i {} \; \
-execdir sed "/src:/s/format(\([^')]\+\))/format(\'\1\')/g" -i {} \; \
-execdir sed 's/-\(webkit\|moz\|ms\)-\(transition\): 0 / -\1-\2: -\1-transform /g' -i {} \; \
-execdir vim +StripWhitespace +x {} \;
@alerque
alerque / highlight_closed.user.js
Created April 5, 2014 13:39
Highlight On Hold, Closed and Duplicate questions
// ==UserScript==
// @name Highlight On Hold, Closed and Duplicate questions
// @namespace http://alerque.com
// @version 0.1
// @description Gives questions that have the brakes on a serious stand out background for easy review
// @match http://*.stackexchange.com/questions*
// @match http://*.stackexchange.com/
// @copyright 2014+, Caleb Maclennan
// ==/UserScript==
@alerque
alerque / list_git_commit_sizes.zsh
Created March 24, 2014 14:23
Quick shell script to list the actual size on disk of what git has stored for each commit in a repo.
#!/bin/zsh
git rev-list --all|
while read sha; do
let total=0
git diff-tree -r -c -M -C --no-commit-id $sha |
cut -d' ' -f3 |
while read blob; do
case $blob in
0000000000000000000000000000000000000000)
@alerque
alerque / pre-commit
Last active August 29, 2015 13:57 — forked from anl/pre-commit
git pre-commit hook (make executable at .git/hooks/pre-commit) to check dns zones
#!/bin/zsh
# Fail the hook if anything isn't 100% copacetic
set -e
# If anything goes wrong, try to show what and clean up after ourselves
function show_log () {
cat $tmpfile |
grep -v 'ignoring out-of-zone data' |
grep -v 'loaded serial' |
// ==UserScript==
// @name AutoReviewComments
// @namespace benjol
// @version 1.3.1
// @description Add pro-forma comments dialog for reviewing (pre-flag)
// @grant none
// @include http*://*stackoverflow.com/questions*
// @include http*://*stackoverflow.com/review*
// @include http*://*stackoverflow.com/admin/dashboard*
// @include http*://*stackoverflow.com/tools*
// ==UserScript==
// @name AutoReviewComments
// @namespace benjol
// @version 1.3.0izzy2
// @description Add pro-forma comments dialog for reviewing (pre-flag)
// @grant none
// @include http://*stackoverflow.com/questions*
// @include http://*stackoverflow.com/review*
// @include http://*stackoverflow.com/admin/dashboard*
// @include http://*stackoverflow.com/tools*
@alerque
alerque / gist:6871154
Created October 7, 2013 16:50
On hermeneutics vs the exercise thereof.
**Warning: bombshell to follow!**
I want to see this site be about the field of hermeneutics, not a place where that field is exercised. Frankly either my initial impression
**I propose a radically narrower scope than what we have become.**
@alerque
alerque / .vimrc
Created December 19, 2011 21:50
Caleb's vimrc file.
:version 6
colorscheme ps_color
if &term == "screen"
"set t_kb=
"fixdel
endif
set enc=utf8