Skip to content

Instantly share code, notes, and snippets.

View nathany's full-sized avatar
🙃

Nathan Youngman nathany

🙃
View GitHub Profile
$ jruby -v
jruby 1.7.5.dev (1.9.3p392) 2013-09-04 090d5dd on Java HotSpot(TM) 64-Bit Server VM 1.7.0_25-b15 [darwin-x86_64]
$ time jruby -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-Xverify:none -e 'require "rails"'
jruby -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-Xverify:none -e 5.18s user 0.47s system 136% cpu 4.142 total
$ time jruby -e 'require "rails"'
jruby -e 'require "rails"' 14.60s user 0.44s system 202% cpu 7.444 total
@steveklabnik
steveklabnik / rails4gems.md
Last active December 19, 2015 13:19
Gems that may not be rails 4 compatible

Gems that need help with Rails 4

  • cucumber-rails
  • simple_form - has a 3.0.0.rc but it depends on rails 4.0.0.rc1
  • delayed_job_active_record - has a v4.0.0.beta3 so likely ready to release soon
  • spork-rails - has no indication of even a beta for rails 4
  • authlogic: binarylogic/authlogic#368
  • activeadmin/activeadmin#1963
@ericlathrop
ericlathrop / golang_fork_import_problems.md
Last active December 19, 2015 05:48
A description of problems working with forked repositories in Go.

Say there's a Go app at github.com/supermighty/app, which has a package a that references b. If I fork that repository to github.com/ericlathrop/app, now the local file $GOPATH/github.com/ericlathrop/app/a/something.go still has the line

import ("github.com/supermighty/app/b")

so when I edit $GOPATH/github.com/ericlathrop/app/b/something.go, my changes are never seen in a because it's still using the original copy of b!

The workaround is to symlink the original repository path to the fork's path:

Versioning is an anti-pattern
=============================
We often say "use the right tool for the job", but when managing change
in software systems, we always use versioning. Hypermedia APIs are
actually hindered by introducing versioning and manage change in a
different way. With that in mind, there are also a lot of options for
managing change in a Hypermedia API. We'd like to change our service and
break as few clients as possible. Versioning is only one way to manage
change, though... and my contention is that it's not appropriate for
@nathany
nathany / gist:5145088
Created March 12, 2013 17:36
Checking sass syntax in a Rails app
sass -c -I app/assets/stylesheets/ app/assets/stylesheets/**/*.scss
@vanstee
vanstee / env.sample.js
Created December 29, 2011 21:32 — forked from jmreidy/env.sample.js
Pivotal to Sprintly importer
module.exports = {
pivotal: {
TOKEN: 'TOKEN'
PID: 'PID',
},
sprintly: {
USER: "USER_EMAIL",
ID: 'PRODUCT_ID',
KEY: 'API_KEY'
},
@kennethreitz
kennethreitz / Procfile
Created July 9, 2011 01:53 — forked from pkqk/Procfile
Python on Heroku cedar stack
web: bin/python test-webapp.py
@teich
teich / gist:1000964
Created May 31, 2011 17:53
May 31st Heroku Updates
@jesseproudman
jesseproudman / Auto Scale API Mashup.rb
Created March 16, 2011 18:51
Logic for simple Auto Scale setup
require 'rubygems'; require 'active_resource'; require 'new_relic_api'
servers = File.open("server_count.txt", "r").first.to_i
instances_per_server = 6
cpu_burn_for_system = 1000.0 * 0.20
NewRelicApi.api_key = "<Your API Key>"
account = NewRelicApi::Account.find(:first);
application = account.applications[3];
director routing_mesh round-robin {
{
.backend = {
.host = "...some ip...";
.port = "...some port...";
.first_byte_timeout = 90s;
.between_bytes_timeout = 90s;
}
# ...more backends...
}