Skip to content

Instantly share code, notes, and snippets.

View nathany's full-sized avatar
🙃

Nathan Youngman nathany

🙃
View GitHub Profile
@dansimau
dansimau / go.sh
Last active November 30, 2017 17:02
Bash functions for navigating Go workspaces ("Go-go!")
#
# Change to the directory of the specified Go package name.
#
gg() {
paths=($(g "$@"))
path_index=0
if [ ${#paths[@]} -gt 1 ]; then
c=1
@curtisallen
curtisallen / Readme.md
Created May 1, 2017 19:22
Danger with gometalinter

Using gometalinter with Danger

Run your gometalinter command in CI with the --json command save output to a file e.g. lint.json

	go list -f '{{.Dir}}' ./... | grep -v 'vendor' | xargs gometalinter --vendored-linters --json > lint.json

Add the following to Dangerfile

# Show lint errors
@untitaker
untitaker / gist:5321447
Last active January 15, 2017 18:13
Werkzeug Python 3 notes
@FiloSottile
FiloSottile / README.md
Last active July 20, 2016 20:15
Homebrew Formula for musl-based GCC cross-compilers.
@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)

@mythz
mythz / cash-register-spec.coffee
Created May 21, 2011 02:20
Peepcode cash resgister example of using Jasmine with CoffeeScript
describe "Dish", ->
describe "constructor", ->
beforeEach ->
@dish = new Dish 'Sirloin Steak $18.99 mains'
it "extracts title", ->
(expect @dish.title).toEqual('Sirloin Steak')
defmodule App.Mixfile do
use Mix.Project
def project do
[app: :app,
version: "0.0.1",
elixir: "~> 1.2",
elixirc_paths: elixirc_paths(Mix.env),
compilers: [:phoenix] ++ Mix.compilers,
build_embedded: Mix.env == :prod,
@hash
hash / ideas.txt
Last active December 26, 2015 06:39
Go Package Management
Go Package Management
interface type version
type version interface {
string Version()
}
@hajimehoshi
hajimehoshi / main.go
Created October 4, 2013 17:30
Show a Cocoa window by Go
package main
// #cgo CFLAGS: -x objective-c
// #cgo LDFLAGS: -framework Cocoa
// #import <Cocoa/Cocoa.h>
//
// void run() {
// @autoreleasepool {

On heroku compiles are done without environment variables. Why?

If you compile the same source code you will ge the exact same compiled app output every time.

This is determinisim. The app build is deterministic.

If you allow environment variables at build time, the output of the app is no-longer deterministic based soley on the code. You can deploy the same code and get different results.

If you are using user-env-compile your app builds are now non-deterministic.