This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require("simple_html_dom.php"); | |
function get_files($dir) { | |
$files = array(); | |
for (; $dir->valid(); $dir->next()) { | |
if ($dir->isDir() && !$dir->isDot()) { | |
if ($dir->haschildren()) { | |
//$files = array_merge($files, get_files($dir->getChildren())); | |
$files =get_files($dir->getChildren()); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var biu=0; | |
var xunhuan=function(){ | |
if($('#msgs .new-templete .bot').size()>biu) | |
{$('#chatbox input').val($('#msgs .new-templete .bot span').last().html().split('<br>',1)); | |
sendChat(); | |
biu=$('#msgs .new-templete .bot').size(); | |
console.log(biu+":"+$('#msgs .new-templete .bot span').last().html().split('<br>',1)); | |
} | |
}; | |
var kaishi=function(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Img DownLoad Helper | |
// @namespace http://shellex.info | |
// @author cyr1l([email protected]) | |
// @description 图片下载助手-By Cyril | |
// @include http://*.*/* | |
// @include http://*.*/ | |
// @include https://*.*/* | |
// @include https://*.*/ | |
// @version 0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.line-numbers .line-number { | |
width: 22px; | |
} | |
.line-numbers { | |
background: #ececec; | |
} | |
.gist { | |
background: #eee; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Shotcut for V2ex | |
// @namespace http://cyrilis.com | |
// @author cyr1l([email protected]) | |
// @description V2ex 添加快捷键 | |
// @include http://*.v2ex.com/* | |
// @include http://v2ex.com/* | |
// @include http://*.v2ex.com/ | |
// @include http://v2ex.com/ | |
// @version 0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* wechat php test | |
*/ | |
//define your token | |
define("TOKEN", "你的token"); | |
$wechatObj = new wechatCallbackapiTest(); | |
//验证微信的时候记得把下面的注释取消。还有最后两行添加注释。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by Cyril Hou on 14-1-12. | |
*/ | |
/* | |
Object.keys fix for IE7, IE8 | |
*/ | |
if (!Object.keys) { | |
// http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
var app, express, http, setting; | |
express = require('express'); | |
http = require('http'); | |
app = express(); | |
// Set Port Here | |
// 'node app -p 4444' will listen on port 4444, rails like | |
var port = process.argv.indexOf('-p')? +process.argv[process.argv.indexOf('-p')+1]:undefined; | |
app.set('port', process.env.PORT || port || 4000); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by Cyril on 14-3-16. | |
*/ | |
GameManager.prototype.maxDirection = function (cb) { | |
var self = this; | |
var tile; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var server = require('http'); | |
var remoteServer = process.argv.indexOf('-d')>0 ? process.argv[process.argv.indexOf('-d')+1]:"www.douban.com"; | |
var listenPort = process.argv.indexOf('-p')>0 ? +process.argv[process.argv.indexOf('-p')+1]: process.env.PORT || 4000; | |
var http = require('http'); | |
server.createServer(function(q,s){ | |
// console.dir(q); | |
var headers = q.headers; | |
headers.host = remoteServer; | |
q.method === "GET" ? delete headers['Content-length']: console.log('Content-length:',headers['Content-lenght']); | |
var options = { |
OlderNewer