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
colynb / server.go
Created Jun 13, 2017
Stupid JSON server in golang
View server.go
package main
import (
"net/http"
"encoding/json"
)
type Person struct {
ID int `json:"id"`
Firstname string `json:"firstname"`
@noromanba
noromanba / apt-daily-timer-disable.md
Created Dec 25, 2016
how to disable apt-daily.timer
View apt-daily-timer-disable.md

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
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
jniltinho / myip.go
Created Mar 26, 2014
Get My IP Golang
View myip.go
package main
/*
URL: https://github.com/mccoyst/myip/blob/master/myip.go
URL: http://changsijay.com/2013/07/28/golang-get-ip-address/
*/
import (
"net"
"os"
You can’t perform that action at this time.