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 / 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)
@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 () {