Skip to content

Instantly share code, notes, and snippets.

I may be slow to respond.

Feix C feix

I may be slow to respond.
  • Beijing
Block or report user

Report or block feix

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
# usage python filename
import sys,os
import struct
class WxapkgFile:
nameLen = 0
name = ""
hongster / tcp_timeout.go
Created Oct 2, 2015
Golang example on handling TCP connection and setting timeout.
View tcp_timeout.go
package main
import (
func handleConnection(conn net.Conn) {
tylerneylon / json.lua
Last active Jan 26, 2020
Pure Lua json library.
View json.lua
--[[ json.lua
A compact pure-Lua JSON library.
The main functions are: json.stringify, json.parse.
## json.stringify:
This expects the following to be true of any tables being encoded:
* They only have string or number keys. Number keys must be represented as
strings in json; this is part of the json spec.
chrisdarroch / idea
Created Oct 17, 2013
Open a project in IntelliJ IDEA from your command line!
View idea
# check for where the latest version of IDEA is installed
IDEA=`ls -1d /Applications/IntelliJ\ * | tail -n1`
# were we given a directory?
if [ -d "$1" ]; then
# echo "checking for things in the working dir given"
wd=`ls -1d "$1" | head -n1`
hrldcpr /
Last active Jan 22, 2020
one-line tree in python

One-line Tree in Python

Using Python's built-in defaultdict we can easily define a tree data structure:

def tree(): return defaultdict(tree)

That's it!

You can’t perform that action at this time.