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
#!/usr/bin/env ruby | |
# | |
# sprockets watch | |
# | |
# changed to: | |
# * use yui/compressor | |
# * load config/sprockets.yml | |
# * rake watch[lib/javascripts,public/javascripts,sprockets,config/sprockets.yml] | |
# | |
# ------------------------------------------------------ |
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
# $ heroku maintenance:on | |
# $ heroku maintenance:off | |
# side-effect for any GETs during and then after Maintenance Mode ... | |
# the maintenance page stays cached (in place of the real ones) - until: Cmd + Shift + R | |
require 'rubygems' | |
if ENV['MAINTENANCE_MODE'] | |
require 'rack' |
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
# config.ru | |
begin | |
# Try to require the preresolved locked set of gems. | |
require File.expand_path('../.bundle/environment', __FILE__) | |
rescue LoadError | |
# Fall back on doing an unlocked resolve at runtime. | |
require "rubygems" | |
require "bundler" | |
Bundler.setup |
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
guard 'coffeescript', :output => 'app/javascripts', :wrap => false, :shallow => false do | |
watch('^app/coffeescripts/(.*)\.coffee') | |
end | |
def jimify(bundles, why = nil) | |
bundles = Array(bundles) | |
message = "Jim bundle & compress (bundles: #{bundles.join(", ")})" | |
message += " due to #{why} change" if why | |
puts message | |
# just bundle them first, so that livereload happens faster |
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
~$ ARCHFLAGS='-arch i386 -arch x86_64' | |
~$ rvm install 1.8.7 --debug --reconfigure -C --enable-shared=yes | |
~$ wget http://sourceforge.net/projects/rubycocoa/files/RubyCocoa/1.0.0/RubyCocoa-1.0.0.tar.gz/download | |
~$ tar xzf RubyCocoa-1.0.0.tar.gz && rm RubyCocoa-1.0.0.tar.gz && cd RubyCocoa-1.0.0 | |
~/RubyCocoa-1.0.0$ ruby install.rb config --build-universal=yes | |
~/RubyCocoa-1.0.0$ ruby install.rb setup | |
~/RubyCocoa-1.0.0$ sudo ruby install.rb install |
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
define (require, exports, module) -> | |
_ = require("underscore") | |
_.mixin require("underscore.string") | |
_.mixin | |
# Converts the arguments list to an Array | |
aToArr: (list) -> | |
if _.isArguments(list) | |
_.toArray(list).slice(0) | |
else |
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
$(document).ready -> | |
$('#enlist').iphoneStyle | |
checkedLabel: 'For Sure' | |
uncheckedLabel: 'No Thanks' | |
resizeContainer: false | |
resizeHandle: false | |
$('input[type="text"]:first').focus() |
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
/* 5-column layout | |
* For 480 px mobiles, narrow browsers, and landscape iPhones. */ | |
@media only screen and (max-width: 767px) and (min-width: 480px) | |
body | |
@include grid(5) | |
@include mobile-safari | |
+whole | |
.torso |
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 exports.RootView extends Backbone.View | |
el: $ '#container' | |
template: '_.jade' | |
initialize: -> | |
_.bindAll @render | |
render: -> | |
$(@el).empty() | |
$(@el).append jadeify @template |
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
WHITE="\[\033[1;37m\]" | |
BLUE="\[\033[0;34m\]" | |
GREEN="\[\033[0;32m\]" | |
RED="\[\033[0;31m\]" | |
YELLOW="\[\033[0;33m\]" | |
PURPLE="\[\033[0;35m\]" | |
function parse_git_branch { | |
ref=$(git-symbolic-ref HEAD 2> /dev/null) || return | |
echo "["${ref#refs/heads/}"]" |
OlderNewer