Skip to content

Instantly share code, notes, and snippets.

View sunzhongwei's full-sized avatar
👋

Zhongwei Sun sunzhongwei

👋
View GitHub Profile
@sunzhongwei
sunzhongwei / 0_reuse_code.js
Last active August 29, 2015 14:20
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import time
import urllib2
from datetime import datetime
def work():
while 10 < datetime.now().hour < 15:
time.sleep(5)
/*
Copyright 2014 Zhongwei Inc.
Author: Zhongwei Sun
EMail: zhongwei.sun2008@gmail.com
$ ab -n 50 -c 5 http://localhost:9000/
*/
package main
@sunzhongwei
sunzhongwei / golang_slice_usage.go
Created October 9, 2013 05:46
Golang slice usage
package main
import (
"fmt"
"io/ioutil"
"net/http"
)
func fetch_web_page() {
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# ----------------------------------------
# DESCRIPTION
# ===========
# convert RGB to HTML color
# http://www.oschina.net/code/snippet_70229_2388
# ----------------------------------------