Skip to content

Instantly share code, notes, and snippets.

@loopj
loopj / clearbit-popover.coffee
Created April 21, 2015 20:18
Clearbit "lead information" overlays
#
# Clearbit Lead Information Popover
#
# Dependencies:
# - jQuery
# - Bootstrap (for popovers)
#
# Screenshot:
# http://i.imgur.com/wWmUeGZ.png
#
@loopj
loopj / test.cpp
Last active August 29, 2015 14:19
// Works
class Something {
public:
void doSomething() {
uint8_t buffer[1024];
memcpy(buffer + bufferPosition, something);
bufferPosition += someSize;
memcpy(buffer + bufferPosition, something);
@loopj
loopj / Gemfile
Last active August 29, 2015 14:13
source "https://rubygems.org"
gem "bugsnag-api"
@loopj
loopj / Rakefile
Created October 10, 2014 18:23
Load rake tasks from gems in rails 2.3
# Rails 2.3 doesn't automatically load rake tasks from required gems
# Add the following code to your app's Rakefile to fix that
gem_tasks = []
Gem.loaded_specs.each do |name, spec|
next if %w{rake rails bundler activesupport rack actionpack actionmailer activerecord activeresource mysql2}.include?(name)
spec.load_paths.each do |load_path|
gem_tasks +=
Dir.glob("#{load_path}/**/tasks/*.rake")
end
end
@loopj
loopj / bugsnag_resque.rb
Last active August 29, 2015 14:03
Send bugsnag error reports asynchronously using resque, sidekiq, etc
# Send Bugsnag error reports asynchronously using Resque
# Add this file to config/initializers/bugsnag_resque.rb
# A simple resque job
class BugsnagResqueJob
@queue = "bugsnag"
def self.perform(*args)
Bugsnag::Notification.deliver_exception_payload_without_resque(*args)
end
end

Keybase proof

I hereby claim:

  • I am loopj on github.
  • I am loopj (https://keybase.io/loopj) on keybase.
  • I have a public key whose fingerprint is 0934 A3F0 929C 1EA3 520B 853E 7C99 463C 46ED 627C

To claim this, I am signing this object:

DEC 20, 2013 | 01:25PM EST
Nicole Williams replied:
Hi James,
Apologies about the delay in getting in touch! I’ve done testing on our end and wasn’t able to recreate similar errors with downtime and loading for Cloud.typography. If it’s not too much trouble, would you mind confirming if you’re still having issues?
Thanks in advance.
Kindest Regards,
@loopj
loopj / hipchat-hooks.rb
Created August 28, 2013 02:17
Add HipChat hooks to GitHub repos.
#!/usr/bin/env ruby
require "httparty"
require "json"
class Github
include HTTParty
HIPCHAT_HOOK = {
name: "hipchat",
Failures:
1) AWS::Record::Model it should behave like an aws record base class it should behave like record class #create! raises an exception when create returns false
Failure/Error: Unable to find matching line from backtrace
NameError:
undefined method `__rspec_original_dup' for class `#<Class:0x1123dfff0>'
Shared Example Group: "record class" called from ./spec/shared/record/abstract_base_examples.rb:62
# /Library/Ruby/Gems/1.8/gems/rspec-mocks-2.13.1/lib/rspec/mocks/any_instance.rb:73:in `alias_method'
# /Library/Ruby/Gems/1.8/gems/rspec-mocks-2.13.1/lib/rspec/mocks/any_instance.rb:73:in `restore_dup'
# /Library/Ruby/Gems/1.8/gems/rspec-mocks-2.13.1/lib/rspec/mocks/any_instance.rb:72:in `class_eval'
Failures:
1) AWS::Record::Model it should behave like an aws record base class it should behave like record class #create! raises an exception when create returns false
Failure/Error: Unable to find matching line from backtrace
NameError:
undefined method `__rspec_original_dup' for class `#<Class:0x113869fe8>'
Shared Example Group: "record class" called from ./spec/shared/record/abstract_base_examples.rb:62
# /Library/Ruby/Gems/1.8/gems/rspec-mocks-2.12.2/lib/rspec/mocks/any_instance.rb:73:in `alias_method'
# /Library/Ruby/Gems/1.8/gems/rspec-mocks-2.12.2/lib/rspec/mocks/any_instance.rb:73:in `restore_dup'
# /Library/Ruby/Gems/1.8/gems/rspec-mocks-2.12.2/lib/rspec/mocks/any_instance.rb:72:in `class_eval'