Skip to content

Instantly share code, notes, and snippets.

View marcusleemitchell's full-sized avatar
:octocat:
Socially Distanced Coding

Marcus Mitchell marcusleemitchell

:octocat:
Socially Distanced Coding
View GitHub Profile

Keybase proof

I hereby claim:

  • I am marcusleemitchell on github.
  • I am marcusmitchell (https://keybase.io/marcusmitchell) on keybase.
  • I have a public key ASCGTk2RZVtIhiS1m1m4W-NDI01fH87czfBsyFzoCHLLEAo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am marcusleemitchell on github.
  • I am marcusmitchell (https://keybase.io/marcusmitchell) on keybase.
  • I have a public key whose fingerprint is F15B D5A8 4643 01FB 49D0 88B4 4414 B314 49B5 08C6

To claim this, I am signing this object:

### Keybase proof
I hereby claim:
* I am marcusleemitchell on github.
* I am marcusmitchell (https://keybase.io/marcusmitchell) on keybase.
* I have a public key whose fingerprint is 6F0C 1D62 704E C4CE E3B9 25E8 9B94 1644 3EC1 1483
To claim this, I am signing this object:
#!/usr/bin/env ruby
require 'net/telnet'
cache_dump_limit = 100
localhost = Net::Telnet::new("Host" => "localhost", "Port" => 11211, "Timeout" => 3)
slab_ids = []
localhost.cmd("String" => "stats items", "Match" => /^END/) do |c|
matches = c.scan(/STAT items:(\d+):/)
slab_ids += matches
end
#!/usr/bin/env ruby
require 'net/telnet'
cache_dump_limit = 100
localhost = Net::Telnet::new("Host" => "127.0.0.1", "Port" => 11211, "Timeout" => 3)
slab_ids = []
localhost.cmd("String" => "stats items", "Match" => /^END/) do |c|
matches = c.scan(/STAT items:(\d+):/)
slab_ids = matches.flatten.uniq
end
@marcusleemitchell
marcusleemitchell / gist:7449709
Created November 13, 2013 14:09
update_without_callbacks master list
Searching 8501 files for "update_without_callbacks" (regex)
/Users/mmitchell/Projects/HouseTrip-Web-App/app/models/booking.rb:
687 settings[:five_days_checkin_sms_sent] = false
688 settings[:checkin_day_sms_sent] = false
689: self.send(:update_without_callbacks) if force
690 end
691 end
...
902 if booking_reference.blank?
@javascript
Scenario: Some results should be visible instantly while the remaining property boxes are loaded asynchronously # features/search_properties/ajax_results.feature:16
Given controllers respond slowly # features/step_definitions/slow_controllers_steps.rb:3
Slow response time: 5
call to index
Slow response time: 5
call to index
When I searched for the destination "Augsburg" # features/step_definitions/search_steps.rb:44
Then I should see "Property A" # features/step_definitions/web_steps.rb:133
And I should see "Property B" # features/step_definitions/web_steps.rb:133
Given /^the "([^"]*)" "([^"]*)" method responds slowly$/ do |test_controller, test_action|
test_controller.constantize.class_eval do
alias_method :old_index, :index
def index
if request.xhr?
puts "** I IZ IN UR CLAZ, SLEEPN UR METURD **"
sleep(5)
end
old_index
end
@marcusleemitchell
marcusleemitchell / gist:5966596
Created July 10, 2013 14:09
change line 18 from ```on_updating_stylesheet``` to ```on_updated_stylesheet```
module Compass
module Configuration
@callbacks_loaded = false
# The helpers are available as methods on the Compass module. E.g. Compass.configuration
module Helpers
def configure_sass_plugin!
puts "** configure_sass_plugin! **"
require 'sass/plugin'
config = sass_plugin_configuration
locations = config.delete(:template_location)
#!/usr/bin/env ruby
# encoding: UTF-8
reset = "\r\e[K"
STDOUT.sync = true
10.times do
print '(ヽ°-°)ヽ┳━┳'
sleep 1
print reset