Skip to content

Instantly share code, notes, and snippets.

@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@funny-falcon
funny-falcon / changes.md
Last active August 15, 2024 15:13
Performace patch for ruby-1.9.3-p327

Changes:

  • this version includes backport of Greg Price's patch for speedup startup http://bugs.ruby-lang.org/issues/7158 .

    ruby-core prefers his way to do thing, so that I abandon cached-lp and sorted-lf patches of mine.

  • this version integrates 'array as queue' patch, which improves performance when push/shift pattern is heavily used on Array.

    This patch is accepted into trunk for Ruby 2.0 and last possible bug is found by Yui Naruse. It is used in production* for a couple of months without issues even with this bug.

@headius
headius / gist:4156388
Created November 27, 2012 19:20
Drip experiments in JRuby
# BASELINE STARTUP TIMES WITHOUT DRIP
system ~/projects/jruby $ jruby -v
jruby 1.7.1.dev (1.9.3p327) 2012-11-26 810defe on Java HotSpot(TM) 64-Bit Server VM 1.7.0_09-b05 [darwin-x86_64]
system ~/projects/jruby $ time jruby -e 1
real 0m1.238s
user 0m1.985s
sys 0m0.091s
@pbrisbin
pbrisbin / remote-test.rb
Created December 12, 2012 17:02
Remote test runner
#!/usr/bin/env ruby
#
# Vagrant users are constantly switching between a local editor and a
# terminal into their VM to work on code then run the tests.
#
# This script (when used as a server) listens on a TCP port inside the
# VM for test commands to execute. The script (when used as a client)
# also handles sending the appropriate "run this test" command to that
# same port on the VM.
#
class TestConnection
def repeat_test
while true do
if packet_loss > 0
`say 'link down'`
end
end
end
def packet_loss
@rwjblue
rwjblue / ember-master-in-ember-cli-app.md
Last active October 10, 2016 23:01
Developing on Ember master (linked locally), with an Ember CLI application.

From a terminal run the following commands:

git clone [email protected]:emberjs/ember.js
cd ember.js
npm install
npm start

While that is running open another terminal and run the following (starting from the ember.js folder you cloned a moment ago):

// hotfix sass sourcemaps
var appSassFiles = pickFiles('app', {
srcDir: '/styles',
destDir: '/assets/styles'
});
var bootstrapSassFiles = pickFiles('bower_components/bootstrap-sass-official/assets/stylesheets', {
srcDir: 'bootstrap',
destDir: '/assets/styles/bower_components/bootstrap-sass-official/assets/stylesheets/bootstrap'
@lukemelia
lukemelia / note.txt
Created April 8, 2015 04:34
When Error: watch EMFILE strikes (OS X)
This requires `brew install jq` which is a command json query.
I got this from @krisselden
import Ember from 'ember';
import { module } from 'qunit';
import startApp from 'livin/tests/helpers/start-app';
import OnboardPage from 'livin/tests/helpers/page-objects/onboard';
import { test } from 'qunit';
const { run } = Ember;
let application;
module('Acceptance | onboard', {