Skip to content

Instantly share code, notes, and snippets.

View benhoskings's full-sized avatar

Ben Hoskings benhoskings

View GitHub Profile
worker_processes 4
working_directory '.'
preload_app true
timeout 60
listen "/APP_PATH/tmp/sockets/unicorn.socket", :backlog => 1024
pid "/APP_PATH/tmp/pids/unicorn.pid"
stderr_path "/APP_PATH/log/unicorn.stderr.log"
stdout_path "/APP_PATH/log/unicorn.stdout.log"
def some_action
redirect_to wizard_path_for(@intervention)
end
def wizard_path_for(intervention)
case intervention.wizard
when 100
intervention_expiries_path(intervention)
when 80
intervention_clients_path(intervention)
dep 'provision the bastard', :host, :host_name, :ref, :env, :domain do
def authorized_keys
keys = 'config/authorized_keys'.p.read
keys += "\n" + 'config/authorized_keys.non_production'.p.read if env != "production"
keys
end
domain.default!('staging.tc-dev.net') unless env == 'production'
{
"auto_complete_commit_on_tab": true,
"auto_complete_delay": 30,
"bold_folder_labels": true,
"caret_style": "wide",
"color_scheme": "Packages/User/Ben's Solarized (light).tmTheme",
"detect_indentation": false,
"dictionary": "Packages/Language - English/en_GB.dic",
"drag_text": false,
"draw_white_space": "all",
[
{ "keys": ["super+shift+e"], "command": "use_selection_for_replace"},
{ "keys": ["alt+g"], "command": "next_result"},
{ "keys": ["super+v"], "command": "paste_and_indent"},
{ "keys": ["shift+super+v"], "command": "paste"},
{ "keys": ["super+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} },
{ "keys": ["super+alt+f"], "command": "replace_next"},
{ "keys": ["super+ctrl+r"], "command": "reveal_in_side_bar"},
# -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = "geoip-c"
s.version = "0.8.1"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Ryah Dahl", "Matt Todd", "Andy Lindeman"]
s.date = "2012-04-11"
s.description = "Generic GeoIP lookup tool. Based on the geoip_city RubyGem by Ryah Dahl"
@benhoskings
benhoskings / ruby-2-cert-issue-fix.sh
Last active March 21, 2016 18:30
Ruby 2.0 CA cert issue fix
# If you're having cert issues on ruby 2.0.0-p0, the issue is most likely that ruby can't
# find the required intermediate certificates. If you built it via rbenv/ruby-build, then
# the certs are already on your system, just not where ruby expects them to be.
# When ruby-build installs openssl, it installs the CA certs here:
~/.rbenv/versions/2.0.0-p0/openssl/ssl/cacert.pem
# Ruby is expecting them here:
$(ruby -ropenssl -e 'puts OpenSSL::X509::DEFAULT_CERT_FILE')
# Which for me, is this path:

With both the author.js and handleDoubleSubmit() fixes

1

unexpected response, code=404, content-type="text/plain"
TypeError - 'undefined' is not a function (evaluating '_getTagName(currWindow).toLowerCase()')
# ./spec/acceptance/author/publishing_spec.rb:75:in `block (2 levels) in <top (required)>'

558 examples, 0 failures

551 examples, 0 failures

1) Attributions Adding and removing authors for articles
Page: /Users/ben/projects/tc/tc/tmp/capybara/capybara-20130204014413444026000-59566.html
Screenshot: /Users/ben/projects/tc/tc/tmp/capybara/capybara-20130204014413462910000-59566.png
Failure/Error: page.should have_content("You may only select one lead author")
expected there to be content "You may only select one lead author" in "Home\nJobs\nNewsletter\nDonate\nSign out\nDashboard\nGlobal Dashboard\nMiguel Yost\nPrevious versions\nEdit\nPreview\nLayout →\nSend note\nApprovals\nCollaborators\nInvite\nMiguel Yost\nEditor\nx\n \n Lead Author\n \n Author\n Contributor\n Reviewer\n \nJose Quigley\nReviewer\nx\nLesley Jacobs\nLead Author\nDisclosure\n✔ Jose Quigley\nEdit\n✔ Lesley Jacobs\nEdit\nHeadingBoldItalicLinkImageVideo\nFullscreen\nHow To …\nGet Started\nWrite a good article\nWrite a good headline\nFormat your work\nProofread & spellcheck\nSubmit your work\nReadability\n­"
# ./spec/accept
@benhoskings
benhoskings / push_output.txt
Last active December 12, 2015 00:58
An example deploy using babushka/git push. The base logic handles the mechanics of getting the code in place, and bundling & restarting unicorn as required; custom steps can be hooked in like 'db backed up' and 'built' below: https://github.com/benhoskings/babushka.me/blob/master/babushka-deps/deploy.rb#L1-L8
> gp production master
Counting objects: 26, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (15/15), done.
Writing objects: 100% (19/19), 1.76 KiB, done.
Total 19 (delta 11), reused 0 (delta 0)
remote: benhoskings:ready for update.repo {
remote: benhoskings:valid git_ref_data.repo {
remote: } ✓ benhoskings:valid git_ref_data.repo
remote: benhoskings:clean.repo {