Skip to content

Instantly share code, notes, and snippets.

View ozten's full-sized avatar

Austin King ozten

View GitHub Profile
@ozten
ozten / mustache2ejs.diff
Created January 10, 2012 22:25
Mustache to EJS
diff --git a/lib/browserid/prove_template.ejs b/lib/browserid/prove_template.ejs
index d2a4ccc..489e30f 100644
--- a/lib/browserid/prove_template.ejs
+++ b/lib/browserid/prove_template.ejs
@@ -1,9 +1,10 @@
-Thanks for verifying your email address. This message is being sent to you to complete your sign-in to {{site}}.
+<%= gettext(
+ strargs('Thanks for verifying your email address. This message is being sent to you to complete your sign-in to %
-Finish registration by clicking this link: {{link}}
app.use(i18n.abide({
limited_paths: ['/wsapi/stage_user', '/wsapi/stage_email'],
supported_languages: config.get('supported_languages'),
default_lang: config.get('default_lang'),
locale_directory: config.get('locale_directory')
}));
@ozten
ozten / simple_static_server.js
Created February 7, 2012 19:01
Reduced test case for Issue 1057
#!/usr/bin/env node
/*
Deploy above resources directory.
*/
const path = require('path'),
express = require('express');
app = express.createServer();
app.use(express.static(path.join(__dirname, "resources", "static")));
@ozten
ozten / wtf.js
Created February 8, 2012 21:52 — forked from lloyd/wtf.js
const fs = require('fs');
var s = fs.ReadStream("./dialog.orig.js");
s.setEncoding('utf8');
var buf;
s.on('data', function(chunk) {
if (buf) buf += chunk;
else buf = chunk;
@ozten
ozten / buf_equal.js
Created February 9, 2012 19:54
Minimum test case for buffer.equals exception and gettext
/* Copy any mo file to /tmp/any.mo
Comment and uncomment _p to repro. */
var fs = require('fs'),
path=require('path'),
//_p = require('postprocess'),
Gettext = require('node-gettext');
var locale = "eo",
export.assets = {
js: {
"/production/en_US/dialog.min.js":
[
"/lib/jquery.js",
"/shared/foo.js"
]
},
css: {
"/production/main.min.css":
@ozten
ozten / gist:1828627
Created February 14, 2012 18:01
tests hanging
$ npm test
> [email protected] test /home/ozten/Projects/browserid
> ./scripts/run_all_tests.sh
The "sys" module is now called "util". It should have a similar interface.
CANNOT TEST 'test_mysql' ENVIRONMENT: can't connect to the database
The "sys" module is now called "util". It should have a similar interface.
Testing with NODE_ENV=test_json
tests/add-email-with-assertion-test.js
}
resp.on('header', function (a, b, c) {
console.log('boo ya', a, b, c);
resp.removeHeader('ETag');
resp.removeHeader('Last-Modified');
});
next();
};
clortho$ npm install ldapjs
npm http GET https://registry.npmjs.org/ldapjs/0.4.8
npm http 304 https://registry.npmjs.org/ldapjs/0.4.8
npm http GET https://registry.npmjs.org/asn1/0.1.11
npm http GET https://registry.npmjs.org/nopt/1.0.10
npm http GET https://registry.npmjs.org/buffertools/1.0.6
npm http GET https://registry.npmjs.org/dtrace-provider/0.0.3
npm http GET https://registry.npmjs.org/sprintf/0.1.1
npm http 304 https://registry.npmjs.org/asn1/0.1.11
npm http 200 https://registry.npmjs.org/nopt/1.0.10
IP_ADDRESS=10.0.1.16 npm start
> [email protected] start /home/ozten/Projects/browserid
> ./scripts/run_locally.js
node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: Cannot find module './libs/all'