Skip to content

Instantly share code, notes, and snippets.

Tim Rogers timrogers

Block or report user

Report or block timrogers

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@timrogers
timrogers / herokuize.sh
Created Jul 31, 2016
herokuize, a script for seeding your local Rails environment from Heroku. Just specify $PG_USERNAME and $PG_DATABASE.
View herokuize.sh
#!/bin/bash
heroku pg:backups capture
curl -o latest.dump `heroku pg:backups public-url`
bundle exec rake db:drop db:create
pg_restore --verbose --clean --no-acl --no-owner -h localhost -U $PG_USERNAME -d $PG_DATABASE latest.dump
rm latest.dump
@timrogers
timrogers / gist:57a67478ea575d6a7e7c
Created Jan 17, 2016
Sample tweet data from Twitter Streaming API
View gist:57a67478ea575d6a7e7c
{
"created_at":"Sun Jan 17 17:52:50 +0000 2016",
"id":688781035077787650,
"id_str":"688781035077787650",
"text":"Testing with #VoteRemain",
"source":"\u003ca href=\"http://itunes.apple.com/us/app/twitter/id409789998?mt=12\" rel=\"nofollow\"\u003eTwitter for Mac\u003c/a\u003e",
"truncated":false,
"in_reply_to_status_id":null,
"in_reply_to_status_id_str":null,
"in_reply_to_user_id":null,
View keybase.md

Keybase proof

I hereby claim:

  • I am timrogers on github.
  • I am timrogers (https://keybase.io/timrogers) on keybase.
  • I have a public key whose fingerprint is 9115 4E7D 8C92 0876 7263 2623 A335 6FE7 DB7E 06B1

To claim this, I am signing this object:

View test_me_on.rb
# Load the authors from a text file of names, with one on each line...
path = ARGV[0]
authors = File.read(path).lines
# ...or just define them inline
authors = %w(foo bar baz)
def test_me_on(authors)
starred = []
@timrogers
timrogers / prayer_letter.md
Last active Aug 29, 2015
A prayer letter to follow up LSESU Christian Union Events Week 2015
View prayer_letter.md

Just wanted to send a proper message with updates and prayer points from our Events Week last week at LSE :) It's a bit of a long one, but thought the full story would be really encouraging and helps you to pray for us and all those who heard the Gospel:

  • We had 8am prayer meetings every day and it was so encouraging to see 15+ people there every morning. Please pray that everyone would continue to keep prayer central past the week, and that we'd find ways to make it even more part of CU.
  • Every day, we ran a free coffee stall on the main street through campus and flyered from there. A tonne of amazing conversations were had, but also very difficult ones from people who really reject the Gospel! But they still kept coming back and we kept pointing them to Christ. Please pray that those people would be struck by our love for them.
  • The lunchtime events were incredible! Momentum built over the week and every day our speaker, Malcolm, spoke clearly and faithfully from the gospel on topics relevant to LSE stu
View gist:d3424bc55650b84652db
direct_debit = GoCardless::PreAuthorization.find("0540QD22SKND")
direct_debit.create_bill(
name: "Invoice #123",
amount: "250.00"
)
View gist:bf7aaed5d2dbb4aa14e3
//
// NSArray+Randomizer.m
// Crystal Ball
//
// Created by Tim Rogers on 06/05/2014.
// Copyright (c) 2014 Tim Rogers. All rights reserved.
//
#import "NSArray+Randomizer.h"
View gist:8585828
SELECT * FROM `salesforce1` WHERE `description` != 'Reversal' AND `id` IN ('85092508', '85092362', '85063063', '84817289', '85063064', '85063383', '85063384', '85037123', '85037124', '85062121', '85064887', '85064888', '85063292', '85063433', '85062482', '85062483', '85062942', '85062943', '85095302', '85049491', '85049492', '85063161', '85065160', '85065161', '85063561', '85063566', '85063582', '85063622', '85063649', '85065055', '85065224', '85063568', '85065284', '85065285', '85065349', '85065386', '85096528', '84929541', 'Tried to', '85065445', '85065483', '85065501', '85065587', '85065903', '85065940', '85065948', '85065941', '85065791', '85065792', '85065949', '85065225', '85066035', '85066068', '85066084', '85066125', '85065438', '85066133', '84934801', '84969645', '85097914', '85097915', '85098803', '85096560', '85096561', '85037628', '85066156', '85066548', '85066549', '85067236', '85067674', '85065351', '85067798', '85067799', '85068088', '85068089', '85066729', '85066730', '85101244', '85038023', '
@timrogers
timrogers / lse_renew_o_matic.rb
Last active Dec 25, 2015
Automatically renew library books from the London School of Economics (LSE) library from a Ruby script with the LSE Renew-o-matic
View lse_renew_o_matic.rb
# LSE Renew-o-matic
# Renew books you've taken out from the library at LSE (the British Library of Political
# and Economic Science) just by running a Ruby script
#
# Step 1: Install the gem dependencies
# $ gem install terminal-table mechanize
# Step 2: Run, and you'll get a beautiful table at the end with the results!
require 'terminal-table'
require 'mechanize'
View gist:6949233
Hello,
We're writing about #111-8797241-1992259 for Google Chromecast HDMI Streaming Media Player. We recently learned of an error that allowed this item to be available to ship to international addresses. Unfortunately, this item is not currently intended for use outside of the United States. Outside of the United States, all of the functionality of this item may not be available and the manufacturer's warranty is void. We're sorry for any inconvenience this causes.
You don't need to take any action if you still want to receive the item. If your order hasn’t shipped yet, you can cancel it by going to Your Account and clicking the "Your Orders" button:
http://www.amazon.com/your-account
If your order has shipped and you would like to return the item, you'll find return instructions at the link below. We'll refund you in full, including the return shipping costs.
You can’t perform that action at this time.