run this script in rails console:
admin_email = EMAIL_ADDRESS_ASSOCIATED_WITH_ONE_OF_YOUR_ADMIN_ACCOUNTS
user_email = ONE_OF_YOUR_ALTERNATE_EMAIL_ADDRESSES
## mix's case :
admin_email = 'mix@enspiral.com'
user_email = 'whimful@gmail.com'run this script in rails console:
admin_email = EMAIL_ADDRESS_ASSOCIATED_WITH_ONE_OF_YOUR_ADMIN_ACCOUNTS
user_email = ONE_OF_YOUR_ALTERNATE_EMAIL_ADDRESSES
## mix's case :
admin_email = 'mix@enspiral.com'
user_email = 'whimful@gmail.com'| file_name = "./Tech for Non-tech (Responses) - Form responses 1.tsv" | |
| file = File.new(file_name, "r") | |
| lines = file.each_line.to_a | |
| file.close | |
| new_cols = [] | |
| lines.each do |line| | |
| next if line =~ /^Timestamp/ | |
| selections = line.split(/\t/)[2]. |
The next Enspiral retreat is about taking it to a whole new level!
A summer festival! See: retreat.enspiral.com
This ongoing savings bucket is about saving to make sure the retreat is awesome and affordable - we've already saved $820 out of $2250 needed!
Examples of things this will help make happen :
| [154371, 154372, 154373, 156108, 156109, 156110, 155707, 155766, 155767, 155768, 155769, 155885, 155886, 155887, 155888, 155889, 155890, 155891, 155892, 155893, 155894, 155895, 155896, 155897, 155898, 155899, 155900, 155901, 155902, 155903, 155904, 155905, 155906, 156017, 156018, 156078, 156079, 156080, 156081, 156082, 156083, 156084, 156085, 156086, 156087, 156088, 156089, 156090, 156091, 156092, 156093, 154325, 154326, 154327, 154328, 154329, 154330, 154331, 154332, 154333, 154334, 154335, 154336, 154337, 154338, 154339, 154340, 154341, 154342, 154370, 154343, 154344, 154345, 154346, 154347, 154348, 154349, 154350, 154351, 154352, 154353, 154354, 154355, 154356, 154357, 154358, 154359, 154360, 154361, 154362, 154363, 154364, 154365, 154366, 154367, 154368, 154369, 154374, 154375, 154376, 154377, 154378, 154379, 154410, 154380, 154381, 154382, 154383, 154384, 154385, 154386, 154387, 154388, 154389, 154390, 154391, 154392, 154393, 154394, 154395, 154396, 154397, 154398, 154399, 154400, 154401, 154402, 154403, |
| cr_last_week = CustomerReview.where('created_at > ?', Time.now - 7.days) | |
| cr_naughty_location_ids = CustomerReview.where('last_response_date > ?', Date.today).where('created_at > ?', Time.now - 7.days).group(:location_id).count.keys | |
| results = cr_naughty_location_ids.map do |loc_id| | |
| crs = cr_last_week.where(location_id: loc_id) | |
| naughty_crs = crs.where('last_response_date > ?', Date.today) | |
| [Location.find(loc_id).full_name, naughty_crs.count, crs.count] | |
| end |
| def call | |
| data_lines.each do |line| | |
| line_cols = split_line_into_cols(line) | |
| raise "Error!!!" if line_cols.count != column_names.count | |
| customer_hash = build_hash(line_cols, customer_attributes) | |
| sale_hash = build_hash(line_cols, sale_attributes) | |
| customer = create_or_update_customer( customer_hash ) | |
| print "*" if Rails.env.development? |
| heroku pg:backups capture -a webpunch | |
| curl -o latest.dump `heroku pg:backups public-url -a webpunch` | |
| dropdb webpunch_development | |
| createdb webpunch_development | |
| pg_restore --verbose --clean --no-acl --no-owner -d webpunch_development latest.dump | |
| ------ |
| var http = require('http') | |
| var completeCount = 0 | |
| var dataStore = [] | |
| for (var i=0; i<(process.argv.length-2); i++) { | |
| dataStore[i] = { | |
| url: process.argv[i+2], | |
| response: '' | |
| } | |
| } |