Skip to content

Instantly share code, notes, and snippets.

View chakrit's full-sized avatar

Chakrit Wichian chakrit

View GitHub Profile
info: Creating snapshot 1.0.3-4
info: Updating app numbers.in.th
info: Activating snapshot 1.0.3-4 for numbers.in.th
info: Starting app numbers.in.th
error: Error running command deploy
error: Nodejitsu Error (500): Internal Server Error
error: There was an error while attempting to deploy the app
error:
error: NPM Install failed
error: NPM failed to install dependencies
  1. Do they offer fiber optic, if not what are the options (it will be either xDSL or DOCSIS cable which are fine too.)
  2. What is the maximum upload speed and download speed they can offer
  3. at what price?
    • installation costs
  • monthly costs
error: Error running command deploy
error: Nodejitsu Error (500): Internal Server Error
error: npm WARN package.json [email protected] No README.md file found!
npm http GET http://nj-npm.irisnpm.com/bcrypt
npm http GET http://nj-npm.irisnpm.com/express
npm http GET http://nj-npm.irisnpm.com/node-stringprep
npm http GET http://nj-npm.irisnpm.com/icu-wordsplit
npm http 200 http://nj-npm.irisnpm.com/bcrypt
npm http 200 http://nj-npm.irisnpm.com/icu-wordsplit
npm http 200 http://nj-npm.irisnpm.com/node-stringprep
a.parallel [
(cb) -> redis.keys "n:idx:str:*", (e, keys) -> redis.del keys, cb,
(cb) -> fulltext.clear cb
], cb
---
# Initially compiled from:
# http://en.wikipedia.org/wiki/List_of_hospitals_in_Thailand
meta:
version: 1.0
created: 2012-5-25 11:42:00 +7
creator: Chakrit Wichian <[email protected]> (http://chakrit.net)
entries:
- title: Bangkok Hospital
title/th: โรงพยาบาลกรุงเทพฯ
48 app.use(function(req, resp, next) {
49 resp.locals = _.extend(resp.locals,
50 { flash: _.bind(req.flash, req)
51 , currentUser: req.user
52 , currentPath: req.path
53 , version: config.version });
54 next();
55 });
_(files).each(function(file) {
var name = file.substring(0, file.length - '.js'.length)
, path = dir + '/' + file;
log.info('load: ' + path);
try { modules[name] = require(path); }
catch (e) { return callback(e); }
callback(null, modules[name], name);
});
// teach some kung-fu to spawn
spawn = (function(origSpawn) { return function(filename, args, onExit) {
// overloads func(filename, onExit);
if (onExit === undefined && (args instanceof Function)) {
onExit = args;
args = undefined;
}
// overloads func(filename, oneArg);
@chakrit
chakrit / gist:3295502
Created August 8, 2012 14:35
keep alive bash script.
# Keep alive
if [ $(ps -aef | grep -v grep | grep /harvester.py | wc -l | bc) -lt 1 ]; then
   python /home/knightbaron/foo.py -p params
fi
var assert = require('assert')
, N = 100000000
, STR = ''
, STR2 = 'very very long the quick brown fox jumps over the lazy dog.';
console.time('str.length == 0');
for (var i = 0; i < N; i++) {
assert(STR.length == 0);
assert(STR2.length != 0);