Skip to content

Instantly share code, notes, and snippets.


Matias Forbord codeluggage

View GitHub Profile
brock /
Last active May 1, 2021
Complete Node Reinstall. I've moved this to a repo at
# node-reinstall
# credit:
## program version
## path prefix
mrvdot / save.go
Created Nov 24, 2013
Convenience method to save any object into the GAE datastore using Go. For a full walk-though of what and why, see the article at
View save.go
func Save(c appengine.Context, obj interface{}) (key *datastore.Key, err error) {
kind, val := reflect.TypeOf(obj), reflect.ValueOf(obj)
str := val
if val.Kind().String() == "ptr" {
kind, str = kind.Elem(), val.Elem()
if str.Kind().String() != "struct" {
return nil, errors.New("Must pass a valid object to struct")
dsKind := kind.String()
sanatgersappa / alt.go
Last active Mar 28, 2020
Alternative handler for multiple file uploads in Go.
View alt.go
package main
import (
//Compile templates on start