Glide is the easiest way to create useful slide for all of your Gists.
- input key
<-
to go backward. - input key
->
to go forward.
package main | |
import ( | |
"runtime" | |
) | |
func worker(done chan bool) { | |
// do something | |
location /mruby_regexp { | |
mruby_content_handler_code ' | |
re = Regexp.compile("(.)(.)") | |
re.match("ab") | |
result = Regexp.last_match.class == MatchData and | |
Regexp.last_match[0] == "ab" and | |
Regexp.last_match[1] == "a" and |
<?php | |
$id = 'testtest'; | |
$test_data = array(); | |
$mem = new Memcached; | |
$mem->addServer('/var/run/memcached.sock', 0); | |
if (count($argv) < 2) { | |
echo "few argument" . PHP_EOL; |
<?php | |
$id = 'testtest'; | |
$test_data = array(); | |
$mem = new Memcache; | |
$mem->connect('unix:///var/run/memcached.sock', 0, 10); | |
if (count($argv) < 2) { | |
echo "few argument" . PHP_EOL; |
location /modify_proxy_host { | |
# Hostヘッダが書き換わらない | |
# mruby_rewrite_handler_code ' | |
# hin = Nginx::Headers_in.new | |
# hin["Host"] = "localhost:8001" | |
# '; | |
# これなら書き換わる | |
mruby_set_code $proxy_host "'localhost:8001'"; |
$ go run rand.go | |
5 | |
$ go run rand.go | |
12 | |
$ go run rand.go | |
0 | |
$ |
ngx_feature="ngx_http_file_chunks_filter dependencies" | |
ngx_feature_name= | |
ngx_feature_run=no | |
ngx_feature_libs="-lxml2" | |
. auto/feature | |
if [ $ngx_found = no ]; then | |
exit | |
fi |
if (sz.angle) { | |
PixelWand *bg_color; | |
bg_color = NewPixelWand(); | |
PixelSetRed(bg_color, sz.cc.r / 255.0); | |
PixelSetGreen(bg_color, sz.cc.g / 255.0); | |
PixelSetBlue(bg_color, sz.cc.b / 255.0); | |
PixelSetAlpha(bg_color, sz.cc.a / 255.0); | |
switch (sz.angle) { | |
case 90: |
/** | |
* Copyright (c) 2013 Tatsuhiko Kubo <cubicdaiya@gmail.com> | |
* Copyright (c) ngx_mruby developers 2012- | |
* | |
* Use and distribution licensed under the MIT license. | |
* See LICENSE for full text. | |
* | |
*/ |