Skip to content

Instantly share code, notes, and snippets.

View cwsaylor's full-sized avatar

Chris Saylor cwsaylor

View GitHub Profile
@cwsaylor
cwsaylor / Preferences.sublime-settings
Last active August 29, 2015 13:57
To use these settings in Sublime, click the menu items: Sublime Text -> Preferences -> Settings - User and copy and paste the following settings.
{
"check_for_bundler": true,
"check_for_rbenv": true,
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"detect_indentation": false,
"ensure_newline_at_eof_on_save": true,
"file_exclude_patterns":
[
"*.a",
"*.class",
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}