Skip to content

Instantly share code, notes, and snippets.

View shijiaoliang's full-sized avatar

vabc shijiaoliang

View GitHub Profile
@shijiaoliang
shijiaoliang / visible_area.js
Created March 11, 2016 06:34 — forked from simplelife7/visible_area.js
【JS】判断元素是否在可视区域内
var a = document.getElementById("eq").offsetTop;
if (a >= $(window).scrollTop() && a < ($(window).scrollTop()+$(window).height())) {
alert("div在可视范围");
}
@shijiaoliang
shijiaoliang / authcode.php
Created July 21, 2016 04:31 — 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)
@shijiaoliang
shijiaoliang / ocp.php
Created August 31, 2016 07:01 — forked from ck-on/ocp.php
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)#ocp #php #opcache #opcode #cache #zend #optimizerplus #optimizer+
<?php
/*
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)
Author: _ck_ (with contributions by GK, stasilok)
Version: 0.1.7
Free for any kind of use or modification, I am not responsible for anything, please share your improvements
* revision history
0.1.7 2015-09-01 regex fix for PHP7 phpinfo
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter