Skip to content

Instantly share code, notes, and snippets.

View collinvandyck's full-sized avatar
🏠
Working from home

Collin Van Dyck collinvandyck

🏠
Working from home
View GitHub Profile
package main
import "testing"
type Foo struct {
}
func (f *Foo) Hi() {
}
import (
"fmt"
"reflect"
"strings"
)
type ToStringer struct {
pieces []string
}
@collinvandyck
collinvandyck / alloc_test.go
Created February 13, 2014 03:27
pass by value vs pass by reference
package main
import "testing"
type Stuff struct {
Hello string
Goodbye string
Slice []string
}
@collinvandyck
collinvandyck / gist:8813404
Created February 4, 2014 22:12
lol what the fuck javascript developers
controller('MainCtrl', function(
$window,
$location
){
this.switch = function() {
$location.path('/alt' === $location.path() ? '/' : '/alt');
};
});
@collinvandyck
collinvandyck / deepequal_test.go
Created January 29, 2014 00:32
damn reflect you slow but i still <3 you
package main
import (
"reflect"
"testing"
)
func BenchmarkMapsEqualsManual(b *testing.B) {
m1 := newMap()
m2 := newMap()
% http https://www.howsmyssl.com/a/check
http: error: SSLError: [Errno 1] _ssl.c:504: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
~/code/go/src/github.com/ryandotsmith/l2met [integration*]% ls -l ~/.vim/bundle
total 8
drwxr-xr-x 8 cvandyck staff 272 Sep 17 16:24 ack.vim
drwxr-xr-x 8 cvandyck staff 272 Sep 3 09:44 ctrlp.vim
lrwxr-xr-x 1 cvandyck staff 22 Oct 1 15:58 go-vim -> /usr/local/go/misc/vim
drwxr-xr-x 11 cvandyck staff 374 Sep 3 09:44 nerdtree
drwxr-xr-x 19 cvandyck staff 646 Oct 2 12:00 vim-coffee-script
drwxr-xr-x 11 cvandyck staff 374 Sep 19 10:41 vim-json
drwxr-xr-x 5 cvandyck staff 170 Sep 3 09:44 vim-sensible
exec "$JAVACMD" \
$MAVEN_OPTS \
-classpath "${M2_HOME}"/boot/plexus-classworlds-*.jar \
"-Dclassworlds.conf=${M2_HOME}/bin/m2.conf" \
"-Dmaven.home=${M2_HOME}" \
${CLASSWORLDS_LAUNCHER} "$@"
<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>7</version>
</parent>
@collinvandyck
collinvandyck / example output
Last active December 22, 2015 08:19
This is how you'd go about installing the latest snapshot version Note that this only works producing dev builds locally.
/tmp % git clone git@github.com:librato/metrics-librato.git
Cloning into 'metrics-librato'...
remote: Counting objects: 466, done.
remote: Compressing objects: 100% (184/184), done.
remote: Total 466 (delta 155), reused 440 (delta 131)
Receiving objects: 100% (466/466), 63.89 KiB | 0 bytes/s, done.
Resolving deltas: 100% (155/155), done.
Checking connectivity... done
/tmp % cd metrics-librato/
/tmp/metrics-librato