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
(print "foo" ) | |
(sort [1 2 4 3]) | |
(print { 1 2 3 4 }) | |
(-> { :foo 1 } :foo) | |
(.toString (.append (StringBuilder.) "foo")) | |
(->> (StringBuilder. ) (.append "foo") (.toString) ) |
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
SiteEffectiveRates = Struct.new(:parent_id, :domain, :pricing, :data) | |
def map_sites(sites, result_set) | |
sites.map do |t| | |
result_set[t.id].map do |pricing, data| | |
SiteEffectiveRates.new(t.parent_id, t.host_from_url, pricing.to_sym, data ) | |
end | |
end.flatten | |
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
select * from ( | |
select expenses.*, revenue.sum, 100 * (revenue.count + 1)/ (expenses.count + 1) as ctr, (revenue.sum - expenses.sum) as profit from ( | |
select | |
campaign_id, | |
site_id, | |
count(id), | |
sum(bid)/1000 as sum | |
from winning_bids | |
where created_at > now() - interval '1 hour' | |
group by campaign_id,site_id |
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
\set QUIET ON | |
\set PROMPT1 '%[%033[33;1m%]%x%[%033[0m%]%[%033[1m%]%/%[%033[0m%]%R%# ' | |
\set PAGER OFF | |
\pset format wrapped | |
\set show_slow_queries | |
\pset linestyle unicode | |
\x auto | |
\pset null 'NULL' | |
\set HISTFILE ~/.psql_history- :HOST - :DBNAME | |
\set HISTSIZE 2000 |
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
sap.ui.controller("controller.BehaviorAllPages", { | |
onInit: function() { | |
this.loadReportData(); | |
}, | |
onBeforeRendering: function() { | |
}, | |
onAfterRendering: function() { |
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
sap.ui.controller("controller.BehaviorAllPages", { | |
onInit: function() { | |
this.loadReportData(); | |
}, | |
onBeforeRendering: function() { | |
}, | |
onAfterRendering: function() { |
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
# For complete deployment instructions, see the following support guide: | |
# http://www.engineyard.com/support/guides/deploying_your_application_with_capistrano | |
require "eycap/recipes" | |
# ================================================================================================= | |
# ENGINE YARD REQUIRED VARIABLES | |
# ================================================================================================= | |
# You must always specify the application and repository for every recipe. The repository must be | |
# the URL of the repository you want this recipe to correspond to. The :deploy_to variable must be |
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
Gem list - to installable script | |
replace \((\d\.\d+\.\d+)\) with --version=$1 | |
Remove blank lines | |
pbpaste | grep -v "^$" | pbcopy | |
html2haml | |
pbpaste | html2haml | pbcopy | |
format json |
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
assign successor | |
55347 | |
assign successor | |
55348 | |
assign successor | |
55349 | |
assign successor | |
55350 | |
assign successor | |
55351 |
OlderNewer