kybernetikos

View gist:5588309
1 2 3 4 5 6 7 8 9 10
// Generated by CoffeeScript 1.3.1
(function() {
var cubes, list, math, num, number, opposite, race, square,
__slice = [].slice;
 
number = 42;
 
opposite = true;
 
if (opposite) {
View gist:5380463
1 2 3 4 5 6 7 8 9 10
 
// Bad behaviour ahead!
// doesn't work with strict mode.
 
function local(obj) {
var global = Function("return this")();
var tmpName = "_tmp";
while (tmpName in global) {
tmpName = "_"+tmpName;
}
View watchFile monkey patch.js
1 2 3 4 5 6 7 8 9 10
var os = require('os');
 
if (os.platform() == 'win32') {
// change fs.watchFile so that it doesn't throw an error on windows.
fs.watchFile = function(filepath, callbackfunc) {
var old = fs.statSync(filepath);
fs.watch(filepath, function() {
fs.stat(filepath, function(err, newStat) {
callbackfunc(old, newStat);
View example.html
1 2 3 4 5 6 7 8 9 10
<html>
<head>
<title>CouchTest</title>
<script>
 
document.domain = window.location.hostname;
 
window.oncouchready = function(api) {
CouchDB = api;
var database = new CouchDB("somedb");
View couch-x.html
1 2 3 4 5 6 7 8 9 10
<html>
 
<head>
 
<script type="text/javascript" src="/_utils/script/couch.js"></script>
 
<script type="text/javascript">
document.domain = window.location.hostname;
 
if (window.parent.oncouchready) {
Something went wrong with that request. Please try again.