Skip to content

Instantly share code, notes, and snippets.

Alexey dastier

Block or report user

Report or block dastier

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
colynb / server.go
Created Jun 13, 2017
Stupid JSON server in golang
View server.go
package main
import (
type Person struct {
ID int `json:"id"`
Firstname string `json:"firstname"`
noromanba /
Created Dec 25, 2016
how to disable apt-daily.timer

how to disable apt-daily.timer

$ systemctl stop apt-daily.timer
$ systemctl disable apt-daily.timer
$ systemctl mask apt-daily.service
$ systemctl daemon-reload

check current status

mastef / isexist_vs_isnotexist.go
Created Feb 4, 2016
os.IsExist(err) vs os.IsNotExist(err)
View isexist_vs_isnotexist.go
Watch out, os.IsExist(err) != !os.IsNotExist(err)
They are error checkers, so use them only when err != nil, and you want to handle
specific errors in a different way!
Their main purpose is to wrap around OS error messages for you, so you don't have to test
for Windows/Unix/Mobile/other OS error messages for "file exists/directory exists" and
"file does not exist/directory does not exist"
jniltinho / myip.go
Created Mar 26, 2014
Get My IP Golang
View myip.go
package main
import (
You can’t perform that action at this time.