Skip to content

Instantly share code, notes, and snippets.

🎓
Academic

ZhiChen coder-chenzhi

🎓
Academic
Block or report user

Report or block coder-chenzhi

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
@coder-chenzhi
coder-chenzhi / update-dnsmasq-from-gfwlist.py
Created Sep 16, 2017 — forked from rambolee/update-dnsmasq-from-gfwlist.py
升级 小米路由器3 可以ssh 可以 Shadowsocks [Tags]: 小米路由, 小米路由3, 小米路由器, 小米路由器3, ssh, shadowsocks
View update-dnsmasq-from-gfwlist.py
#!/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
@coder-chenzhi
coder-chenzhi / expand.js
Last active Apr 13, 2017
expand acm proceedings automatically
View expand.js
// take the Proceedings of the 2016 24th ACM SIGSOFT International Symposium on Foundations of Software Engineering as example
// http://dl.acm.org/citation.cfm?id=2950290&CFID=749075976&CFTOKEN=83437356
num = 152 // last index of tag need to expand
for(i = 1; i < num + 1; i++){
try {
expandcollapse('expcoll'+i, i)
}
catch (err) {
// some index is missing, so will throw exception
}
@coder-chenzhi
coder-chenzhi / service-checklist.md
Created Nov 21, 2016 — forked from acolyer/service-checklist.md
Internet Scale Services Checklist
View service-checklist.md

Internet Scale Services Checklist

A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."

Basic tenets

  • Does the design expect failures to happen regularly and handle them gracefully?
  • Have we kept things as simple as possible?
View how-to-view-source-of-chrome-extension.md

Option 1: Command-line download extension as zip and extract

extension_id=jifpbeccnghkjeaalbbjmodiffmgedin   # change this ID
curl -L -o "$extension_id.zip" "https://clients2.google.com/service/update2/crx?response=redirect&os=mac&arch=x86-64&nacl_arch=x86-64&prod=chromecrx&prodchannel=stable&prodversion=44.0.2403.130&x=id%3D$extension_id%26uc" 
unzip -d "$extension_id-source" "$extension_id.zip"

Thx to crxviewer for the magic download URL.

View Performance of Flask, Tornado, GEvent, and their combinations.md

Performance of Flask, Tornado, GEvent, and their combinations

Wensheng Wang, 10/1/11

Source: http://blog.wensheng.org/2011/10/performance-of-flask-tornado-gevent-and.html

When choosing a web framework, I pretty much have eyes set on Tornado. But I heard good things about Flask and Gevent. So I tested the performance of each and combinations of the three. I chose something just a little more advanced than a "Hello World" program to write - one that use templates. Here are the codes:

1, Pure Flask (pure_flask.py)

@coder-chenzhi
coder-chenzhi / Monitorama PDX 2014
Created Apr 7, 2016
All Monitorama PDX 2014 talks with slides links
View Monitorama PDX 2014
Main Talks:
-----------
Please, no More Minutes, Milliseconds, Monoliths... or Monitoring Tools!
Adrian Cockcroft
http://vimeo.com/95064249
http://www.slideshare.net/adriancockcroft/monitorama-please-no-more
Computers are a Sadness, I am the Cure
James Mickens
http://vimeo.com/95066828
@coder-chenzhi
coder-chenzhi / gist:f131411eb68250b377ef
Created Nov 14, 2015 — forked from observerss/gist:3798922
Google Keyword Tool Scraper(casperjs version)
View gist:f131411eb68250b377ef
// EDIT: 2013/10/20
// google has updated its kwt UI, this script doesn't work any more!
// may be I will update this script when I have time to investigate their new Interface.
// requires
var utils = require('utils');
var casper = require('casper').create()
var casper = require('casper').create({
verbose: true,
View AgentInstaller.java
public class AgentInstaller {
/** The created agent jar file name */
protected static final AtomicReference<String> agentJar = new AtomicReference<String>(null);
/**
* Self installs the agent, then runs a person sayHello in a loop
* @param args None
*/
public static void main(String[] args) {
You can’t perform that action at this time.