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
# this original one uses values returned from 'brew info' | |
brew list --formula | xargs -n1 -P8 -I {} \ | |
sh -c "brew info {} | egrep '[0-9]* files, ' | sed 's/^.*[0-9]* files, \(.*\)).*$/{} \1/'" | \ | |
sort -h -r -k2 - | column -t | |
# faster alternative using 'du' | |
du -sch $(brew --cellar)/*/* | sed "s|$(brew --cellar)/\([^/]*\)/.*|\1|" | sort -k1h |
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 | |
# OpenWRT support libs | |
. /lib/functions.sh | |
. /lib/functions/network.sh | |
. /usr/share/libubox/jshn.sh | |
ip_regex="[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}" | |
ddns= | |
code= |
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/zsh | |
# If you use #'s for defer and start dates, you'll need to escape the #'s or | |
# quote the whole string. | |
function of () { | |
if [[ $# -eq 0 ]]; then | |
open -a "OmniFocus" | |
else | |
osascript <<EOT |
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
/** | |
* I converted the SCSS mixin to LESS for the awesome coders like myself in response to a blog post on 37Signals - http://37signals.com/svn/posts/3271-easy-retina-ready-images-using-scss | |
* | |
* Update: 2014-08-04 - Updated a long-standing bug where retina images were shown no matter what in the first background-image property. | |
* - Updated retina media query to be more reliable () | |
* Update: 2013-11-13 - Picked up another technique thanks to reading this post from Tyler Tate, auto-fill in the second filename for the retina image, http://tylertate.com/blog/2013/06/11/retina-images-using-media-queries-and-LESS-CSS.html | |
* Update: 2013-04-16 - Have recently found a few use cases when using a retina pattern from Subtle Patterns on the <body>, this has come in handy | |
* Update: 2013-04-05 - Some research in the Wordpress Core(http://core.trac.wordpress.org/ticket/22238#comment:5) was pointed out that some tests may be redundant (Thanks @kbav) so I've cleaned these up | |
* Update: 2012-12-29 - U |
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
# openFrameworks OS X makefile | |
# | |
# make help : shows this message | |
# make Debug: makes the application with debug symbols | |
# make Release: makes the app with optimizations | |
# make: the same as make Release | |
# make CleanDebug: cleans the Debug target | |
# make CleanRelease: cleans the Release target | |
# make clean: cleans everything | |
# |
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
Update master from a feature branch: | |
git config --global alias.some "!git checkout master && git pull --rebase && git remote prune origin && git cleanlocal" | |
git some |
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
group :production do | |
gem 'unicorn' | |
# Enable gzip compression on heroku, but don't compress images. | |
gem 'heroku-deflater' | |
# Heroku injects it if it's not in there already | |
gem 'rails_12factor' | |
end |
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
class Foo | |
include Mongoid::Document | |
field :bar | |
end | |
foo = Foo.new(:bar => "baz") | |
foo.to_json # => { _id: "(some uuid)", bar: "baz" } |
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
ayv_deploy_dir="/Users/${USER}/Sites/ayv/deploy" | |
make_soup() | |
{ | |
current_branch=`git status | head -n 1 | awk '{print $4}'` | |
echo "Pushing $current_branch to soup... (Press Ctrl-c to abort)" | |
sleep 2 | |
git checkout soup | |
git fetch upstream && git merge upstream/soup | |
git merge $current_branch && git push upstream soup || git reset --hard |
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
delete-branch() | |
{ | |
for i in `echo $*`; do | |
echo "Deleting local and remote branch $i..." | |
git push origin :$i | |
git branch -D $i | |
done | |
} |
NewerOlder