This file contains hidden or 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've been playing with the idea of combining the data array defined in application/collection+json | |
(http://amundsen.com/media-types/collection/format/) with hal links for templated data. | |
Seems like a good way to keep the media type lightweight while allowing the api to specify the fields | |
it would like passed to a given resource. | |
I haven't really given much thought to an xml variation, but I took a stab at it as well. |
This file contains hidden or 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
# lib/tasks/assets.rake | |
# | |
# adapted from: http://blog.noizeramp.com/2011/10/14/rails-3-asset-pipeline-on-heroku-when-using-mongoid/ | |
# | |
pt = Rake::Task['assets:environment'] | |
Rake.application.send(:eval, "@tasks.delete('assets:environment')") | |
namespace :assets do | |
task :environment do | |
module ::MongoMapper::Connection |
This file contains hidden or 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
# | |
# $ rails new [app_name] -m https://raw.github.com/gist/1454641/wizard.txt -T -O | |
# | |
# >---------------------------------------------------------------------------< | |
# | |
# _____ _ _ __ ___ _ | |
# | __ \ (_) | \ \ / (_) | | | |
# | |__) |__ _ _| |___\ \ /\ / / _ ______ _ _ __ __| | | |
# | _ // _` | | / __|\ \/ \/ / | |_ / _` | '__/ _` | | |
# | | \ \ (_| | | \__ \ \ /\ / | |/ / (_| | | | (_| | |
This file contains hidden or 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
// ==UserScript== | |
// @name Awesome | |
// @namespace http://fluidapp.com | |
// @description What does this do? | |
// @include * | |
// @author Someone | |
// ==/UserScript== | |
(function () { |
This file contains hidden or 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 Comparison | |
include DataMapper::Resource | |
property :id, Serial | |
has n, :msruns, :through => Resource | |
has n, :secondary_msruns, "Msrun", :through => SecondaryMsrunComparison, :via => :msrun | |
belongs_to :metric | |
end | |
class Msrun |
This file contains hidden or 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/bash | |
cd /tmp | |
# Set up site 1. | |
nanoc create_site foo | |
cd foo | |
git init | |
git add . | |
git commit -m "Init" |
This file contains hidden or 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 script's occupy method didn't work very well. HTTParty isn't good at PUTs. | |
# | |
# Try rest-client gem instead: | |
# | |
# | |
# $ gem install rest-client | |
# $ restclient 'http://apiwars.heroku.com' | |
# > get '/grid/123', {:params => {:api => '...', :pin => '2222'}} | |
# ---> {...} | |
# > put '/grid/123', {:api => '...', :pin => '...', :unit => 'testunit'} |
This file contains hidden or 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/bash | |
git_is_dirty(){ | |
if [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]]; then | |
echo "1" | |
else | |
echo "0" | |
fi | |
} | |
DIR=`pwd` |
This file contains hidden or 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
startshape banana; | |
rule banana{ | |
apple{ s 1.5 hue 67 b .9 sat .7} | |
} | |
rule apple { | |
SQUARE { skew 1.2 .9 } | |
tree { } | |
apple { s .989 r 10 hue 12 } |
This file contains hidden or 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
# Gemfile | |
source "http://rubygems.org" | |
gem "openid_dm_store", :git => "git://github.com/therabidbanana/openid_dm_store.git" | |
gem "orange-more", :git => "git://github.com/therabidbanana/orange-more.git" | |
gem "orange-core", :git => "git://github.com/therabidbanana/orange-core.git" | |
gem "orange-sparkles", :git => "git://github.com/orange-project/orange-sparkles.git" | |
gem "dm-postgres-adapter" |