Skip to content

Instantly share code, notes, and snippets.

Avatar

Danielle endocrimes

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am endocrimes on github.
  • I am endocrimes (https://keybase.io/endocrimes) on keybase.
  • I have a public key ASC1zNIXUCnFfJcUJj7kwv-xZBdtlDUIpahL2YSDqRkHkgo

To claim this, I am signing this object:

View github-rules.sieve
if
allof(
address :is "From" "notifications@github.com",
address :is "Cc" "mention@noreply.github.com"
)
{
fileinto "INBOX.notifications.github.direct-mention";
}
elsif
allof(
@endocrimes
endocrimes / docker-static-go.md
Last active Dec 4, 2017
Steps for distributing small Docker images for Go binaries
View docker-static-go.md

Distributing smol Docker images for Go binaries

Building a fully static go binary:

$ GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o build/linux-{{tool-name}} .

The Dockerfile

@endocrimes
endocrimes / Makefile
Last active Oct 8, 2017
Golang Makefile Template
View Makefile
CIRCLE_BUILD_NUM ?= DEV
TAG = 0.0.$(CIRCLE_BUILD_NUM)-$(shell git rev-parse --short HEAD)
GOCMD=go
GOBUILD=$(GOCMD) build
GOCLEAN=$(GOCMD) clean
GOTEST=$(GOCMD) test
GOGET=$(GOCMD) get
GOFILES = $(shell find . -name '*.go' -not -path './vendor/*')
View keybase.md
### Keybase proof
I hereby claim:
* I am dantoml on github.
* I am dantoml (https://keybase.io/dantoml) on keybase.
* I have a public key ASAjkfouBZLojGVHqDN3bX9TydSseSS_H90FZznaLop7aAo
To claim this, I am signing this object:
View keybase.md

Keybase proof

I hereby claim:

  • I am danieltomlinson on github.
  • I am dantoml (https://keybase.io/dantoml) on keybase.
  • I have a public key whose fingerprint is 9B34 AEB9 DEF9 E4C1 5CEC E6E7 35D2 D098 3CE4 3CC7

To claim this, I am signing this object:

@endocrimes
endocrimes / Observables.swift
Created Jul 14, 2014
A simple implementation of Observables in Swift
View Observables.swift
struct Observable<T> {
typealias Observer = (send:(newValue: T) -> ())
var observers = Dictionary<String, Observer>()
var value: T {
didSet {
_notify()
}
View gist:733ac393a2d9f865eea6
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *filePath = [documentsDirectory stringByAppendingPathComponent:@"temporarySong.m4a"];
NSURL *outputFileURL = [NSURL fileURLWithPath:filePath];
NSMutableDictionary *recordSetting = [[NSMutableDictionary alloc] init];
[recordSetting setValue:[NSNumber numberWithInt:kAudioFormatMPEG4AAC] forKey:AVFormatIDKey];
[recordSetting setValue:[NSNumber numberWithInteger:44100] forKey:AVSampleRateKey];
[recordSetting setValue:[NSNumber numberWithInt: 2] forKey:AVNumberOfChannelsKey];
View schedule.json
[
{
"type": "other",
"name": "Registration",
"time": "2014-06-12T09:30:00+00:00"
},
{
"type": "talk",
"speaker": {
"name": "Tom Harvey",
View pr.md

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 = git@github.com: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: