Skip to content

Instantly share code, notes, and snippets.

@psyho
psyho / index.html
Created August 3, 2011 16:44
inline edit and dirty detection
<!DOCTYPE HTML>
<html xmlns:ng="http://angularjs.org">
<head>
<title>Inline Edit</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.js" type="text/javascript"></script>
<script src="http://code.angularjs.org/0.9.18/angular-0.9.18.min.js" type="text/javascript" ng:autobind></script>
<style type="text/css">
.dirty {
@psyho
psyho / master-election
Created March 14, 2011 21:14
master election using zookeeper
#!/usr/bin/env ruby
require "rubygems"
require "zookeeper"
def log(msg)
puts "[#{Process.pid}] #{msg}"
end
def debug(obj)