I hereby claim:
- I am jackjennings on github.
- I am jackjennings (https://keybase.io/jackjennings) on keybase.
- I have a public key ASAKGofsKvsWcsglbzkZe3SpRosKNIdoqD9zk3QSkBWa9Qo
To claim this, I am signing this object:
def ask_with_default message, default | |
result = ask "#{message} [#{default}]" | |
result.blank? ? default : result | |
end | |
# Lock ruby version (default to current ruby version) | |
ruby_version = ask_with_default "Ruby version:", RUBY_VERSION | |
file ".ruby-version", ruby_version | |
# Specify gemset name (default to app name) |
after_bundle do | |
# Create the database and basic tables | |
rake "db:create" | |
rake "db:migrate" | |
# Create the git repository | |
git :init | |
git add: '--all' | |
git commit: "-m 'Initial commit'" |
var el = $('.foo'); | |
var clicks = el.asEventStream('click'); | |
var active = clicks.flatMapLatest(function() { | |
return Bacon.once(true).merge(Bacon.later(1000, false)); | |
}).toProperty(false); | |
active.assign(el, 'toggleClass', 'active'); |
var Bacon = require('baconjs'); | |
var pad = require('./pad'); | |
module.exports = function(interval) { | |
interval = interval || 500; | |
var get = { | |
date: function(event) { return new Date(); }, | |
hour: function(date) { return date.getHours(); }, | |
minute: function(date) { return date.getMinutes(); }, |
class VideoBlock < ActiveRecord::Base | |
belongs_to :content_block | |
validates_presence_of :url | |
validate :is_a_vimeo_link | |
validates_length_of :title, maximum: 255 | |
before_save :set_video_id |
I hereby claim:
To claim this, I am signing this object:
BasicBlock = SirTrevor.Block.extend | |
template: _.template(""" | |
<header> | |
<div class='title'><%= title %></div> | |
</header> | |
""") | |
initialize: -> | |
@$el.addClass 'st-embed' |
SirTrevor.Blocks.Code = SirTrevor.Blocks.Text.extend | |
type: 'code' | |
title: 'HTML' | |
formattable: false | |
hasTextBlock: false | |
editorHTML: '<div class="st-required st-text-block st-code-block" contenteditable="true"></div>' | |
toData: -> |
import time, random | |
class Descartes(object): | |
tries = 10000 | |
def __init__(self, glyph): | |
self.glyph = glyph | |
def estimate(self): |
import time, random | |
g = CurrentGlyph() | |
if g is not None: | |
path = g.naked().getRepresentation("defconAppKit.NSBezierPath") | |
xMin, yMin, xMax, yMax = g.box | |
xMin = int(round(xMin)) | |
yMin = int(round(yMin)) | |
xMax= int(round(xMax)) | |
yMax = int(round(yMax)) |