Mensch font, Source Code Pro, Webkit, Chrome, Firefox, Kaleidoscope, iTerm, Sublime Text, Sequel Pro, Codekit,
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 'spec_helper' | |
describe FeaturePool do | |
it "creates a new instance given valid attributes" do | |
Fabricate :feature_pool | |
end | |
it "is not valid without a name" do | |
Fabricate.build(:feature_pool, :name => "").should_not be_valid | |
end |
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
SourceFileInfo.find_or_create_by(hash: hash) do |sfi| | |
sfi.name = file_id | |
sfi.ext = ext | |
sfi.path = file_path | |
sfi.original_name = original_name | |
sfi.user = user | |
end |
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
module Taggable | |
extend ActiveSupport::Concern | |
included do | |
attr_accessible :tags | |
after_save :set_tags | |
after_destroy :unset_tags | |
end |
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
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 |
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
# interpreted AST | |
system ~/projects/jruby $ jruby.bash -X-C mandelbrot.rb 20 | |
warming up | |
running mandelbrot(500) for 20 iterations | |
4.862 | |
4.822 | |
4.822 | |
4.846 | |
5.057 |
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
module Bar | |
module ClassMethods | |
# `new` is a class method on the `Class` object | |
# It then uses `send` to access `initialize` which would otherwise be a private instance method | |
# So it can be overridden by extending the your class with a new `new` class method | |
def new(*args, &block) | |
super | |
p "new constructor defined" | |
end | |
end |
#List of countries / Список стран
ISO 3166-1
En list forked from https://gist.github.com/396531
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
import { batch, Component, createEffect, createMemo, onCleanup, onMount } from 'solid-js'; | |
import { createStore } from 'solid-js/store'; | |
const Window: Component<{ | |
title?: string, | |
width?: number, | |
height?: number, | |
initX?: number, | |
initY?: number, | |
}> = (props) => { |