Skip to content

Instantly share code, notes, and snippets.

View lizheming's full-sized avatar
:octocat:

Austin Lee lizheming

:octocat:
View GitHub Profile
@lizheming
lizheming / svg-allowed-tags.json
Created June 29, 2019 08:09
SVG allowed tags
[
"br",
"div",
"span",
"font",
"b",
"a",
"altglyph",
"altglyphdef",
"altglyphitem",
@lizheming
lizheming / docker-compose.yml
Last active January 22, 2019 08:01
Firekylin docker
version: '2'
services:
db:
image: mysql:5
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_USER=firekylin
- MYSQL_PASSWORD=firekylin
- MYSQL_DATABASE=firekylin
@lizheming
lizheming / users.json
Last active January 28, 2018 06:26
firekylin users json
[
"http://www.gyblog.cn",
"http://www.welefen.com",
"https://h5jun.com",
"http://www.75team.com",
"http://blog.imnerd.org",
"http://aztack.wang",
"http://imhxl.com",
"https://meicj.com",
"https://gmiam.com",
@lizheming
lizheming / gl.html
Created July 6, 2017 08:40
Detect iPhone Mode
<!-- https://developer.apple.com/library/content/documentation/DeviceInformation/Reference/iOSDeviceCompatibility/HardwareGPUInformation/HardwareGPUInformation.html -->
<!doctype html>
<html>
<body>
<canvas id="glcanvas" width="0" height="0"></canvas>
<script type="text/JavaScript">
var performance = window.performance || window.mozPerformance || window.msPerformance || window.webkitPerformance || {};
var canvas;
canvas = document.getElementById("glcanvas");
@lizheming
lizheming / cloudSettings
Last active December 31, 2018 18:07
Visual Studio Code Sync Settings Gist
{"lastUpload":"2018-12-31T14:37:58.916Z","extensionVersion":"v3.2.4"}
<style id="jsbin-css">
#long {
opacity: 0;
animation-name: show;
animation-delay: .5s;
animation-duration: .5s;
animation-fill-mode: forwards;
animation-iteration-count: 1;
animation-timing-function: ease;
}
@lizheming
lizheming / LoginController.js
Created September 11, 2015 08:58
Login Github
// 自定义配置
var client = {
id: "",
secret: ""
};
var redirect_uri = "http://lizheming.com:8360/login/callback";
var querystring = require("querystring");
var request = require("request");
@lizheming
lizheming / LoginController.js
Last active August 29, 2015 07:30
Github oAuth 登陆模块附 ThinkJS 示例
var github = reguire("./github.js")({
client_id: "xxxx",
client_secret: "oooo",
redirect_uri: "http://xxx.com/login/callback" //和申请 KEY 时填写的 CALLBACK 地址要一样
});
module.exports = Controller({
indexAction: function() {
this.end('<a href="'+github.getAuthorizeUrl()+'">Login with Github</a>');
},
@lizheming
lizheming / baidu.map.bookstore.spider.js
Last active August 29, 2015 14:14
百度地图书店搜索结果抓取
function getPages( total ) {
var url = "http://ditu.baidu.com/?newmap=1&reqflag=pcmap&biz=1&pcevaname=pc2&da_par=direct&qt=s&from=webmap&da_src=pcmappg.poi.page&wd=%E4%B9%A6%E5%BA%97&c=131&sug=0&ie=utf-8&wd2=&l=12&src=7&pn=1&db=0&on_gel=1&gr=3&addr=0&nn=";
var start = 0, urls = [];
do {
urls.push( url + start );
start += 10;
} while( start < total );
return urls;
}
function getScript(url) {
@lizheming
lizheming / huafei.php
Created November 11, 2014 08:54
某个不知名的公众号强化费的方法
<?php
function p($url, $fansid = "311076") {
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_POSTFIELDS, array(
"rid" => "3",
"fansid" => $fansid
));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
try {
$res = curl_exec($curl);