Skip to content

Instantly share code, notes, and snippets.

View flowerains's full-sized avatar
😉
ruby is best

Alex Wang flowerains

😉
ruby is best
View GitHub Profile
anonymous
anonymous / tree.php
Created February 16, 2016 18:27
php 无限分类
<?php
$array = [
['id'=>36,'reid'=>0,'topid'=>0,'title'=>'科技'],
['id'=>37,'reid'=>36,'topid'=>36,'title'=>'记录片'],
['id'=>39,'reid'=>36,'topid'=>36,'title'=>'全球科技'],
['id'=>99,'reid'=>37,'topid'=>36,'title'=>'BBC纪录片'],
['id'=>100,'reid'=>37,'topid'=>36,'title'=>'探索频道'],
['id'=>54,'reid'=>0,'topid'=>0,'title'=>'动画'],
];
@ryerh
ryerh / tmux-cheatsheet.markdown
Last active June 25, 2024 15:04 — forked from MohamedAlaa/tmux-cheatsheet.markdown
Tmux 快捷键 & 速查表 & 简明教程

注意:本文内容适用于 Tmux 2.3 及以上的版本,但是绝大部分的特性低版本也都适用,鼠标支持、VI 模式、插件管理在低版本可能会与本文不兼容。

Tmux 快捷键 & 速查表 & 简明教程

启动新会话:

tmux [new -s 会话名 -n 窗口名]

恢复会话:

@zer4tul
zer4tul / hacker-howto.md
Last active October 11, 2023 07:15
Simplified Chinese edition of ESR's How To Become A Hacker
<?php
//加密解密方法
function passport_encrypt($txt, $key) {
srand((double)microtime() * 1000000);
$encrypt_key = md5(rand(0, 32000));
$ctr = 0;
$tmp = '';
for($i = 0;$i < strlen($txt); $i++) {
$ctr = $ctr == strlen($encrypt_key) ? 0 : $ctr;
$tmp .= $encrypt_key[$ctr].($txt[$i] ^ $encrypt_key[$ctr++]);
@umidjons
umidjons / print_json.php
Last active December 18, 2015 22:49
Print JSON data to response for some request
<?php
function PrintJSON( $jsonData )
{
header( 'Content-Type: application/json; charset=utf8' );
echo $jsonData;
}
?>