- http://flickr.com
- http://cnn.com
- http://letsfreckle.com # You need to log in
This file contains hidden or 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 -e | |
# 2010-09-19 Marc Limotte | |
# Run continuously (every 30 minutes) as a cron. | |
# | |
# Looks for directories in HDFS matching a certain pattern and moves them to S3, using Amazon's new | |
# distcp replacement, S3DistCp. | |
# | |
# It creates marker files (_directory_.done and _directory_.processing) at the S3 destination, so |
This file contains hidden or 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
# install git | |
sudo apt-get install g++ curl libssl-dev apache2-utils | |
sudo apt-get install git-core | |
# download the Node source, compile and install it | |
git clone https://github.com/joyent/node.git | |
cd node | |
./configure | |
make | |
sudo make install | |
# install the Node package manager for later use |
This file contains hidden or 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
# scenario: | |
# - you work from a dev account that has git authentication with keys in place | |
# - you use a sudoer account (first_user) to ssh and run chef on a server | |
# - the chef recipes deploy an application under a second_user | |
# - first_user and second_user don't have git keys in place and you want to use forwarding | |
# initial run (bootstrapping maybe) | |
include_recipe 'helper' |
This file contains hidden or 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
class Numberish | |
def self.convert(input) | |
if input.to_i > 0 && input.to_i.to_s == input | |
return input.to_i | |
else | |
return input | |
end | |
end | |
end |
This file contains hidden or 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
require 'v8' | |
require 'openssl' | |
class Module | |
def [](name) | |
self.const_get(name) | |
end | |
end |
This file contains hidden or 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
// early experiments with node had mysterious double requests | |
// turned out these were for the stoopid favicon | |
// here's how to short-circuit those requests | |
// and stop seeing 404 errors in your client console | |
var http = require('http'); | |
http.createServer(function (q, r) { | |
// control for favicon |
This file contains hidden or 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> | |
<!-- adapted from: http://iamchenghan.wordpress.com/2010/06/01/html5-canvas-jquery-cubic-bezier-drawing-tool/ --> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>HTML5 Canvas, jQuery Cubic Bezier Drawing Tool</title> | |
<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script> | |
<script type="text/javascript"> | |
var canvas, context, ctrlpts = new Array(); | |
$(function() { |
This file contains hidden or 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 | |
GIT_WORK_TREE=/tmp/dep | |
GIT_DIR=/home/ekastner/deployinator/.git | |
user_map_program=/tmp/usermap.sh | |
# if you need to test just a range of commits to debug | |
# for i in `git log --format=%h 83f7fec..265f9a7 | tac` |
This file contains hidden or 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
diff -ru a/webapp/content/js/composer_widgets.js b/webapp/content/js/composer_widgets.js | |
--- a/webapp/content/js/composer_widgets.js 2010-02-26 16:12:54.000000000 +0000 | |
+++ b/webapp/content/js/composer_widgets.js 2010-09-15 07:03:56.000000000 +0000 | |
@@ -531,6 +531,7 @@ | |
{text: 'Line Width', handler: this.applyFuncToEachWithInput('lineWidth', 'Please enter a line width for this graph target')}, | |
{text: 'Dashed Line', handler: this.applyFuncToEach('dashed')}, | |
{text: 'Keep Last Value', handler: this.applyFuncToEach('keepLastValue')}, | |
+ {text: 'Fill Value', handler: this.applyFuncToEachWithInput('fillValue', 'Please enter a value to fill. Leave blank for 0', true)}, | |
{text: 'Substring', handler: this.applyFuncToEachWithInput('substr', 'Enter a starting position')} | |
] |