Skip to content

Instantly share code, notes, and snippets.

View jae-jae's full-sized avatar
🏠
Working from home

Jaeger jae-jae

🏠
Working from home
  • China
View GitHub Profile
@jae-jae
jae-jae / 22jstemplate.js
Last active December 15, 2015 16:56 — forked from hongru/jstemplate.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 / authcode.php
Created September 2, 2016 15:26 — forked from BelinChung/authcode.php
Discuz! 中的加解密函数
<?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)