Skip to content

Instantly share code, notes, and snippets.

View Andrew-liu's full-sized avatar

Andrew-liu Andrew-liu

View GitHub Profile
@Andrew-liu
Andrew-liu / client.go
Created October 14, 2016 08:37 — forked from jordanorelli/client.go
rpc server example in go
package main
import (
"bufio"
"log"
"net/rpc"
"os"
)
func main() {

C++ source code snippets

Represent one byte

using Byte = std::uint8_t;

Represent a dynamic number of bytes

#include <vector>
# coding: utf-8
import types
class Task(object):
taskid = 0
def __init__(self, target):
Task.taskid += 1
self.tid = Task.taskid
@Andrew-liu
Andrew-liu / tornado_cookie_secret_generator.py
Created November 10, 2015 04:00 — forked from didip/tornado_cookie_secret_generator.py
Generates secure cookie secret for Tornado Web Framework