Skip to content

Instantly share code, notes, and snippets.

View nathany's full-sized avatar
🙃

Nathan Youngman nathany

🙃
View GitHub Profile
@teich
teich / gist:1000964
Created May 31, 2011 17:53
May 31st Heroku Updates
@kennethreitz
kennethreitz / Procfile
Created July 9, 2011 01:53 — forked from pkqk/Procfile
Python on Heroku cedar stack
web: bin/python test-webapp.py
@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'
},
@jbgo
jbgo / debug_system_stack_error.md
Created January 9, 2013 15:08
debug SystemStackError in ruby 1.9

This is how I debug SystemStackError when there is no stack trace.

My first attempt was:

begin
  a_method_that_causes_infinite_recursion_in_a_not_obvious_way
rescue SystemStackError
  puts caller
end
@rwjblue
rwjblue / readme.md
Last active May 13, 2016 18:10
Guide to using drip with JRuby

#Overview drip is an awesome command line tool that can be used to dramatically lower perceived JVM startup time. It does this by preloading an entirely new JVM process\instance and allowing you to simply use the preloaded environment. This has extraordinary results with jruby.

We reduced time to run rake environment from 13 seconds to a mere 3.5 seconds. This is actually at or near MRI 1.9.3p327 (with falcon patch) speeds!

Adding a few addition jruby options will reduce startup time even further (down to 1.69 seconds).

#Install Drip Install drip if you haven't already (see https://github.com/flatland/drip)

@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
@untitaker
untitaker / gist:5321447
Last active January 15, 2017 18:13
Werkzeug Python 3 notes
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
@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:

@mattetti
mattetti / multipart_upload.go
Last active April 22, 2024 05:24
Example of doing a multipart upload in Go (golang)
package main
import (
"bytes"
"fmt"
"io"
"log"
"mime/multipart"
"net/http"
"os"