Skip to content

Instantly share code, notes, and snippets.

View kenmazaika's full-sized avatar

ken mazaika kenmazaika

View GitHub Profile

Step 3 - Allow garbage to be picked up (code change)

Follow Jamis' Guide to faster tests for, scrub_instance_variables.

code.

Step 4 - MySQL Tuning

  • On a Mac I used /usr/local/mysql/support-files/my-huge.cnf as a base and set innodb_buffer_pool_size=1G, which was about 10x what it was before.

Ruby Profiling with Perftools.rb

TL;DR of Symbioz.

Notes: I only had luck with Ruby 1.9.3, not Ruby2, but I didn't dig into the Ruby2 problems too deeply. YMMV.

Installation on a Mac:

teardown :scrub_instance_variables
@@reserved_ivars = %w(@loaded_fixtures @test_passed @fixture_cache @method_name @_assertion_wrapped @_result)
def scrub_instance_variables
(instance_variables - @@reserved_ivars).each do |ivar|
instance_variable_set(ivar, nil)
end
end
@kenmazaika
kenmazaika / native
Created April 26, 2013 15:29
native
Updated
debugger-1.5.0
eventmachine-1.0.3
ffi-1.4.0
kgio-2.8.0
nokogiri-1.5.6
raindrops-0.10.0
ruby-prof-0.13.0
#!/bin/sh
ruby -e "puts ENV['PATH'].split(\":\").join(\"\n\")"
  • I am a github user
  • I was removed from an organization
  • On my front page there still has links to stuff that was done in my old organization
  • Clicking on the links from the organization I was in 404

I would expect the links not to be on my dashboard page.

# This is a simple ruby script that scrapes the opt-ins from the
# LaunchRock API and prints it to Standard Out.
#
# example command line syntax:
# email="[email protected]" password="shredddd" site_name="Yolosite" ruby rock.rb
require 'rubygems'
require 'active_support/all'
require 'httparty'
# Grab the credentials from the command line arguments
FactoryGirl.define do
factory :owner do
name "Yolo Man"
sequence(:email) do |n|
"swagdude#{n}@omgmail.com"
end
password 'swag2themax'
password_confirmation 'swag2themax'
end