Skip to content

Instantly share code, notes, and snippets.

Michael Smith mikespokefire

Block or report user

Report or block mikespokefire

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

Keybase proof

I hereby claim:

  • I am mikespokefire on github.
  • I am mikespokefire ( on keybase.
  • I have a public key whose fingerprint is 7DAC 9902 9F83 0A17 21F5 AE10 5758 4673 88FA B364

To claim this, I am signing this object:

# On Machine A
serf agent -bind
# On Machine B
serf agent -bind
serf join
# On Machine A (with some time between each command)
serf event deploy feature/testing
serf event test-event payload
View custom_rspec_matcher.rb
# The actual matcher class
class VirtusAttributeMatcher
# initialize is called with the expected outcome
# => expect(described_class).to have_attribute(:token)
def initialize(attribute_name)
@attribute_name = attribute_name
@options = {}
# When RSpec will call matches? on the expectation class, this needs to
mikespokefire / my_class.js
Last active Dec 14, 2015
Object Orientated JavaScript
View my_class.js
"use strict";
var MyClass = (function() {
function MyClass(publicString) {
this.publicString = publicString;
var privateString = "I'm a private string that can't be accessed directly";
// ============================================================================
mikespokefire / gist:3774881
Created Sep 24, 2012
Marking fields as dirty in Mongoid and ActiveRecord
View gist:3774881
class Muppet
include Mongoid::Document
field :tags, Array
m = => ['a', 'b', 'c'])
View appcontrollersadmin_controller.rb
class AdminController < ApplicationController
layout "admin"
http_basic_authenticate_with :name => "user", :password => "password"
View coasters controller
def index
@all_coasters = Coaster.all
@coasters = @all_coasters
Coaster.include_root_in_json = false
View gist:2421581
var myFunc = function() {
console.log(this); //currently outs DOMelement
if ($('body.home').length) {
after: myFunc
View Full rake task
namespace :flickr do
desc "Pull all data from Flickr"
task :pull => :environment do
# Remove everything to do with the gallery
View gist:2001722
def pending_orders?
orders.where(:status => Order::PENDING).exists?
You can’t perform that action at this time.