Codd is a new SQL query building library that is the spiritual successor to Gesundheit. In Gesundheit, a "query" was a mutable object with methods that modified a (nominally) internal AST for a SQL statement. While this enabled an API that was both familiar and expressive, it had some unfortunate side-effects (pun intended). For example, making a non-destructive modification to an existing query requires a deep copy of it's AST.
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 mysql = require('mysql'); | |
var Gearman = require('gearman-node') | |
var once = require('once'); | |
var pool = mysql.createPool({ | |
host : 'localhost', | |
user : 'ingress', | |
password : 'ingress12345', | |
database : 'ingress_data', | |
connectionLimit : 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
$ lein cljsbuild clean && lein cljsbuild once | |
Deleting files generated by lein-cljsbuild. | |
Compiling ClojureScript. | |
Compiling "client.js" from ["src/cljs"]... | |
WARNING: No such namespace: core at line 524 resources/js/cljs/core/async.cljs | |
WARNING: No such namespace: java.util.Arrays at line 675 resources/js/cljs/core/async.cljs | |
Successfully compiled "client.js" in 39.640165 seconds. |
I have some code that uses concat-stream
here. It's collecting some javascript from the README and eval
ing it. The eval currently fails with a syntax error when I use covert test.js
, but not when I use node test.js
.
covert
pipes test.js
through browserify
and into node
. There's some other stuff in between for the actual coverage collection but it's not relevant for this discussion. So we'll simplify things to this:
$ browserify test.js | node
TAP version 13
# README examples
[stdin]:3069
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
curl -v https://registry.npmjs.org/batch/-/batch-0.5.0.tgz > /dev/null | |
* About to connect() to registry.npmjs.org port 443 (#0) | |
* Trying 199.27.77.162... | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* connected | |
* Connected to registry.npmjs.org (199.27.77.162) port 443 (#0) | |
* SSLv3, TLS handshake, Client hello (1): | |
} [data not shown] | |
* SSLv3, TLS handshake, Server hello (2): |
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
macro thread { | |
case { $name ($args (,) ...) { $body ... } } => { | |
var result = makeIdent('$_', #{$name}) | |
return withSyntax($$_ = [result]) { | |
console.log('here') | |
return #{ | |
(function () { | |
var $$_ = arguments.length > 1 ? [].slice.call(arguments) : arguments[0]; | |
thread_body $$_ $body ...; | |
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
macro yield! { | |
rule { $func ( $args (,) ... ) } => { | |
yield function (cb) { | |
$func($args (,) ..., cb) | |
} | |
} | |
} |
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
--- macosx/graphviz.xcodeproj/project.pbxproj.orig 2012-08-13 15:14:54.000000000 -0500 | |
+++ macosx/graphviz.xcodeproj/project.pbxproj 2012-08-14 13:59:30.000000000 -0500 | |
@@ -380,12 +380,10 @@ | |
INFOPLIST_FILE = Info.plist; | |
INSTALL_PATH = "$(HOME)/Applications"; | |
LIBRARY_SEARCH_PATHS = ( | |
- ../lib/cdt/.libs, | |
- ../lib/cgraph/.libs, | |
- ../lib/gvc/.libs, | |
+ "$(PREFIX)/lib", |
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
'use strict'; | |
var buster = require('buster'); | |
var testApi = require('./test-http'); | |
function exampleApp () { | |
return function (req, res) { | |
res.setHeader('content-type', 'text/plain'); | |
res.setHeader('content-length', req.url.length); | |
res.end(req.url); |