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
// ==UserScript== | |
// @name 下载一键通 | |
// @author greasepig | |
// @namespace https://greasyfork.org/users/2620-greasepig | |
// @description 利用搜狗浏览器“下载一键通”功能的API,自动帮您找到页面中资源的最佳下载地址,让下载更简单! | |
// @version 1.0.2 | |
// @include http://* | |
// @run-at document-end | |
// @grant GM_xmlhttpRequest | |
// ==/UserScript== |
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
/*! | |
* jstemplate: a light & fast js tamplate engine | |
* License MIT (c) 岑安 | |
*/ | |
var name = "jae"; | |
;(function (name, definition) { | |
if (typeof define == 'function') define(definition); | |
else if (typeof module != 'undefined') module.exports = definition(); | |
else this[name] = definition(); | |
})('jstemplate', function () { |
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
class A | |
x1:(arg)-> | |
console.log 'x1' + arg | |
x2:(arg1,arg2)-> | |
console.log 'x2' + arg1 + ":" + arg2 | |
run:(c,arg...)-> | |
@[c] && @[c].apply(this,arg) | |
c = new A() |
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
PHP代码片段 |
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
<?php | |
/** | |
* @param string $string 原文或者密文 | |
* @param string $operation 操作(ENCODE | DECODE), 默认为 DECODE | |
* @param string $key 密钥 | |
* @param int $expiry 密文有效期, 加密时候有效, 单位 秒,0 为永久有效 | |
* @return string 处理后的 原文或者 经过 base64_encode 处理后的密文 | |
* | |
**/ | |
function authcode($string, $operation = 'DECODE', $key = '', $expiry = 3600) |
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
// ==UserScript== | |
// @name 下载一键通 | |
// @author greasepig | |
// @namespace https://greasyfork.org/users/2620-greasepig | |
// @description 利用搜狗浏览器“下载一键通”功能的API,自动帮您找到页面中资源的最佳下载地址,让下载更简单! | |
// @version 1.0.2 | |
// @include http://* | |
// @run-at document-end | |
// @grant GM_xmlhttpRequest | |
// ==/UserScript== |
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
/** | |
* M.js | |
* | |
* 对NodeJS的数据库操作的简单封装 | |
* | |
* @author Jaeger <JaegerCode@gmail.com> | |
* @link https://gist.github.com/jae-jae/bfe0961253e7441242bb724906b26133 | |
* @version 1.1 | |
* | |
**/ |
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
50 0 * * * rsync -avzP root@xxx.com:/home/mysql_data_backup /home/my_site_backup/ |
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 | |
# apt-get install software-properties-common -y | |
add-apt-repository ppa:nilarimogard/webupd8 | |
apt-get update | |
apt-get install grive -y | |
mkdir ~/google_drive | |
cd ~/google_drive |
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
git clone git://github.com/joelthelion/autojump.git | |
cd autojump | |
./install.py | |
最后把以下代码加入.zshrc: | |
[[-s ~/.autojump/etc/profile.d/autojump.sh ]]&&.~/.autojump/etc/profile.d/autojump.sh |
OlderNewer