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
source "http://rubygems.org" | |
gem 'rack-contrib', :git => 'git://github.com/rack/rack-contrib.git' | |
gem 'rack-rewrite' |
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
require 'open-uri' | |
run "rm public/index.html" | |
run "rm .gitignore" | |
rake "db:migrate" | |
file ".gitignore", <<-CODE | |
#{URI.parse("https://raw.github.com/github/gitignore/master/Rails.gitignore").read} | |
*.sublime-workspace | |
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
{% if item.root? %} | |
{{ 'blog' | item_from_path | assign_to: 'blog' }} | |
{% for post in blog.recent_posts.1 %} | |
<!-- Injected code from the latest blog post --> | |
{{ post.data.injected_code }} | |
{% endfor %} | |
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
MB.ModalHeaderView = Ember.View.extend({ | |
classNames: ["modal-header"] | |
contentBinding: "parentView.content" | |
titleBinding: "parentView.title" | |
defaultTemplate: Ember.Handlebars.compile(""" | |
<a href="#" {{action close target="view.parentView"}} class="close">x</a> | |
<h3>{{view.title}}</h3> | |
""") | |
}) |
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
$start-color:#2B73A2; | |
$number: 12; | |
@for $i from 1 through $number { | |
.label-#{$i} { | |
color:adjust_hue($start-color, ($i - 1) * (360 / $number)); | |
} | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src='http://api.tiles.mapbox.com/mapbox.js/v0.6.6/mapbox.js'></script> | |
<link href='http://api.tiles.mapbox.com/mapbox.js/v0.6.6/mapbox.css' rel='stylesheet' /> | |
<style> | |
body { margin:0; padding:0; } | |
#map { position:absolute; top:0; bottom:0; width:100%; } | |
</style> | |
</head> |
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
Number.prototype.mod = function(n) { | |
return ((this%n)+n)%n; | |
} | |
// support for adding/subtracting business days for Javascript dates | |
Date.prototype.addBusinessDays = function(days) { | |
days = parseInt(days); | |
var wks = Math.floor(days/5); | |
var dys = days.mod(5); | |
var dy = this.getDay(); |
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
var cloneWithProps = React.addons.cloneWithProps; | |
var SmartSortable = React.createClass({ | |
getDefaultProps: function() { | |
return {component: "ul", childComponent: "li"}; | |
}, | |
render: function() { | |
var props = jQuery.extend({}, this.props); |
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
<html> | |
<head> | |
<title>Test</title> | |
<script src="http://code.jquery.com/jquery-1.9.1.js"></script> | |
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script> | |
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" /> | |
<script src="http://fb.me/react-0.5.1.js"></script> | |
<script src="http://fb.me/JSXTransformer-0.5.1.js"></script> | |
</head> |
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 BooleanValue | |
# https://github.com/rails/rails/blob/master/activemodel/lib/active_model/type/boolean.rb | |
FALSE_VALUES = [ | |
false, 0, | |
"0", :"0", | |
"f", :f, | |
"F", :F, | |
"false", :false, | |
"FALSE", :FALSE, | |
"off", :off, |
OlderNewer