Skip to content

Instantly share code, notes, and snippets.

View anarcher's full-sized avatar
😞

myoung-su,shin anarcher

😞
View GitHub Profile
@anarcher
anarcher / ab_D.log
Last active December 31, 2015 12:09
D(vibe.d) vs Go For Simple HTTP Server
#Using DMD
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 127.0.0.1 (be patient)
Completed 5000 requests
Completed 10000 requests
Completed 15000 requests
Completed 20000 requests
@anarcher
anarcher / DockerUbuntuInitRun.txt
Last active December 30, 2015 03:28
docker ubuntu /sbin/init
From: https://github.com/dotcloud/docker/issues/2276
Use the script like this:
git clone https://github.com/makinacorpus/vms.git
cd docker
./make.sh make_image ubuntu
package main
import (
"fmt"
"math/rand"
"runtime"
"time"
)
func makeBuffer() []byte {
(defun global-text-scale-adjust (inc) (interactive)
(text-scale-set 1)
(kill-local-variable 'text-scale-mode-amount)
(setq-default text-scale-mode-amount (+ text-scale-mode-amount inc))
(global-text-scale-mode 1)
)
(global-text-scale-adjust 3)
@anarcher
anarcher / markdown.go
Last active December 10, 2015 06:28
markdown-example.go
package main
import "github.com/knieriem/markdown"
import "strings"
import "fmt"
import "bytes"
func main() {
s := `
@anarcher
anarcher / gist:4385850
Created December 27, 2012 06:08
python loop
ks = json_response['response'].keys()
fi =1
ti=200
for i in ks:
for i in range(fi,ti):
# blurblur
fi += 200
ti += 200
if i == 'nodata':
@anarcher
anarcher / ab - scala-hawtdispatch-nio simple static server (incomplete)
Last active December 10, 2015 02:28
scala - hawtdispatch - nio vs single process node (static serving)
╰─$ ab -c100 -n100000 "http://localhost:3333/build.sbt"
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking localhost (be patient)
Completed 10000 requests
Completed 20000 requests
Completed 30000 requests
Completed 40000 requests
@anarcher
anarcher / gist:4231717
Created December 7, 2012 08:10
nodeload test
test
@anarcher
anarcher / tractatus.markdown
Created August 22, 2012 07:43
트락타투스

"어떤 한 일이 일어났기 때문에 또 다른 어떤 일을 일으키는 강제성은 없다. 존재하는 유일한 필요성은 오직 논리적 필요성이다. 세상의 모든 현재적 개념은, 흔히 말하는 자연의 법칙에 자연 현상을 설명하는 것이라는 착각에 기초한다." (6.37 ~ .371)

@anarcher
anarcher / gist:2817945
Created May 28, 2012 08:05
scala coding battle
아래의 CSV을 읽어서 Trie 자료구조를 이용한 autocomplete을 구해보아요.
> sbt run sca
"scalastyle","133"
"scala-io","107"
"scala-arm","98"
trie data structure : http://en.wikipedia.org/wiki/Trie
stack overflow tags : http://data.stackexchange.com/stackoverflow/query/71219/tags-by-number-of-views (Run query를 클릭하면 CSV파일로 다운로드 받을 수 있습니다)