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
# coding: utf-8 | |
# | |
# Encode any codepoint outside the ASCII printable range to an HTML character | |
# reference (http://bit.ly/KNupLT). | |
def encode(string) | |
string.each_codepoint.inject("") do |buffer, cp| | |
cp = "&#x#{cp.to_s(16)};" unless cp >= 0x20 && cp <= 0x7E | |
buffer << cp | |
end | |
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
source "https://rubygems.org" | |
gem 'sprockets' | |
gem 'sprockets-sass' | |
gem 'sass' | |
gem 'compass' | |
gem 'bootstrap-sass' | |
gem 'handlebars_assets' | |
gem 'coffee-script' |
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
unless Rails.env.development? | |
require "active_record/connection_adapters/mysql2_adapter" | |
module ActiveRecord | |
module ConnectionAdapters | |
class Mysql2Adapter < AbstractAdapter | |
extend ActiveSupport::Memoizable | |
memoize :tables, :pk_and_sequence_for, :columns | |
end | |
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
redis-cli KEYS "pulse:*" | xargs redis-cli DEL |
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
[2012-01-23T08:51:15.866033 #15991] | |
[2012-01-23T11:34:00.499694 #23679] | |
[2012-01-23T11:34:00.516219 #27139] | |
[2012-01-23T11:34:00.757622 #23643] | |
[2012-01-23T11:34:00.852449 #32740] | |
[2012-01-23T11:34:01.201746 #5728] | |
[2012-01-23T11:34:01.215995 #23643] | |
[2012-01-23T11:34:01.433602 #23643] | |
[2012-01-23T11:34:01.441876 #18991] |
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
production: | |
database: ts_production | |
username: root | |
password: ***** | |
encoding: utf8 | |
reconnect: false | |
pool: 5 | |
socket: /tmp/mysql.sock | |
adapter: mysql2_balancer |
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
a { | |
display:inline-block; | |
-webkit-box-sizing:border-box; | |
-moz-box-sizing:border-box; | |
box-sizing:border-box; | |
width:100px; | |
height:100px; | |
-webkit-border-radius:50px; | |
-moz-border-radius:50px; | |
border-radius:50px; |
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 BaseRack | |
def initialize(app) | |
@app = app | |
end | |
def call(env) | |
@app.call(env) | |
end | |
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
class Streamer | |
def initialize(records, &block) | |
@block = nil | |
@records = records | |
@record_block = block | |
end | |
def write(bytes) | |
@block.call bytes | |
bytes.bytesize |
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
WCIU | |
FxDt | |
FxWi | |
SNet | |
CSN | |
FxAZ | |
FxFl | |
STOh | |
SUN | |
FxKC |