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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<!--允许全屏--> | |
<meta content="yes" name="apple-mobile-web-app-capable"/> | |
<meta content="yes" name="apple-touch-fullscreen"/> | |
<!--禁止电话号码和邮箱识别--> |
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 https = require('https'); | |
var path = require('path'); | |
var fs = require('fs'); | |
var qs = require('querystring'); | |
var express = require('express'); | |
var multiparter = require("multiparter"); | |
process.on('uncaughtException', function(err) { | |
console.error('Caught exception: ', err); | |
}); |
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
//author: Sun, Junyi (weibo.com/treapdb) | |
//usage: node --nouse-idle-notification --expose-gc --max-old-space-size=8192 memcached.js | |
var config ={ | |
port: 11211, | |
max_memory: 300 // default 100M bytes | |
} | |
var net = require('net'); | |
var LRU = function (max) { // this LRU implementaion is based on https://github.com/chriso/lru |
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 http = require('http'); | |
var qs = require('querystring'); | |
function parse_response(res, callback) { | |
var list = []; | |
res.on('data', function(chunk) { | |
list.push(chunk); | |
}); | |
res.on('end', function() { | |
callback(Buffer.concat(list).toString()); |
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
local Queue = Object:extend() | |
continuable.Queue = Queue | |
function Queue:initialize() | |
self.head = {} | |
self.tail = {} | |
self.index = 1 | |
self.headLength = 0 | |
end |
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
import sublime, sublime_plugin | |
class Copy_on_select(sublime_plugin.EventListener): | |
def on_selection_modified(self, view): | |
for region in view.sel(): | |
if not region.empty(): | |
print(view.substr(region)) | |
view.run_command('copy') |
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
#!/bin/bash | |
############################################################################################################## | |
### 1. Name your profiles with the convention of ProjectName_TargetName_ConfigurationName.mobileprovision ### | |
### 2. Create a directory called CodeSign in your project directory ### | |
### 3. Move all your project's provisioning profiles into the CodeSign directory ### | |
### ### | |
### Running this script will update your project file to point to the correct UUIDs of each corresponding ### | |
### profile in your CodeSign directory. ### | |
############################################################################################################## |