- Who owns the Future - Jaron Lanier
- Capital in the Twenty-First Century - Thomas Piketty
- How we got to now, 6 inventions - S. Johnson
- Danubia - Simon Winder
- Stragic Storytelling - Dane McKinsey
- The Dazzle of the Day - Molly Glass
- The Shepards Life - James Rebanks
- Incognito - David Eagleman
- [A General Theory of Love](http://www.amazon.com/General-Theory-Love-Thomas-Lewis/dp/0375709223
View test.rb
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 TestCase1 | |
if false | |
def foo | |
'Hello World' | |
end | |
end | |
end | |
puts TestCase1.new.foo # test.rb:9:in `<main>': undefined method `foo' for #<TestCase1:0x007ffff35bfe78> (NoMethodError) |
View gist:7afe855d9ee2435fe983
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
### Keybase proof | |
I hereby claim: | |
* I am sunnyrjuneja on github. | |
* I am wasd (https://keybase.io/wasd) on keybase. | |
* I have a public key whose fingerprint is 0FC8 16B4 4CC8 EBDF 64A1 1A5A 26EC A78F 9C32 1A3F | |
To claim this, I am signing this object: |
View genmon.md
View nginxproxy.md
Virtual Hosts on nginx (CSC309)
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com
, example2.com
, and example1.com/images
on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
View gist:37b14b85b10bedcf8c0a
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
# Activate the gem you are reporting the issue against. | |
gem 'activerecord', '4.2.0' | |
require 'active_record' | |
require 'minitest/autorun' | |
require 'logger' | |
require 'byebug' | |
# Ensure backward compatibility with Minitest 4 | |
Minitest::Test = MiniTest::Unit::TestCase unless defined?(Minitest::Test) |
View gist:0fb1a69ae346414469fd
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 User < ActiveRecord::Base | |
# Omitted | |
def send_devise_notification(notification, *args) | |
devise_mailer.send(notification, self, *args).deliver_later | |
end | |
end | |
test 'send_devise_notification queues into activejob' do | |
@user.save | |
assert_equal enqueued_jobs.size, 1 # Passes |
View open_civic_data_spec.rb
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
describe OpenCivicData do | |
context 'with no api key' do | |
it 'raises a warning' do | |
expect { OpenCivicData.new(nil) }.to warn('Warning: Your API key may not be set') | |
end | |
end | |
end |