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
####################### | |
# Example Usage: | |
####################### | |
# | |
# mailbox = BadMailProcessor::Pop3.new(server, username, password) | |
# BadMailProcessor.run(mailbox) do |bounce| | |
# User.bounce(bounce[:email_address]) | |
# my_action2 | |
# 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 Bathroom | |
# door is on the right | |
def initialize(params) | |
@stalls = params[:stalls] | |
@stall_ratings = rate_stalls | |
@line = params[:line] | |
end | |
def find_stall |
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
<script type="text/javascript"> | |
var _eioq = _eioq || []; | |
_eioq.push(['setApp', 'dfX4Xnqt3P2xpsaxqhKM']); | |
_eioq.push(['setUser', '[email protected]']); | |
_eioq.push(['trackEvent', 'visit']); | |
(function() { | |
var eio = document.createElement('script'); eio.type = 'text/javascript'; | |
eio.src = 'http://app.engagement.io/eio.js') %>'; |
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
$ bundle exec rake | |
.F.F.FFFFFF..F................................. | |
Failures: | |
1) Cohort::Query should do basic queries | |
Failure/Error: c["events"]["signed_up"].should == {"count" => 3} | |
expected: {"count"=>3} | |
got: {"people"=>{}, "count"=>0} (using ==) |
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
..F.....FF.. | |
Failures: | |
1) Cohort::Query should calculate subfunnels | |
Failure/Error: c["Null"]["active_weeks"].should == ["week_0", "week_1"] | |
expected: ["week_0", "week_1"] | |
got: ["week_-1", "week_0"] (using ==) | |
# ./spec/models/cohort_query_spec.rb:57:in `block (2 levels) in <top (required)>' |
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
namespace :db do | |
namespace :sync do | |
desc "Copy production database to local" | |
task :dev => :environment do | |
puts "Dumping production..." | |
system "mongodump -h #{ENV['PRODUCTION_MONGOHQ_DOMAIN']}:#{ENV['PRODUCTION_MONGOHQ_PORT']} -d #{ENV['PRODUCTION_MONGOHQ_DATABASE']} -u #{ENV['PRODUCTION_MONGOHQ_USER']} -p#{ENV['PRODUCTION_MONGOHQ_PASSWORD']} -o db/backups/" | |
puts "Restoring production to development..." | |
system "mongorestore -h localhost --drop -d crowdhall_web_v1_development db/backups/#{ENV['PRODUCTION_MONGOHQ_DATABASE']}/" |
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
Mon Oct 1 15:13:02 Creating index: { key: { _id: 1 }, ns: "crowdhall_v1_staging.categories", name: "_id_" } | |
Mon Oct 1 15:13:02 Assertion: 13111:field not found, expected type 2 | |
0x10036b5fb 0x10009a81e 0x10009ac4c 0x1000098c2 0x100011b87 0x100018622 0x100016944 0x100019e54 0x100313b5d 0x100315697 0x10000126a 0x1000011e4 | |
0 mongorestore 0x000000010036b5fb _ZN5mongo15printStackTraceERSo + 43 | |
1 mongorestore 0x000000010009a81e _ZN5mongo11msgassertedEiPKc + 206 | |
2 mongorestore 0x000000010009ac4c _ZN5mongo11msgassertedEiRKSs + 12 | |
3 mongorestore 0x00000001000098c2 _ZNK5mongo11BSONElement3chkEi + 466 | |
4 mongorestore 0x0000000100011b87 _ZN7Restore11createIndexEN5mongo7BSONObjEb + 2711 | |
5 mongorestore 0x0000000100018622 _ZN7Restore9drillDownEN5boost11filesystem210basic_pathISsNS1_11path_traitsEEEbbb + 9906 | |
6 mongorestore 0x0000000100016944 _ |
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
#!/bin/bash | |
# let's start fresh | |
rm -rf .demeteorized | |
rm /tmp/newfile | |
# run + cd | |
demeteorizer | |
cd .demeteorized |
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
Hackathon | |
Principles: | |
* For fun, not profit | |
Potential Themes: | |
* Open data related http://data.cincinnati.com/navigator/search.aspx |
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
Meteor.publishAggregation = (params) -> | |
initializing = true | |
dummy = Random.id() | |
pub = params.handle | |
collection = params.collection | |
handle = collection.find(params.filter, params.options).observeChanges | |
added: (id, fields) -> | |
if !initializing | |
pub.changed(params.name, dummy, collection.aggregate(params.pipeline)[0]) |
OlderNewer