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
# Count total memory by user | |
ps --no-headers -u username -o rss | (tr '\n' +; echo 0) | bc |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd"> | |
<Configure id="Server" class="org.mortbay.jetty.Server"> | |
<Get id="oldhandler" name="handler"/> | |
<Set name="handler"> | |
<New id="Rewrite" class="org.mortbay.jetty.handler.rewrite.RewriteHandler"> | |
<Set name="rewriteRequestURI">true</Set> | |
<Set name="rewritePathInfo">false</Set> | |
<Set name="originalPathAttribute">requestedPath</Set> |
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 ruby | |
# js1k packer | |
if ARGV[0] == "-n" | |
ARGV.shift | |
wrap = false | |
else | |
wrap = true | |
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
@echo off | |
REM | |
REM Copyright 2008-2009 LinkedIn, Inc | |
REM Copyright 2010 Erik Howard http://www.gonosql.com http://erikhoward.net | |
REM | |
REM Licensed under the Apache License, Version 2.0 (the "License"); | |
REM you may not use this file except in compliance with the License. | |
REM You may obtain a copy of the License at | |
REM |
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
@echo off | |
REM | |
REM Copyright 2008-2009 LinkedIn, Inc | |
REM Copyright 2010 Erik Howard http://www.gonosql.com http://erikhoward.net | |
REM | |
REM Licensed under the Apache License, Version 2.0 (the "License"); | |
REM you may not use this file except in compliance with the License. | |
REM You may obtain a copy of the License at | |
REM |
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
@echo off | |
REM | |
REM Copyright 2008-2009 LinkedIn, Inc | |
REM Copyright 2010 Erik Howard http://www.gonosql.com http://erikhoward.net | |
REM | |
REM Licensed under the Apache License, Version 2.0 (the "License"); | |
REM you may not use this file except in compliance with the License. | |
REM You may obtain a copy of the License at | |
REM |
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> | |
<title>wibblefish</title> | |
<pre id="results"></pre> | |
<script> | |
window.functions = [ | |
function(i) { return i%3 == 0 ? 'wibble' : '' }, | |
function(i) { return i%5 == 0 ? 'fish' : '' } | |
] | |
window.wibblefish = function(n) { |
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
find . -name '*.java' -exec basename {} .java \; | awk '{ print length " " $0 }' | sort -n -r | head -n 5 |
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'), | |
url = require('url'), | |
_ = require('underscore'), | |
elastical = require('elastical'); | |
var client = new elastical.Client(); | |
if (process.argv.length < 3) { | |
console.log('Port number is required'); | |
return; |
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
// imports | |
public class TextDelimitedWithHeader extends TextDelimited { | |
// ... | |
@SuppressWarnings("unchecked") | |
public void sinkPrepare(HadoopFlowProcess flowProcess, SinkCall<Object[], OutputCollector> sinkCall) { | |
super.sinkPrepare(flowProcess, sinkCall); |
OlderNewer