Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Jaeger(黄杰) jae-jae

🏠
Working from home
View GitHub Profile
View 22jstemplate.js
/*!
* 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 () {
@jae-jae
jae-jae / sogou-download.user.js
Last active Dec 15, 2015
利用搜狗浏览器“下载一键通”功能的API,自动帮您找到页面中资源的最佳下载地址,让下载更简单!
View sogou-download.user.js
// ==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==
View a.coffee
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()
@jae-jae
jae-jae / ThunderDL.user.js
Last active Mar 7, 2020
[Tampermonkey脚本]获取页面内所有迅雷下载链接,启动快捷键 alt+x
View ThunderDL.user.js
// ==UserScript==
// @name 嗅探迅雷链接 Jaeger
// @namespace https://gist.github.com/jae-jae/70f175342130f11df1ae7bd54b93581e
// @version 1.4.3
// @description 嗅探页面内所有迅雷下载链接,方便批量离线下载
// @author Jaeger <JaegerCode@gmail.com>
// @icon http://lixian.vip.xunlei.com/favicon.ico
// @include http*
// @require https://raw.githubusercontent.com/jae-jae/l.js/master/userjs/l.userjs.min.js
// @require https://gist.githubusercontent.com/jae-jae/35a1833079d26e6c9d9c6d5bed982353/raw/userjs-base.js
@jae-jae
jae-jae / PHP_Gist
Last active Jul 19, 2016
PHP代码片段
View PHP_Gist
PHP代码片段
@jae-jae
jae-jae / README.md
Last active May 16, 2017
kvm服务器系统盘与数据盘合并脚本
View README.md

执行

1.合并系统盘与数据盘

wget https://gist.githubusercontent.com/jae-jae/6010e2ab7e5cd857e22a9c90817f6343/raw/3733ba54077bf7dcb522d21b105a4d82e58581d1/merge-hrad-disk.sh
bash merge-hrad-disk.sh

2.扩展swap分区,合并系统盘与数据盘

wget https://gist.githubusercontent.com/jae-jae/6010e2ab7e5cd857e22a9c90817f6343/raw/1c8da2ab055179902f57c74a2f5006a8467a3563/merge-hrad-disk-and-swap.sh
@jae-jae
jae-jae / authcode.php
Created Sep 2, 2016 — forked from BelinChung/authcode.php
Discuz! 中的加解密函数
View authcode.php
<?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)
@jae-jae
jae-jae / autojump
Last active Feb 21, 2017
安装ZSH
View autojump
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
@jae-jae
jae-jae / UserScript.js
Last active Mar 14, 2020
tampermonkey脚本基类
View UserScript.js
// @require https://raw.githubusercontent.com/jae-jae/l.js/master/userjs/l.userjs.min.js
// @require https://gist.githubusercontent.com/jae-jae/35a1833079d26e6c9d9c6d5bed982353/raw/userjs-base.js
// @grant GM_xmlhttpRequest
// @connect cdnjs.cloudflare.com
// @connect raw.githubusercontent.com
// @connect gist.githubusercontent.com
@jae-jae
jae-jae / Sniffing-download.user.js
Created Sep 24, 2016
下载一键通,利用搜狗浏览器“下载一键通”功能的API,自动帮您找到页面中资源的最佳下载地址,让下载更简单!
View Sniffing-download.user.js
// ==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==
You can’t perform that action at this time.