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
(function(exports, undefined){ | |
//redefine document | |
var document = exports.document; | |
//namse space | |
var BASE = (function(){ | |
// base obj | |
var BASE = function(selector, context){ | |
return new BASE.fn.init(); |
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
// Avoid `console` errors in browsers that lack a console. | |
(function() { | |
var method; | |
var noop = function () {}; | |
var methods = [ | |
'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', | |
'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log', | |
'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd', | |
'timeStamp', 'trace', 'warn' | |
]; |
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 sys | |
class Node(object): | |
def __repr__(self): | |
n = self.__class__.__name__ | |
fields = ['%s=%r' % (f, self.__dict__[f]) for f in self.fields] | |
return '<%s(%s)>' % (n, ', '.join(fields)) | |
def add(self, ls, level, s): |
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/sh | |
usage() | |
{ | |
local name=${0##*/} | |
cat >&2 <<-END | |
Rewrite history to squash all commits wiht message starts with 'fixup!' to | |
its first parent. By drdr.xp@gmail.com |
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
/** | |
* A storage class for both command line options and shell commands. | |
* | |
*/ | |
static class CommandOptions { | |
private Map<String,String> options = new HashMap<String,String>(); | |
private List<String> cmdArgs = null; | |
private String command = null; |
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
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <time.h> | |
#include <unistd.h> | |
#include <pthread.h> | |
#include <syslog.h> | |
#include <fcntl.h> | |
#include <sys/stat.h> |
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/env python | |
#encoding=utf-8 | |
import os | |
import sys | |
import getopt | |
import struct | |
def printf(format, *args): | |
print format % args |
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/env python | |
import sys,os | |
varnish_adm='varnishadm' | |
try: | |
var=sys.argv[1:][0] | |
if 'http://' in var or 'HTTP://' in var: | |
domain=var.split('/')[2] | |
url=var.split(domain)[1] | |
if url == "": | |
url=sys.argv[1:][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
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>org.apache.curator</groupId> | |
<artifactId>apache-curator</artifactId> | |
<version>2.8.1-SNAPSHOT</version> | |
<packaging>pom</packaging> | |
<dependencies> | |
<dependency> |
OlderNewer