Skip to content

Instantly share code, notes, and snippets.

View laeshiny's full-sized avatar

laeshiny laeshiny

  • Cargocall
  • Seoul, Korea
View GitHub Profile
@ik5
ik5 / time_format.go
Created November 9, 2016 09:04
A full example of all possible time formats in Golang
package main
import (
"fmt"
"time"
)
func main() {
fmt.Println("Times: ")
t := time.Now()
@sethamclean
sethamclean / walk generator
Created March 10, 2014 22:21
filepath.walk go routine generator
package main
import (
"path/filepath"
"fmt"
"os"
)
func main(){
location := "../gocode/"
@ardan-bkennedy
ardan-bkennedy / GoMgoSample-1.go
Last active February 27, 2021 08:31
Sample Go and MGO example
type (
// BuoyCondition contains information for an individual station.
BuoyCondition struct {
WindSpeed float64 `bson:"wind_speed_milehour"`
WindDirection int `bson:"wind_direction_degnorth"`
WindGust float64 `bson:"gust_wind_speed_milehour"`
}
// BuoyLocation contains the buoy's location.
BuoyLocation struct {
@simonista
simonista / .vimrc
Last active May 1, 2024 19:47
A basic .vimrc file that will serve as a good template on which to build.
" Don't try to be vi compatible
set nocompatible
" Helps force plugins to load correctly when it is turned back on below
filetype off
" TODO: Load plugins here (pathogen or vundle)
" Turn on syntax highlighting
syntax on
@border
border / mgoExample.go
Created August 27, 2012 15:33
mgo example
package main
import (
"fmt"
"labix.org/v2/mgo"
"labix.org/v2/mgo/bson"
"time"
)
type Person struct {