Skip to content

Instantly share code, notes, and snippets.

View smerrill's full-sized avatar
🤖
Attention is all you need

Steven Merrill smerrill

🤖
Attention is all you need
View GitHub Profile
hg status | gawk '/^M/ { print $2; }' | egrep -L 'filefield_paths|ffp' | xargs hg revert --no-backup
@smerrill
smerrill / minify.sh
Created May 5, 2011 22:31
Minify js/css in this directory and all subdirectories.
gfind . -type f -name *.css -print0 | xargs -0 yuicompressor -o '.css$:.css'
gfind . -type f -name *.js -print0 | xargs -0 yuicompressor -o '.js$:.js'
ctags --langmap=php:.engine.inc.module.theme.php.install.test.profile \
--php-kinds=cdfi \
--languages=php \
--recurse \
--exclude="\.git" \
--exclude="\.svn" \
--exclude="\.hg" \
--exclude="\.bzr" \
--exclude="\CVS" \
--totals=yes \
var sys = require("sys"),
http = require("http"),
growl = require("./node-growl/lib/growl"),
child_process = require("child_process");
function createClient() {
var i = http.createClient(80, website);
// Handle a connection error.
// Thanks to http://rentzsch.tumblr.com/post/664884799/node-js-handling-refused-http-client-connections.
brew install lorem; lorem -l 108 -q 10 | say
var command = sprintf("echo '%s' | /usr/local/bin/gsed -e '%s'",
last_said[message.user].replace("'", "'\"'\"'"),
result[1].replace("'", "'\"'\"'"));
8:51:22 AM smerrill: ohai\n
8:51:25 AM smerrill: s/./&/
8:51:26 AM n00b_sedbot: What smerrill meant to say was:
8:51:26 AM n00b_sedbot: ohai
8:51:37 AM smerrill: s/$/, dudes!/
8:51:38 AM n00b_sedbot: What smerrill meant to say was:
8:51:39 AM n00b_sedbot: ohai, dudes!
8:51:39 AM n00b_sedbot: , dudes!
8:51:39 AM n00b_sedbot: , dudes!
8:51:45 AM smerrill: s/$/, dudes!/
#!/bin/bash
for i in `hg log | grep -B3 "Added tag" | grep changeset: | egrep -o " [0-9]+"`; do hg up -C $i; cat .hgtags >> /tmp/all-tags.txt; done
hg up -C default
cat /tmp/all-tags.txt | awk '{ print $2" "$1; }' | sort -n | uniq | awk '{ print $2" "$1; }' > .hgtags
@smerrill
smerrill / hg-tagging-yay.sh
Created May 18, 2011 14:30
The best part of waking up?
#!/bin/bash
for i in `hg heads . | grep changeset: | awk '{ print $2; }' | egrep -o '^[0-9]+' | sort -n`; do
hg merge $i;
hg commit -m "Merge of doom.";
done
autossh
bash-completion
cmake
coreutils
csshx
ctags
curl
discount
dos2unix
drush