This file contains hidden or 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 'bundler/capistrano' | |
set :application, "net" | |
set :repository, "[email protected]:net.git" | |
set :scm, :git | |
set :default_environment, { | |
'PATH' => "$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH" | |
} |
This file contains hidden or 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
Original | |
------------------------------------------------------------ | |
9 + <% t = first.starts_at %> | |
10 + <% if t.today? %> | |
11 + <%= I18n.t("landing.today") %> | |
12 + <% elsif t.tomorrow? %> | |
13 + <%= I18n.t("landing.tomorrow") %> | |
14 + <% else %> | |
15 + <%= I18n.l t, :format => :short %> | |
16 + <% end %> |
This file contains hidden or 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 ENV["DATABASE_URL"] | |
db = URI.parse(ENV["DATABASE_URL"])¬ | |
db_scheme = db.scheme == 'postgres' ? 'postgresql' : db.scheme¬ | |
options = {¬ | |
:adapter => db_scheme,¬ | |
:host => db.host,¬ | |
:username => db.user,¬ |
This file contains hidden or 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
def all | |
grouped.map do |provider, sources| | |
{name: provider, priority: priority_for(provider), offers: offers(sources)} | |
end.sort_by {|i| i[:priority]}.reject {|i| self.blacklist.include?(i[:name])} | |
end | |
def blacklist | |
if client.version < 2.6 | |
@blacklist ||= [Amazon Maxdome, Google Play, Xbox, Mediamarkt, Videoload, Videobuster] | |
elsif is_landing_page |
This file contains hidden or 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
RSpec.configure do |config| | |
# ... | |
config.expect_with :rspec do |c| | |
c.syntax = :expect | |
end | |
end |
This file has been truncated, but you can view the full file.
This file contains hidden or 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 suiteHistory = [{"suiteId":1,"size":120232,"price":324845,"createdAt":1240012800000,"availableAt":null},{"suiteId":1,"size":22250,"price":525868,"createdAt":1247788800000,"availableAt":null},{"suiteId":1,"size":78625,"price":520289,"createdAt":1260230400000,"availableAt":1260230400000},{"suiteId":1,"size":224437,"price":158011,"createdAt":1242000000000,"availableAt":1242000000000},{"suiteId":1,"size":102712,"price":413818,"createdAt":1237852800000,"availableAt":null},{"suiteId":2,"size":192924,"price":306493,"createdAt":1260921600000,"availableAt":null},{"suiteId":2,"size":294399,"price":258054,"createdAt":1256256000000,"availableAt":null},{"suiteId":2,"size":208816,"price":267297,"createdAt":1236211200000,"availableAt":null},{"suiteId":2,"size":261484,"price":499823,"createdAt":1240531200000,"availableAt":null},{"suiteId":2,"size":267668,"price":472518,"createdAt":1252800000000,"availableAt":1252800000000},{"suiteId":3,"size":36096,"price":276294,"createdAt":1240012800000,"availableAt":null},{"suiteId":3 |
This file contains hidden or 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
export LANGUAGE=en_US.UTF-8 | |
export LANG=en_US.UTF-8 | |
export LC_ALL=en_US.UTF-8 | |
locale-gen en_US.UTF-8 | |
sudo dpkg-reconfigure locales |
This file contains hidden or 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 mapFunction = function() { | |
emit(this.facebook_object_id, 1); | |
}; | |
var reduceFunction = function(key, values) { | |
return Array.sum(values); | |
}; | |
var options = { | |
out: {inline: 1}, |
This file contains hidden or 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 mapFunction = function() { | |
emit(this.facebook_object_id, 1); | |
}; | |
var reduceFunction = function(key, values) { | |
return Array.sum(values); | |
}; | |
var options = { | |
query: {published_at: {$gt: new Date(2013, 1, 1)}}, |
This file contains hidden or 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> | |
<script> | |
var ws = new WebSocket("ws://localhost:8080/ws/web"); | |
function formatMessage(m) { | |
return JSON.stringify(m); | |
} | |
function roomCreate() { |