Skip to content

Instantly share code, notes, and snippets.

# 单行注释
""" 多行字符串可以用
三个引号包裹,不过这也可以被当做
多行注释
"""
####################################################
## 1. 原始数据类型和操作符
####################################################
@PeterDing
PeterDing / xiami_vip_linux.py
Last active April 9, 2017 18:34
在linux上,下载 xiami.com 320Kbps mp3 -- # 移到仓库 https://github.com/PeterDing/iScript
#!/usr/bin/env python2
# vim: set fileencoding=utf8
import re, sys, os, random, time, json, logging, argparse, requests, urllib
from mutagen.id3 import ID3,TRCK,TIT2,TALB,TPE1,APIC,TDRC,COMM,TPOS,USLT
from HTMLParser import HTMLParser
parser = HTMLParser()
s = u'\x1b[1;%dm%s\x1b[0m' # terminual color template
@kendellfab
kendellfab / goto-sublime
Created August 1, 2013 20:53
Add mouse click `goto definition` in sublime text 3.
Linux - create "Default (Linux).sublime-mousemap" in ~/.config/sublime-text-3/Packages/User
Mac - create "Default (OSX).sublime-mousemap" in ~/Library/Application Support/Sublime Text 3/Packages/User
Win - create "Default (Windows).sublime-mousemap" in %appdata%\Sublime Text 3\Packages\User
[
{
"button": "button1",
"count": 1,
"modifiers": ["ctrl"],
"press_command": "drag_select",
@ragingwind
ragingwind / Backend Architectures Keywords and References.md
Last active March 21, 2025 15:01
Backend Architectures Keywords and References
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active April 20, 2025 23:00
A badass list of frontend development resources I collected over time.
@epicserve
epicserve / redis_key_sizes.sh
Last active February 21, 2025 22:37
A simple script to print the size of all your Redis keys.
#!/usr/bin/env bash
# This script prints out all of your Redis keys and their size in a human readable format
# Copyright 2013 Brent O'Connor
# License: http://www.apache.org/licenses/LICENSE-2.0
human_size() {
awk -v sum="$1" ' BEGIN {hum[1024^3]="Gb"; hum[1024^2]="Mb"; hum[1024]="Kb"; for (x=1024^3; x>=1024; x/=1024) { if (sum>=x) { printf "%.2f %s\n",sum/x,hum[x]; break; } } if (sum<1024) print "1kb"; } '
}
@SaitoWu
SaitoWu / graph.rb
Last active December 25, 2017 07:30
Github Contribution Graph
require 'date'
author = "Saito"
email = "[email protected]"
date = Date.new(2012, 7, 30)
s = %w{
. . . . . . .
. . o o o . .
. o . . . . .
BIN = ./node_modules/.bin
SRC = $(wildcard src/*.coffee)
LIB = $(SRC:src/%.coffee=lib/%.js)
build: $(LIB)
lib/%.js: src/%.coffee
@mkdir -p $(@D)
@$(BIN)/coffee -bcp $< > $@
@jpetazzo
jpetazzo / README.md
Last active August 21, 2019 17:55
Give network superpowers to docker

Unionize: network superpowers for your docker containers

Unionize lets you connect together docker containers in arbitrarily complex scenarios.

Note: I recommend to use https://github.com/jpetazzo/pipework instead.

  • pipework is a better name than unionize
  • it's hosted on a "real" github repo instead of a small gist :-)

Now if you want Unionize, it's still here. Just check those examples.

anonymous
anonymous / 广外视频电影精选下载列表.txt
Created April 29, 2013 10:59
广外视频电影精选下载列表
北京遇上西雅图: http://202.116.194.117/G/内地/喜剧/北京遇上西雅图.rmvb
双狙人3: http://202.116.194.117/G/欧美/悬疑/双狙人3.rmvb
双狙人2: http://202.116.194.117/G/欧美/悬疑/双狙人2.rmvb
双狙人1: http://202.116.194.117/G/欧美/悬疑/双狙人1.rmvb
钢铁侠2(下): http://202.116.194.117/G/欧美/剧情/钢铁侠2(下).avi
钢铁侠2(上): http://202.116.194.117/G/欧美/剧情/钢铁侠2(上).avi
钢铁侠1(下): http://202.116.194.117/G/欧美/剧情/钢铁侠1(下).avi
钢铁侠1(上): http://202.116.194.117/G/欧美/剧情/钢铁侠1(上).avi
忠烈杨家将: http://202.116.194.117/G/港台/动作/忠烈杨家将.rmvb
480想你E21ENDMOTO@TGHD-muxed: http://202.116.194.117/G/日韩/剧情/480 想你E21 END [email protected]