... or Why Pipelining Is Not That Easy
Golang Concurrency Patterns for brave and smart.
By @kachayev
$ LD_PRELOAD=$PWD/sendmsg.so dig twitter.com @8.8.8.8 | |
;; Warning: Message parser reports malformed message packet. <-- malformed 因为把压缩指针当作域名一部分了 | |
;; Question section mismatch: got twitter.com/RESERVED0/CLASS256 | |
; <<>> DiG 9.9.5-3-Ubuntu <<>> twitter.com @8.8.8.8 | |
;; global options: +cmd | |
;; Got answer: | |
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 44722 | |
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1 |
/* | |
* Nunjucks + Express | |
* I couldn't find anything that helped me setup the enviornment | |
* correctly for these in the latest vesion of Express 4 (at the time | |
* of writing this). | |
* | |
* This Gist for those that want to keep using Nunjucks with Express 4. | |
* This also goes over working with a Nunjucks environment to use custom | |
* filters, extensions, etc. | |
* |
#!/usr/bin/env python | |
#coding=utf-8 | |
# | |
# Generate a list of dnsmasq rules with ipset for gfwlist | |
# | |
# Copyright (C) 2014 http://www.shuyz.com | |
# Ref https://code.google.com/p/autoproxy-gfwlist/wiki/Rules | |
import urllib2 | |
import re |
... or Why Pipelining Is Not That Easy
Golang Concurrency Patterns for brave and smart.
By @kachayev
Ubuntu 12.04 下制作 OpenWRT iptables geoip 数据库文件
xtables-addons-x.x.tar.xz
,解压并进入./configure
make
make install
import java.nio.file.Files | |
import java.nio.file.Paths | |
import scala.Array.canBuildFrom | |
import scala.collection.JavaConverters.iterableAsScalaIterableConverter | |
import scala.concurrent.ExecutionContext.Implicits.global | |
import org.elasticsearch.client.transport.TransportClient | |
import org.elasticsearch.common.settings.ImmutableSettings | |
import org.elasticsearch.common.transport.InetSocketTransportAddress |
package main | |
import ( | |
"io" | |
"log" | |
"os" | |
"os/exec" | |
"io/ioutil" | |
"bytes" | |
) |
Instructions for setting up a git server on a Synology NAS with Diskstation. Specifically, I am using a DS414 with DSM 5.0.
gituser
via Diskstation interface (with File Station and WebDAV privilages)git
(located at /volume1/git
) with read/write access for gituser
and admin
. This folder will hold all the repos.package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
"html/template" | |
"github.com/gorilla/sessions" |