Skip to content

Instantly share code, notes, and snippets.

View flyingoctopus's full-sized avatar

Vincent van Haaff flyingoctopus

  • flyingoctopus
  • Vancouver, BC
View GitHub Profile
@flyingoctopus
flyingoctopus / of.zsh
Created December 15, 2015 07:51 — forked from brandonpittman/of.zsh
A simple shell function to create tasks in OmniFocus
#!/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
/**
* 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
# 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
#
@flyingoctopus
flyingoctopus / Gemfile
Created December 12, 2013 01:33 — forked from pcreux/Gemfile
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
class Foo
include Mongoid::Document
field :bar
end
foo = Foo.new(:bar => "baz")
foo.to_json # => { _id: "(some uuid)", bar: "baz" }
@flyingoctopus
flyingoctopus / make_soup.sh
Created June 7, 2012 23:10 — forked from pgib/make_soup.sh
Put this soup in your .bash_profile and smoke (or slurp) it!
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
@flyingoctopus
flyingoctopus / delete-branch.sh
Created April 17, 2012 16:18 — forked from pgib/delete-branch.sh
Delete multiple local/remote git branches. (Put this in your shell's profile and smoke it!)
delete-branch()
{
for i in `echo $*`; do
echo "Deleting local and remote branch $i..."
git push origin :$i
git branch -D $i
done
}
@flyingoctopus
flyingoctopus / delete-branch.sh
Created April 17, 2012 16:18 — forked from pgib/delete-branch.sh
Delete multiple local/remote git branches. (Put this in your shell's profile and smoke it!)
delete-branch()
{
for i in `echo $*`; do
echo "Deleting local and remote branch $i..."
git push origin :$i
git branch -D $i
done
}
@flyingoctopus
flyingoctopus / dlchromium.sh
Created April 16, 2012 21:48 — forked from lg/dlchromium.sh
Download Latest Nightly Chromium For Mac
if [ $(ps aux | grep "Chromium.app" | grep -v grep | wc -l) -gt 0 ]; then
echo "Please close all Chromium instances before running this script"
exit 1
fi
if [ $(whoami) != "root" ]; then
echo "Please run this script with sudo to allow for installation into /Applications"
exit 1
fi
@flyingoctopus
flyingoctopus / README.md
Created March 22, 2012 06:54 — forked from tjogin/README.md
Configuration file to use PHP with Ruby rack

Installation

First you need php-cgi, i used brew with Formula below:

$ curl -O https://raw.github.com/gist/1194269/7ae1709453a8a19ce9c030bf41d544dd08d96d85/php.rb
$ mv php.rb `brew --prefix`/Library/Formula
$ brew install php --with-mysql

Second, install this ruby gems: