Skip to content

Instantly share code, notes, and snippets.

Avatar

Stu C stuartchaney

  • Las Vegas / Dublin
View GitHub Profile
View gist:a297d8532a5f7d7cf72068731f08c233
create_table "app_events", id: false, force: :cascade do |t|
t.bigserial "id", null: false
t.bigint "shop_id"
t.string "shopify_domain"
t.string "app_type"
t.datetime "remote_date_at"
t.string "name"
t.string "details"
t.datetime "billing_on"
t.datetime "created_at", null: false
View keybase.md

Keybase proof

I hereby claim:

  • I am stuartchaney on github.
  • I am stuartchaney (https://keybase.io/stuartchaney) on keybase.
  • I have a public key whose fingerprint is 3AEB 0C0D 2538 14B5 EC23 549F 1876 64E8 A29C 88ED

To claim this, I am signing this object:

View gist:971ec47988b5ffbf53f54e0d4189e269
1. a) replace variable.price with wh_price
b) DO NOT replace inside of script tags
c) Only replace if inside {{ }} or {% %}
{{variable.price}} <!-- replace this with --> {{wh_price}}
{{random_stuff | times: 1 | variable.price}} <!-- replace this with --> {{random_stuff | times: 1 | wh_price}}
{% variable.price %} <!-- replace this with --> {% wh_price %}
<script type="text/javascript">
{{variable.price}} <!-- DONT REPLACE THIS -->
View gist:bcebbdd895a429c96e1c
### Keybase proof
I hereby claim:
* I am stuartchaney on github.
* I am stuartchaney (https://keybase.io/stuartchaney) on keybase.
* I have a public key whose fingerprint is 73B2 2335 3937 6F8C BF7F AE00 923F 0873 A974 3382
To claim this, I am signing this object:
View gist:6f970c5691ff93122f65
require 'resque-retry'
class WebhookProcessor
extend Resque::Plugins::Retry
@queue = :webhook_processor
@retry_limit = 3
@retry_delay = 60
@stuartchaney
stuartchaney / gist:c517f5e031d4dca7a452
Last active Aug 29, 2015
Salesforce Documentation
View gist:c517f5e031d4dca7a452

#Salesfore Documentation

###How to connect your account

  1. Visit the FollowUp.cc addons page and select Salesforce from the list of addons.
  2. Choose an email to connect to Salesforce
  3. You will be prompted to Login to Salesforce and grant FollowUp.cc authorization to interact with your Salesforce account.
  4. You will be redirected back to FollowUp.cc
@stuartchaney
stuartchaney / nested_hmt_patch.rb
Last active Dec 27, 2015
Updated for newest version of nested_form gem
View nested_hmt_patch.rb
module NestedForm
module BuilderMixin
def link_to_add_hmt(*args, &block)
options = args.extract_options!.symbolize_keys
association = args.pop
association_two = args.pop
unless object.respond_to?("#{association}_attributes=")
raise ArgumentError, "Invalid association. Make sure that accepts_nested_attributes_for is used for #{association.inspect} association."
end
View gist:2225041
<!DOCTYPE html>
<html>
<head>
<title>Airbrakeiojs</title>
<%= stylesheet_link_tag :all %>
<%= javascript_include_tag :defaults %>
<%= csrf_meta_tag %>
<script type="text/javascript">
//<![CDATA[
var notifierJsScheme = (("https:" == document.location.protocol) ? "https://" : "http://");
View gist:2038077
2012-03-14T03:45:48+00:00 app[web.1]: Time for request: 107 microseconds.
2012-03-14T03:45:48+00:00 heroku[router]: POST api.airbrake.io/notifier_api/v2/notices dyno=web.1 queue=0 wait=0ms service=3ms status=200 bytes=138
2012-03-14T03:45:48+00:00 heroku[nginx]: 173.228.102.130 - - [14/Mar/2012:03:45:48 +0000] "POST /notifier_api/v2/notices HTTP/1.1" 200 133 "-" "Apache-HttpClient/4.1.2 (java 1.5)" api.airbrake.io
View gist:1452835
Stus-MacBook-Air:hoptoad stuchaney$ bundle install
Fetching source index for http://rubygems.org/
/Users/stuchaney/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:428:in `request': too many connection resets (http://rubygems.org/quick/Marshal.4.8/pry-0.9.7.4-i386-mingw32.gemspec.rz) (Gem::RemoteFetcher::FetchError)
You can’t perform that action at this time.