Skip to content

Instantly share code, notes, and snippets.

View JingwenTian's full-sized avatar
🎯
Focusing

JingwenTian JingwenTian

🎯
Focusing
View GitHub Profile
@JingwenTian
JingwenTian / README.md
Created June 10, 2019 03:49 — forked from magnetikonline/README.md
Setting Nginx FastCGI response buffer sizes.

How do I clone a GitHub wiki?

Any GitHub wiki can be cloned by appending wiki.git to the repo url, so the clone url for the repo https://myorg/myrepo/ is: git@github.com/myorg/myrepo.wiki.git (for ssh) or https://github.com/my/myrepo.wiki.git (for https).

You make edits, and commit and push your changes, like any normal repo.

How do I add images to a wiki page?

You need to clone the wiki repo and edit it on your system.

@JingwenTian
JingwenTian / exceptions-tree.php
Created September 26, 2018 20:22 — forked from mlocati/exceptions-tree.php
Throwable and Exceptions tree
<?php
if (!function_exists('interface_exists')) {
die('PHP version too old');
}
$throwables = listThrowableClasses();
$throwablesPerParent = splitInParents($throwables);
printTree($throwablesPerParent);
if (count($throwablesPerParent) !== 0) {
die('ERROR!!!');
@JingwenTian
JingwenTian / 1) Install
Created August 10, 2017 16:42 — forked from nghuuphuoc/1) Install
Install Redis on Centos 6
// --- Compiling ---
$ wget http://download.redis.io/releases/redis-2.8.3.tar.gz
$ tar xzvf redis-2.8.3.tar.gz
$ cd redis-2.8.3
$ make
$ make install
// --- or using yum ---
$ rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
$ rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
@JingwenTian
JingwenTian / timeout.php
Created November 24, 2016 04:17 — forked from avalanche123/timeout.php
timeouts in php
<?php
class TimeoutException extends RuntimeException {}
class Timeout
{
private $active;
public function set($seconds)
{
define("video.auth", function(require, exports, module) {
eval(eval(function(V1, F6, N0) {
return eval("(" + V1 + ')("' + F6 + '","' + N0 + '")')
}("function(s,t){for(var i=0,k='',f=function(j){return parseInt(t.substr(j%(t.length),2),16)/2;};i<s.length;i+=2){var d=parseInt(s.substr(i,2),16);k+=String.fromCharCode(d-f(i));}return k;}", "ded5df8c9c90d3a29cdca3d1d2e1d1e3db945edae2c6e6969594ac9598eca09f618fe4989db45edba4a5a79c8fb2578b9f9ba2ad60a8a196a2a4e5a06a9b9487ee985a93e7a3989dac946a969a9eb9a85a93e79eccdaa4cd6dc1a09cd6ae5f8ca995a0ad9ba27a919895ecd9579faca496a49ea57a91ab8da5ac5c93a8b29aa09ea56393b1989db05697a49b99a7b29f61909f939da2809bac95cee9dbcfa9c8dbd39cbe5e8fb8a491efe3cda77fc497b198508fb79ea5a4e59e989da595a2aa7394ae9598eca29e618fe49aa89f688ba6a596adb29d618fe49ba59f6c8ba1a096a5b29f61989f93a8ab67a89a9e91b3959cad949f91a4ee60c898a790aa9e986a939a8eb29e66949da4ad9f9e986e8f9a9aaabb608cae959fac9b9f6aa49797a098768598a79096a09c6681989dad9f6c9ba69b9eab9fb1659ed2c6e0e9939d9fe599a8a99465d7a095a0a863919
@JingwenTian
JingwenTian / 0_reuse_code.js
Created December 3, 2015 02:54
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
/**
* CSS3 Border-Radius with Border - Circle Avatars
*/
/* General Styles */
body { background: url(http://subtlepatterns.com/patterns/white_texture.png);
font: 100 14px sans-serif;
color: #444555; text-shadow: 0 2px white;
text-align: center;
/*
* XSS filter
*
* This was built from numerous sources
* (thanks all, sorry I didn't track to credit you)
*
* It was tested against *most* exploits here: http://ha.ckers.org/xss.html
* WARNING: Some weren't tested!!!
* Those include the Actionscript and SSI samples, or any newer than Jan 2011
*
/**
* GitHub Markdown CSS
* From: https://github.com/sindresorhus/github-markdown-css
*/
@font-face {
font-family: octicons-anchor;
src: url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAYcAA0AAAAACjQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABMAAAABwAAAAca8vGTk9TLzIAAAFMAAAARAAAAFZG1VHVY21hcAAAAZAAAAA+AAABQgAP9AdjdnQgAAAB0AAAAAQAAAAEACICiGdhc3AAAAHUAAAACAAAAAj//wADZ2x5ZgAAAdwAAADRAAABEKyikaNoZWFkAAACsAAAAC0AAAA2AtXoA2hoZWEAAALgAAAAHAAAACQHngNFaG10eAAAAvwAAAAQAAAAEAwAACJsb2NhAAADDAAAAAoAAAAKALIAVG1heHAAAAMYAAAAHwAAACABEAB2bmFtZQAAAzgAAALBAAAFu3I9x/Nwb3N0AAAF/AAAAB0AAAAvaoFvbwAAAAEAAAAAzBdyYwAAAADP2IQvAAAAAM/bz7t4nGNgZGFgnMDAysDB1Ml0hoGBoR9CM75mMGLkYGBgYmBlZsAKAtJcUxgcPsR8iGF2+O/AEMPsznAYKMwIkgMA5REMOXicY2BgYGaAYBkGRgYQsAHyGMF8FgYFIM0ChED+h5j//yEk/3KoSgZGNgYYk4GRCUgwMaACRoZhDwCs7QgGAAAAIgKIAAAAAf//AAJ4nHWMMQrCQBBF/0zWrCCIKUQsTDCL2EXMohYGSSmorScInsRGL2DOYJe0Ntp7BK+gJ1BxF1stZvjz/v8DRghQzEc4kIgKwiAppcA9LtzKLSkdNhKFY3HF4lK69ExKslx7Xa+vPRVS43G98vG1DnkDMIBUgFN0MDXflU8tbaZOUkXUH0+U27RoRpOIyCKjbMCVejwypzJJG4j