Skip to content

Instantly share code, notes, and snippets.

View sorrycc's full-sized avatar
🌻
Working on Neovate Code

chencheng (云谦) sorrycc

🌻
Working on Neovate Code
View GitHub Profile
Process: AliWangwang [48626]
Path: /Applications/AliWangwang.app/Contents/MacOS/AliWangwang
Identifier: com.taobao.aliwangwang
Version: 3.0.4 (2596)
Code Type: X86 (Native)
Parent Process: launchd [137]
User ID: 501
Date/Time: 2013-03-06 10:48:27.253 +0800
OS Version: Mac OS X 10.8.2 (12C60)
set the_array to {}
tell application "Finder"
set these_items to the selection
end tell
repeat with i from 1 to the count of these_items
set end of the_array to ""
set this_item to (item i of these_items) as text
tell application "TPSMate"
helper = require "./_grunt_helper"
_config = require "./_config"
path = require "path"
fs = require "fs"
ModuleCompiler = require "module-compiler"
JS_SRC = path.join __dirname, "./src/javascripts/"
CSS_SRC = path.join __dirname, "./src/stylesheets/"
BUILD_SRC = path.join __dirname, "./build/#{_config.timestamp}/hy/"
@sorrycc
sorrycc / fp2012_module structure.js
Created March 19, 2012 05:51
fp2012_module structure
/**
* @fileOverview 本地生活模块.
* @author 云谦 <[email protected]>
*/
KISSY.add('fp/local/local', function(S, Module, util, DOM) {
function Local() {
Local.superclass.constructor.apply(this, arguments);
@sorrycc
sorrycc / st2icon.sh
Created March 18, 2012 08:03
Shell script to replace the Sublime Text 2 icon with a custom icon
#!/bin/bash
# Change this to the path to your icns file
ICON="$HOME/Sublime Text 2.icns"
cp -f "$ICON" "/Applications/Sublime Text 2.app"/Contents/Resources
cp -r "/Applications/Sublime Text 2.app" "/Applications/Sublime Text 2 copy.app"
rm -rf "/Applications/Sublime Text 2.app"
mv "/Applications/Sublime Text 2 copy.app" "/Applications/Sublime Text 2.app"
@sorrycc
sorrycc / upload_directory_to_xunlei_lixian.sh
Created February 24, 2012 09:24
上传目录下的所有 torrent 文件到迅雷离线
#
# @fileoverview 上传目录下的所有 torrent 文件到迅雷离线.
# @author ChenCheng <[email protected]>
# @ref https://github.com/iambus/xunlei-lixian
#
tmpdir="path/to/tmp/directory";
script="path/to/xunlei-lixian/lixian_cli.py"
if [ ! -d "$tmpdir" ]; then
@sorrycc
sorrycc / gist:1422427
Created December 2, 2011 09:00
combo
var A = ['a1', 'a2', 'a3'];
var B = ['b1', 'b2'];
var C = ['c1', 'c2', 'c3', 'c4', 'c5'];
function combo(a, b) {
var ret = [];
var n = a.length;
var m = b.length;
'mail.google.com': function() {
var h = new Date().getHours();
if (h > 10 && h < 18) {
document.body.innerHTML = '<div style="font:60px/1.5 arial;color:gray;text-align:center;margin-top:200px;">工作时间别老看邮件.</div>';
}
}
KISSY.all('#J_Slide img').attr('src', 'http://img03.taobaocdn.com/tps/i3/T1ci8_XhXwXXXXXXXX-490-170.png');
@sorrycc
sorrycc / gist:1244747
Created September 27, 2011 10:07
auto load memo for trade.taobao.com
(function() {
var count = 0;
if (!KISSY.one('#J_ListTable')) return;
KISSY.one('#J_ListTable').all('tbody.order').each(function(el, i) {
var oid = el.getDOMNode().id;
if (!oid) return;
if (el.one('a.J_MemoFlag').one('img').getDOMNode().src.indexOf('op_memo_0') > -1) {
return;
}