apt-get install python-pip
pip install shadowsocks
sudo ssserver -p 443 -k password -m aes-256-cfb --user nobody -d start
This file contains hidden or 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 | |
# author: fengye | |
# usage: | |
# sh add-price.sh --width 96 --height 38.4 --fontSize 32 --text "123" --degree -43.47370302872064 --align west -x 16.823171983548807 -y 30.375512919950317 --source 800-mark.jpg --target 800-price2.jpg | |
while [[ $# -gt 1 ]] | |
do | |
key="$1" |
This file contains hidden or 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
Axure RP 7.0注册码 | |
用户名:axureuser | |
序列号:8wFfIX7a8hHq6yAy6T8zCz5R0NBKeVxo9IKu+kgKh79FL6IyPD6lK7G6+tqEV4LG |
This file contains hidden or 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
----- shadowsocks ------ | |
server | |
easy_install pip | |
pip install shadowsocks | |
vi /etc/shadowsocks.json | |
{ | |
"server":"server_ip", | |
"server_port":8388, | |
"local_address": "127.0.0.1", | |
"local_port":1080, |
This file contains hidden or 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
git log --name-only --date=short --pretty=format:"%Cblue%h %C(yellow)%aN %Creset%aI %Cgreen%s" |
This file contains hidden or 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
a={b:{c:1, e: {f:1}},d:2} | |
b = function(ks) { | |
var x = []; | |
ks.forEach(function(k) { | |
if(x.length) { | |
x.push(x[x.length - 1][k]); | |
} else { | |
x.push(a[k]); | |
} |
This file contains hidden or 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
var x = [ | |
{date:"2013-01-01",sales:99},{date:"2013-01-02",sales:99},{date:"2013-01-03",sales:99},{date:"2013-01-04",sales:99}, | |
{date:"2013-02-01",sales:99},{date:"2013-02-02",sales:99},{date:"2013-02-03",sales:99},{date:"2013-02-04",sales:99}, | |
{date:"2013-03-01",sales:99},{date:"2013-03-02",sales:98},{date:"2013-03-03",sales:99},{date:"2013-03-04",sales:99}, | |
{date:"2013-04-01",sales:99},{date:"2013-04-02",sales:99},{date:"2013-04-03",sales:99},{date:"2013-04-04",sales:99}, | |
{date:"2013-05-01",sales:98},{date:"2013-05-02",sales:99},{date:"2013-05-03",sales:99},{date:"2013-05-04",sales:99}, | |
]; | |
function groupBy(arr, property, cb) { | |
var newArr = [], group = {}, k; |
This file contains hidden or 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
/*! | |
* jquery.addrule.js 0.0.2 - https://gist.github.com/yckart/5563717/ | |
* Add css-rules to an existing stylesheet. | |
* | |
* @see http://stackoverflow.com/a/16507264/1250044 | |
* | |
* Copyright (c) 2013 Yannick Albert (http://yckart.com) | |
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php). | |
* 2013/11/23 | |
**/ |
This file contains hidden or 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
/*jslint browser: true, devel: true */ | |
(function () { | |
'use strict'; | |
requirejs.config({ | |
baseUrl: ".", | |
paths: { | |
// libraries path | |
"json": "vendor/json2", |
This file contains hidden or 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
/* | |
* styleRegTest.js | |
* Copyright (C) 2013 <@TJFDFS> | |
* | |
* Distributed under terms of the MIT license. | |
*/ | |
describe("style regular matching test", function(){ | |
// Test "div#abc.read-more" | |
var pattern = "((div)+|(\\.read-more)+|(#abc)+|(:\\w+)+)\\s*(((?=,)(.*))|$)"; |