Skip to content

Instantly share code, notes, and snippets.

@phantomwhale
phantomwhale / gist:d033674bd92d056a39b6
Created July 16, 2014 06:34
Keybase identity verification
### Keybase proof
I hereby claim:
* I am phantomwhale on github.
* I am benturner (https://keybase.io/benturner) on keybase.
* I have a public key whose fingerprint is 724D 7448 56D0 623E EB75 FC22 5DE1 47DC 4BAB 3CBE
To claim this, I am signing this object:
@phantomwhale
phantomwhale / high_voltage_pages_helper.rb
Last active August 29, 2015 14:18
High Voltage Pages Helper
module HighVoltagePagesHelper
class << self
include Rails.application.routes.url_helpers
end
module_function
def static_pages
Dir.entries(Rails.root.join('app', 'views', 'pages')).inject([]) do |pages, file|
matches = file.match(/\.html\.[a-z]+$/)
@phantomwhale
phantomwhale / responses_controller_spec.rb
Created August 2, 2012 06:03
Two Rspec before blocks to stub out some behaviour in a controller.First block works, but is verbose. Second block fails, but unsure why. Last chunk of code is the code being tested.Worth noting that changing the method to 'telect' makes it pass
# This works, but a bit verbose
before do
@invitation1, @invitation2 = stub_model(Invitation), stub_model(Invitation)
stubbed_scope = stub
Invitation.stub(:accessible_by => stubbed_scope)
stubbed_scope.stub_chain(:select, :where => [@invitation1, @invitation2])
end
# This fails with :
@phantomwhale
phantomwhale / Toys.txt
Last active July 22, 2017 05:00
When are my toys coming
- July
7th Continent
Heroes of Normandie resupply (wave 2)
Lazer Ryderz
Shadows of Brimstone (wave 2)
Spirit Island
The End is Nigh
Tau Ceti
Yokohama
@phantomwhale
phantomwhale / Brimstone custom cards.md
Last active April 9, 2021 11:13
Full list of possible Brimstone custom cards

Brimstone town cards

Blacksmith

Dark Stone Barrel
Dark Stone Buckle
Dark Stone Bullets
Dark Stone Grip
Dark Stone Horse Shoes
Dark Stone Inlay

@phantomwhale
phantomwhale / Command Line
Created March 20, 2014 04:14
Passing command line arguments into Vagrant to configure Ansible Provisioning
# with a space, this doesn't work...
$ ANSIBLE_ARGS='-t elasticsearch' vagrant provision
==> default: Running provisioner: ansible...
ERROR: tag(s) not found in playbook: elasticsearch. possible values: apache,common,elasticsearch,java,passenger,postgresql,ruby
Ansible failed to complete successfully. Any error output should be visible above. Please fix these errors and try again.
# without the space, it now works...
$ ANSIBLE_ARGS='-telasticsearch' vagrant provision