Skip to content

Instantly share code, notes, and snippets.

View cwsaylor's full-sized avatar

Chris Saylor cwsaylor

View GitHub Profile
create table `fizzbuzz` (
`id` int(11) NOT NULL AUTO_INCREMENT,
primary key (`id`)
) auto_increment=1;
create procedure insertNumbers(max int)
begin
end;
Capybara.register_driver :poltergeist do |app|
Capybara::Poltergeist::Driver.new(app, :phantomjs_options => ["--cookies-file=#{::Rails.root}/spec/features/cookies.txt"])
end
Capybara.javascript_driver = :poltergeist
{
"cmd": ["bundle", "exec", "rspec", "--colour", "--drb", "${file}"],
"file_regex": "# ([A-Za-z:0-9_./ ]+rb):([0-9]+)",
"working_dir": "${project_path:${folder:${file_path}}}",
"selector": "source.ruby",
"shell": false
}
# or
DISABLE_CORRECTION="true"
plugins=(git rbenv bundler last-working-dir)
export EDITOR='subl -w'
[user]
name =
email =
[github]
user =
password =
[alias]
b = branch
cp = cherry-pick
co = checkout
@cwsaylor
cwsaylor / Default (OSX).sublime-keymap
Last active January 2, 2016 01:38
Install Package Control, All Autocomplete, Better CoffeeScript, CoffeeScriptHaml, Git, Ruby Slim, Sass
[
{ "keys": ["ctrl+shift+r"], "command": "reveal_in_side_bar"}
]
ActiveAdmin.register_page "Dashboard" do
menu :priority => 1, :label => proc{ I18n.t("active_admin.dashboard") }
content :title => proc{ I18n.t("active_admin.dashboard") } do
now = Time.now.getgm
columns do
column do
diff --git a/app/models/inbox/recruiter_message.rb b/app/models/inbox/recruiter_message.rb
index 2373ae2..c1b7eab 100644
--- a/app/models/inbox/recruiter_message.rb
+++ b/app/models/inbox/recruiter_message.rb
@@ -20,6 +20,8 @@ class Inbox::RecruiterMessage < Inbox::Message
validate :available_credits, on: :create
validate :active_subscription, on: :create
+ after_create :doc_mail_debit
+
@cwsaylor
cwsaylor / syncm.sh
Created November 7, 2012 19:17
Merge master into current branch
#!/bin/sh -x
CURRENT=`git branch | grep "*" | awk '{print $2}'`
git checkout master
git fetch
git merge origin/master
git checkout ${CURRENT}
git merge master ${CURRENT}
= form_for @subscription, :html => { 'data-stripe-key' => "#{STRIPE_PUBLISHABLE_KEY}" } do |f|
= f.hidden_field :stripe_customer_token
= f.hidden_field :last4
= f.hidden_field :exp_month
= f.hidden_field :exp_year
= f.hidden_field :plan_id
.panel.userForm.active
.featurehead
h1 Payment Information
fieldset.reg.docmail