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 wildCardToRegexp(wildCardPattern){ | |
var regexpOperator = '^$\\.+?()[]{}|'; | |
for(var i = 0; i < regexpOperator.length; i++){ | |
var operator = regexpOperator[i]; | |
wildCardPattern = wildCardPattern.replace(operator,"\\"+operator); | |
} | |
return wildCardPattern.replace("*",".*"); | |
} |
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 java.io.DataOutputStream; | |
import java.io.IOException; | |
import org.apache.hadoop.conf.Configuration; | |
import org.apache.hadoop.fs.FileSystem; | |
import org.apache.hadoop.fs.Path; | |
import org.apache.hadoop.fs.FSDataOutputStream; | |
import org.apache.hadoop.io.compress.CompressionCodec; |
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
/** | |
* cssinclude.js | |
* | |
* extend syntax like @import "some.css" | |
* to actualy css file contents when imported css exist. | |
* If imported css file isn't exist, not execute replace. | |
* | |
* * usage * | |
* var cssString | |
* cssString = require('./cssinclude').extend(cssString); |
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
declare function exampleFunc() : int; |
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
package pigudf; | |
import java.io.IOException; | |
import org.apache.pig.EvalFunc; | |
import org.apache.pig.data.Tuple; | |
/** | |
* Usage: | |
* log = LOAD logfile.txt AS (time:int, path:chararray, ua:chararray) | |
* log = FOREACH log GENERATE time, path, ua, pigudf(ua) AS browser; |
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 java.lang.annotation.Retention; | |
import java.lang.annotation.RetentionPolicy; | |
@Retention(RetentionPolicy.RUNTIME) | |
public @interface DependsOnPlatform { | |
public String value(); | |
} |
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
// set package.json and `npm init` | |
// or | |
// $npm install init; | |
// $npm install hubot --save | |
// $npm install coffee-script --save | |
var fork = require('child_process').fork | |
var fs = require("fs") | |
var env = { | |
//"HUBOT_IRC_SERVER" : "", |
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
# Description: | |
# Load script recursively | |
# Dependences: | |
# "glob": "~3.1.20" | |
Path = require "path" | |
Glob = require "glob" | |
module.exports = (robot) -> | |
robot.logger.info "read sub dir" | |
dirs = Glob.sync(__dirname+"/**/*/") |
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 glob = require("glob"); | |
var fs = require("fs"); | |
var path = require("path") | |
glob("./LONG_FILE_NAME/**/",function(err, files){ | |
files.reverse().forEach(function(f){ | |
var newFsp = f.split("/") | |
newFsp.pop() | |
newFsp.pop() |
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
Show hidden characters
[ | |
{ "keys": ["tab"], "command": "NULL" } , | |
{ "keys": ["tab"], "command": "insert", "args": {"characters": "\t"} }, | |
{ "keys": ["tab"], "command": "replace_completion_with_next_completion", "context": | |
[ | |
{ "key": "last_command", "operator": "equal", "operand": "insert_best_completion" }, | |
{ "key": "setting.tab_completion", "operator": "equal", "operand": true } | |
] | |
}, | |
{ "keys": ["tab"], "command": "reindent", "context": |
OlderNewer