Skip to content

Instantly share code, notes, and snippets.

View ZoomQuiet's full-sized avatar
🖖
Sayeahooo

Zoom.Quiet ZoomQuiet

🖖
Sayeahooo
View GitHub Profile
@tonghuix
tonghuix / gnupg-infographic[zh-cn].svg
Created June 7, 2014 15:53
GnuPG-infographic Chinese Translation
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wanghailei
wanghailei / bbideolabs.py
Created June 6, 2014 03:51
Code snippets of BB IDEO LABS
# The following code and the code generated art works are the intellectrual properities of Hailei Wang.
# © 2010 - 2014, Hailei Wang. All rights reserved.
colors = ximport( "colors" )
font( "Courier", 200 )
align( CENTER )
text_path_line_1 = textpath( "IDEO", 0, 200, width = WIDTH)
text_path_line_2 = textpath( "LABS", 0, 350, width = WIDTH)
@wanghailei
wanghailei / csallseeingeye.py
Last active February 17, 2024 21:27
Code snippets of All Seeing Eye
# The following code and the code generated art works are the intellectrual properities of Hailei Wang.
# © 2009 - 2014, Hailei Wang. All rights reserved.
from nodebox import geo
colors = ximport("colors")
# Define Brush
def composeimage( x, y, colr, radius, points, diminish ) :
nofill()
stroke()
@wanghailei
wanghailei / cstsunami.py
Last active June 16, 2022 04:58
Code snippets of Tsunami
# The following code and the code generated art works are the intellectrual properities of Hailei Wang.
# © 2010 - 2014, Hailei Wang. All rights reserved.
cornu = ximport("cornu")
colors = ximport("colors")
# Painting waves
palette_for_wave = [ colors.hex( “#020034”, “dark blue” ), colors.hex( “#0A5CD6”, “aqua blue” ), colors.hex( “#FEFFFF”, “milk white” ) ]
# Draw Wave
@anthonyeden
anthonyeden / Python WExpect
Created January 18, 2014 10:40
Python's PExpect for Microsoft Windows: WExpect
"""Pexpect is a Python module for spawning child applications and controlling
them automatically. Pexpect can be used for automating interactive applications
such as ssh, ftp, passwd, telnet, etc. It can be used to a automate setup
scripts for duplicating software package installations on different servers. It
can be used for automated software testing. Pexpect is in the spirit of Don
Libes' Expect, but Pexpect is pure Python. Other Expect-like modules for Python
require TCL and Expect or require C extensions to be compiled. Pexpect does not
use C, Expect, or TCL extensions. It should work on any platform that supports
the standard Python pty module. The Pexpect interface focuses on ease of use so
that simple tasks are easy.
@ZoomQuiet
ZoomQuiet / moc-on-osx.md
Last active January 2, 2016 02:09 — forked from RobertAudi/moc-on-osx.md
Chinese verion and appended how to install ncurses for display mutli-byte words

MOCp on OS X 10.9 Mavericks with CJK

thanx: AzizLight/moc-on-osx.md

最近升级到 了 MAC OS X 10.9 Mavericks, 一直以来使用 brew 安装的 MOCP 这就不成了,决定折腾清楚,并分享大家

依赖 Requirements

@goldsmith
goldsmith / python_mavericks_guide.sh
Last active June 3, 2020 12:18
When I upgraded my Mac to OS X Mavericks, a lot of utilities (like Python, virtualenv, Xcode) broke, and it was pretty stressful trying to get it all set back up. Hopefully this guide can spare you some of that pain.Note: I'm by no means a Linux or Mac expert, so please fork and let me know if anything is redundant, incorrect, or missing!
# A guide to prevent pain and suffering while upgrading to OS X Mavericks
# This will vary greatly depending on system set up, so read the instructions carefully
# Back up Virtulenvs
####################
# Very important!
# For each virtualenv you have, run "pip freeze > requirements.txt" while in the activated virtualenv
# in order to prevent loss of dependencies during the upgrade.
@hanguokai
hanguokai / countUniqueRows.js
Last active December 20, 2015 15:19
统计 Google doc 电子表格的有效行数,一般用于报名表(表单回复)的人数统计,可以方便地知道当前的报名人数,并且以 email 作为唯一标示过滤重复的行。行数统计不包括电子表格中的第一行,因为第一行一般是标题而不是数据。
// email 所在的列,从0开始算。email 作为唯一标示,用于去重。
var emailColumn = 1;
// 电子表格的 doc key
key = "0AhIp-TG_44qxdHFnTDFUeDNOUEp2LVVpbmVMa25QQVE";
/**
* 统计报名人数,根据 email 唯一标示去除重复的报名。
*/
function countUniqueRows() {
@cloudsben
cloudsben / md-menu.html
Last active June 14, 2023 07:46
markdown menu
<link rel="stylesheet" href="http://yandex.st/highlightjs/6.2/styles/googlecode.min.css">
<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script src="http://yandex.st/highlightjs/6.2/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script type="text/javascript">
$(document).ready(function(){
$("h2,h3,h4,h5,h6").each(function(i,item){
var tag = $(item).get(0).localName;