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 --git a/bin/roundup b/bin/roundup | |
index 5605e36..d131a79 100755 | |
--- a/bin/roundup | |
+++ b/bin/roundup | |
@@ -5,13 +5,13 @@ load("core.js"); | |
require("lib/roundabout"); | |
require("lib/jack/lobster"); | |
-Roundabout.GET("/", function() { | |
+Roundabout.application.GET("/", 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
#!/usr/bin/env java org.mozilla.javascript.tools.shell.Main | |
load("core.js"); | |
require("lib/jack"); | |
require("lib/jack/handler/jetty"); | |
function app(env) { | |
return [200, | |
{"Content-Type": "text/plain"}, |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from wsgiref.simple_server import make_server | |
from restish import app, http, resource | |
PORT = 8080 | |
def unicode_found(request): | |
return http.found(u"http://en.wikipedia.org/wiki/£") |
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 lang=en> | |
<meta charset=utf-8> | |
<title>removeChild?</title> | |
<h1>Mauriz is back</h1> | |
<p> | |
But something is wrong here? | |
</p> | |
<ul> | |
<li>a</li> |
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
#!/usr/bin/env python | |
# playing with column_property to keep counters up to date | |
__author__ = "Yoan Blanc" | |
from sqlalchemy import (create_engine, MetaData, | |
Table, Column, Table, Integer, ForeignKey, | |
select, func) | |
from sqlalchemy.ext.declarative import declarative_base |
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
#!/usr/bin/env python | |
__author__ = "Yoan Blanc <yoan at dosimple dot ch>" | |
# Declarative syntax | |
class Declarative(type): | |
def __init__(cls, name, bases, dict): | |
super(Declarative, cls).__init__(name, bases, dict) | |
cls._matchers = {} |
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
// jQuery makes me lazy :-) | |
$(document).ready(function($) { | |
var toReplace = "/trans.gif"; | |
$('img[src$=png]').each(function() { | |
$(this).css({ | |
width: $(this).width() + 'px', | |
height: $(this).height() + 'px', | |
filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + $(this).attr('src') + "', sizingMethod='scale')" | |
}).attr('src', toReplace); | |
}); |
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
function extend(source, obj) { | |
for(var key in obj) { | |
if((obj[key].constructor === Array || typeof obj[key] !== "object") && obj.hasOwnProperty(key)) { | |
source[key] = obj[key]; | |
} else { | |
source[key] = extend(source[key]||{}, obj[key]); | |
} | |
} | |
return source | |
} |
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
$ svn propget svn:externals -R | ruby -pe 'if $_.length() > 2; v = $_[0,$_.length-1].split(" ", 3); v[2] = v[2].gsub("/old_directory/", "/new_directory/"); $_ = "propset svn:externals \"#{v[2]}\" #{v[0]}"; end;' | xargs svn |
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
$ js -v | |
JavaScript-C 1.8.0 pre-release 1 2007-10-03 | |
$ js speed.js | |
1 childs: 0 | |
10 childs: 1 | |
100 childs: 3 | |
1000 childs: 40 | |
10000 childs: 217 | |
100000 childs: 5692 |