Skip to content

Instantly share code, notes, and snippets.

View lwzm's full-sized avatar
🎯
Focusing

Weizhao Li lwzm

🎯
Focusing
View GitHub Profile
@brantfaircloth
brantfaircloth / sphinx_to_github.sh
Created January 23, 2011 02:40
Sphinx documentation to github gh-pages without submodules
# assume the following directory structure where contents of doc/
# and source/ are already checked into repo., with the exception
# of the _build directory (i,e. you can check in _themes or _sources
# or whatever else).
#
# proj/
# source/
# doc/
# remove doc/_build/html if present
@JalfResi
JalfResi / revprox.go
Last active July 26, 2024 15:18
Simple reverse proxy in Go
package main
import(
"log"
"net/url"
"net/http"
"net/http/httputil"
)
func main() {
@kodekracker
kodekracker / gunicorn.py
Created September 10, 2015 07:47
A config file of gunicorn(http://gunicorn.org/) contains fundamental configuration.
# -*- coding: utf-8 -*-
# Gunicorn(v19.3) Configuration File
# Reference - http://docs.gunicorn.org/en/19.3/settings.html
#
# To run gunicorn by using this config, run gunicorn by passing
# config file path, ex:
#
# $ gunicorn --config=gunicorn.py MODULE_NAME:VARIABLE_NAME
#
@subfuzion
subfuzion / github-wiki-how-to.md
Last active July 14, 2024 05:33
GitHub Wiki How-To

How do I clone a GitHub wiki?

Any GitHub wiki can be cloned by appending wiki.git to the repo url, so the clone url for the repo https://myorg/myrepo/ is: git@github.com:myorg/myrepo.wiki.git (for ssh) or https://github.com/my/myrepo.wiki.git (for https).

You make edits, and commit and push your changes, like any normal repo. This wiki repo is distinct from any clone of the project repo (the repo without wiki.get appended).

How do I add images to a wiki page?

@lwzm
lwzm / test-tornado-async.py
Last active November 29, 2016 02:54
测试 tornado 的异步, 注意异步回调函数用 tornado.stack_context.wrap 还有一个协程的版本, 简直太帅了, 利用 future, 清晰明了
#!/usr/bin/env python3
import collections
import tornado.concurrent
import tornado.ioloop
import tornado.options
import tornado.web
import tornado.gen
import tornado.stack_context
@lwzm
lwzm / index.html
Last active November 28, 2017 10:10
ng-admin
<!doctype html>
<html lang="zh">
<head>
<title>My Ng Admin</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ng-admin@1.0.9/build/ng-admin.min.css">
</head>
<body ng-app="myApp" ng-strict-di>
<div ui-view="ng-admin"></div>
<script src="https://cdn.jsdelivr.net/npm/ng-admin@1.0.9/build/ng-admin.min.js"></script>
<script src="dist/bundle.js"></script>