Skip to content

Instantly share code, notes, and snippets.

@lunny
lunny / diskinfo.go
Created March 28, 2014 08:59
Disk Info for Golang
package main
import (
"fmt"
"syscall"
)
type DiskStatus struct {
All uint64 `json:"all"`
Used uint64 `json:"used"`
@mufumbo
mufumbo / gist:6406055
Created September 1, 2013 17:44
proguard configuration that we use to shrink a spring-mvc project that is deployed on appengine. our goal was to reduce startup time and improve the issues with cold startup. we used spring-mvc, velocity and JDO
##---------------Begin: proguard configuration common for all Android apps ----------
-optimizationpasses 1
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontskipnonpubliclibraryclassmembers
-dontpreverify
-verbose
#-dump class_files.txt
#-printseeds seeds.txt
#-printusage unused.txt
@jedy
jedy / go_scp.go
Last active May 31, 2022 07:20
an example of scp in golang
// https://blogs.oracle.com/janp/entry/how_the_scp_protocol_works
package main
import (
"fmt"
"golang.org/x/crypto/ssh"
)
const privateKey = `content of id_rsa`