Skip to content

Instantly share code, notes, and snippets.

View rdallman's full-sized avatar

Reed Allman rdallman

View GitHub Profile
@rdallman
rdallman / ex2.go
Created October 20, 2017 23:21
go-fdk-ex-2
package main
import (
"context"
"encoding/json"
"fmt"
"io"
fdk "github.com/fnproject/fdk-go"
)
@rdallman
rdallman / ex1.go
Last active October 20, 2017 23:22
go-fdk-ex-1
package main
import (
"context"
"encoding/json"
"fmt"
"io"
"os"
)
Download the gist containing starter.vimrc.
Once you have that done, you will need to use an SFTP client of your choice
to move starter.vimrc to your home directory. FileZilla is an option if you
don't have one already.
Link: https://filezilla-project.org
You will just need the client.
@rdallman
rdallman / build.gradle
Created November 5, 2013 06:39
Android Gradle sign and increment version for release
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.6.+'
}
}
@rdallman
rdallman / goinstall.bash
Last active December 27, 2015 04:59
Installs go, gets go.tools, gets go-doctor (for internal use)
#!/bin/bash
#
# run with ./goinstall.bash USERNAME=yourusernamehere
# e.g. ./goinstall.bash USERNAME=rpa0003
# Install latest Go from source
# Setup GOROOT and GOPATH
# Install go.tools
# get go from source
sudo apt-get install mercurial
@rdallman
rdallman / pre-commit
Created October 7, 2013 03:58
pre-commit hook for golang projects that assures all tests pass and all files are gofmt'd
#!/bin/sh
status=0
IFS=$'\n'
for file in $(git diff --cached --name-only | grep -e '\.go$'); do
badfile="$(git --no-pager show :"$file" | gofmt -l)"
if test -n "$badfile" ; then
echo "git pre-commit check failed: file needs gofmt: $file"
status=1
fi