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 | |
current="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
function cleanup_mount(){ | |
dir=$1 | |
# ensure direcotry | |
if [ ! -d $dir ];then | |
mkdir $dir | |
fi |
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
from functools import wraps | |
class Caches(object): | |
_all_caches = {} | |
def __init__(self,name,size): | |
super(Caches,self).__init__() | |
if size is None: | |
size = 10000 | |
self._name = name | |
self._containers = {} |
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
#!/usr/bin/pypy | |
# -*- coding: utf-8 -*- | |
import logging | |
import os | |
logging.basicConfig(level=logging.INFO,format=u'%(asctime)s [%(levelname)s] (%(name)s) {%(pathname)s:%(lineno)d@%(funcName)s} - %(message)s') | |
if __name__ == '__main__': | |
root_dir = os.path.abspath(os.path.dirname(__file__)) |
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 mocker = function(self){ | |
return { | |
"mocked":{}, | |
"mock":function(name){ | |
var current = this.mocked[name]; | |
if(current != null) { | |
return current; | |
} |
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
#!/usr/bin/pypy | |
import subprocess | |
import shlex | |
import select | |
import socket | |
import time | |
class Proxy(object): | |
def __init__(self,bind,port,remote,local): | |
self.cmd = "/usr/bin/ssh -NC -D %s:%s %s" % (bind,port,remote) |
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
-XX:+UseParallelGC | |
-XX:+UseParallelOldGC | |
-XX:PSAdaptiveSizePolicyResizeVirtualSpaceAlot=-1 | |
-XX:+JavaObjectsInPerm | |
-XX:-ZapUnusedHeapArea | |
-XX:-VerifyObjectStartArray | |
-XX:-VerifyAfterGC | |
-XX:-VerifyRememberedSets | |
-XX:+ScavengeBeforeFullGC | |
-XX:NewRatio=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
{ | |
loader = { | |
queue : [], | |
total : 0, | |
async : function(s){ | |
loader.queue.push(s); | |
loader.total++; | |
}, | |
complete:function(callback){ | |
element = document.getElementsByTagName("script")[0]; |