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
SELECT nspname || '.' || relname AS "relation", | |
pg_size_pretty(pg_relation_size(C.oid)) AS "size" | |
FROM pg_class C | |
LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace) | |
WHERE nspname NOT IN ('pg_catalog', 'information_schema') | |
ORDER BY pg_relation_size(C.oid) DESC | |
LIMIT 20; |
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
var casual = require('casual'), | |
service = require('../real-service'); | |
descibe('Some sort of service', function() { | |
it('Should not fail', function() { | |
var string = casual.string; | |
var expected = string + 'A'; | |
var result = service.appendLetterAtoEndOfString(string); | |
result.should.be.exactly(expected); |
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
shim: { | |
'jquery': { | |
path: 'public/vendor/jquery/jquery.js', | |
exports: '$' | |
}, | |
'underscore': { | |
path: 'public/vendor/lodash/dist/lodash', | |
exports: '_' | |
}, | |
'backbone': { |
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
define(["marionette", "underscore"], | |
function(Marionette, _) { | |
return Marionette.AppRouter.extend({ | |
appRoutes: {}, | |
initialize: function(modules) { | |
this.appRoutes = _.extend.apply(null, _.pluck(modules, "appRoutes")); | |
this.controller = _.extend.apply(null, _.pluck(modules, "actions")); | |
this.listenTo(app, "navigate", function(location, force) { | |
if (force) { |
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
define(["marionette", "underscore"], function(Marionette, _) { | |
return Marionette.Controller.extend({ | |
mixins: [], | |
initialize: function(options) { | |
this.mixinModules(); | |
this.m = {}; // Module models | |
this.c = {}; // Module collections | |
this.v = {}; // Modules views |
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
var http = require('http'), | |
httpProxy = require('http-proxy'); | |
var proxy = new httpProxy.createProxyServer(); | |
http.createServer(function (req, res) { | |
proxy.web(req, res, { | |
target: req.url | |
}); | |
}).listen(8000); |
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 EQUALS(y) { | |
if (IS_STRING(this) && IS_STRING(y)) return %StringEquals(this, y); | |
var x = this; | |
while (true) { | |
if (IS_NUMBER(x)) { | |
while (true) { | |
if (IS_NUMBER(y)) return %NumberEquals(x, y); | |
if (IS_NULL_OR_UNDEFINED(y)) return 1; // not equal | |
if (!IS_SPEC_OBJECT(y)) { |
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
Math.random = (function() { | |
var seed = 49734321; | |
return function() { | |
// Robert Jenkins' 32 bit integer hash function. | |
seed = ((seed + 0x7ed55d16) + (seed << 12)) & 0xffffffff; | |
seed = ((seed ^ 0xc761c23c) ^ (seed >>> 19)) & 0xffffffff; | |
seed = ((seed + 0x165667b1) + (seed << 5)) & 0xffffffff; | |
seed = ((seed + 0xd3a2646c) ^ (seed << 9)) & 0xffffffff; | |
seed = ((seed + 0xfd7046c5) + (seed << 3)) & 0xffffffff; | |
seed = ((seed ^ 0xb55a4f09) ^ (seed >>> 16)) & 0xffffffff; |
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 JSONStringify(value, replacer, space) { | |
if (%_ArgumentsLength() == 1) { | |
var builder = new InternalArray(); | |
BasicJSONSerialize('', value, new InternalArray(), builder); | |
if (builder.length == 0) return; | |
var result = %_FastAsciiArrayJoin(builder, ""); | |
if (!IS_UNDEFINED(result)) return result; | |
return %StringBuilderConcat(builder, builder.length, ""); | |
} | |
if (IS_OBJECT(space)) { |