This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package templates | |
import( | |
"html/template" | |
"io" | |
"os" | |
"strings" | |
"path/filepath" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from os.path import isdir, splitext | |
from urlparse import urlparse | |
from urllib import unquote | |
import sys | |
import os | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <map> | |
#include <stdexcept> | |
#include <sstream> | |
#include <string> | |
#include <vector> | |
using std::cout; | |
using std::endl; | |
using std::istringstream; |
PEP: 8
Title: Style Guide for Python Code
- Author: Guido van Rossum <[email protected]>,
- Barry Warsaw <[email protected]>, Nick Coghlan <[email protected]>
Created: 05-Jul-2001
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PACKAGE=oracle-jdk-7 | |
PACKAGE_VIRTUAL=oracle-jdk | |
VERSION_MAJOR=7 | |
VERSION_MINOR=60 | |
VERSION="${VERSION_MAJOR}u${VERSION_MINOR}" | |
BUILD=b19 | |
PKG_BASENAME="jdk-$VERSION-linux-x64.tar.gz" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding: utf-8 | |
''' | |
中国联不通每月通话时间统计 | |
用法: | |
1. 去 http://iservice.10010.com/ 下载通话详单(Excel 格式),导出为 CSV | |
2. ./sumup.py *.csv | |
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ mtr -u --report douban.com | |
HOST: zerus Loss% Snt Last Avg Best Wrst StDev | |
1.|-- 115.182.xx.x 0.0% 10 0.3 0.3 0.3 0.3 0.0 | |
2.|-- 60.195.255.109 0.0% 10 0.6 0.6 0.6 0.8 0.1 | |
3.|-- 219.239.92.10 30.0% 10 49.4 37.8 2.2 63.4 22.2 | |
4.|-- ??? 100.0 10 0.0 0.0 0.0 0.0 0.0 | |
5.|-- 10.244.1.25 90.0% 10 16.7 16.7 16.7 16.7 0.0 | |
6.|-- ms-a-02-vlan10.dxt-idc.ne 70.0% 10 11.1 6.9 1.9 11.1 4.7 | |
7.|-- ??? 100.0 10 0.0 0.0 0.0 0.0 0.0 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local window = require "mjolnir.window" | |
local hotkey = require "mjolnir.hotkey" | |
local desiredWidth = 1024 | |
local desiredHeight = 768 | |
hotkey.bind({"cmd", "shift"}, "m", function() | |
local win = window.focusedwindow() | |
local screenBounds = win:screen():frame() | |
local destX = (screenBounds.w - desiredWidth) / 2 + screenBounds.x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name backend; | |
root /usr/share/nginx/www; | |
index index.html index.html; | |
location / { | |
header_filter_by_lua ' |