Skip to content

Instantly share code, notes, and snippets.

View NaniteFactory's full-sized avatar
😊
Hi

NaniteFactory

😊
Hi
View GitHub Profile
@ryanfitz
ryanfitz / golang-nuts.go
Created December 2, 2012 22:45
two ways to call a function every 2 seconds
package main
import (
"fmt"
"time"
)
// Suggestions from golang-nuts
// http://play.golang.org/p/Ctg3_AQisl
@liubin
liubin / cookie.go
Created June 4, 2013 12:44
display cookie in go lang
@JalfResi
JalfResi / revprox.go
Last active May 2, 2024 13:27
Simple reverse proxy in Go
package main
import(
"log"
"net/url"
"net/http"
"net/http/httputil"
)
func main() {
@rolaveric
rolaveric / reverseProxy.go
Created February 23, 2014 06:25
Example of a reverse proxy written in Go
import (
"net/http"
"net/http/httputil"
"net/url"
"fmt"
)
func main() {
// New functionality written in Go
http.HandleFunc("/new", func(w http.ResponseWriter, r *http.Request) {
@jonikarppinen
jonikarppinen / markdown-comments.md
Last active April 21, 2024 23:44
How to comment out stuff in Markdown on GitHub?

Comments in GitHub flavour of Markdown

As answers to this Stack Overflow question reveal, using <!--- and ---> or <!-- and --> works (view source by clicking "Raw"):

@jrnewell
jrnewell / go-path.cmd
Last active May 22, 2018 10:25
Set current directory to GOPATH on MS Windows cmd
@echo off
goto START
-------------------------------------------------------
go-path.bat
set the GOPATH to current directory
Created Sat May 3 20:00:00 2014
@montanaflynn
montanaflynn / proxy.go
Last active January 17, 2021 15:37
Golang reverse proxy
package main
import (
"log"
"net/http"
"net/http/httputil"
)
func main() {
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
@joyrexus
joyrexus / README.md
Created February 23, 2015 22:11
boltdb demo
@ihoneymon
ihoneymon / how-to-write-by-markdown.md
Last active May 4, 2024 04:19
마크다운(Markdown) 사용법

[공통] 마크다운 markdown 작성법

영어지만, 조금 더 상세하게 마크다운 사용법을 안내하고 있는
"Markdown Guide (https://www.markdownguide.org/)" 를 보시는 것을 추천합니다. ^^

아, 그리고 마크다운만으로 표현이 부족하다고 느끼신다면, HTML 태그를 활용하시는 것도 좋습니다.

1. 마크다운에 관하여

@thekarel
thekarel / gcd.go
Created April 11, 2015 22:10
GCD in go
package main
import (
"fmt"
"math"
)
func gcd(a, b int) int {
for b != 0 {
rem := math.Mod(float64(a), float64(b))