Skip to content

Instantly share code, notes, and snippets.

Avatar

Krishna Raman kraman

View GitHub Profile
View gist:867944a4e2fc4d2cf470
1) RemoteConnector should support the save method:
Uncaught TypeError: undefined is not a function
at ModelConstructor.<anonymous> (/home/kraman/Documents/loopback/node_modules/loopback-datasource-juggler/lib/dao.js:164:25)
at ModelConstructor.trigger (/home/kraman/Documents/loopback/node_modules/loopback-datasource-juggler/lib/hooks.js:56:12)
at ModelConstructor.<anonymous> (/home/kraman/Documents/loopback/node_modules/loopback-datasource-juggler/lib/dao.js:161:11)
at ModelConstructor.trigger (/home/kraman/Documents/loopback/node_modules/loopback-datasource-juggler/lib/hooks.js:56:12)
at create (/home/kraman/Documents/loopback/node_modules/loopback-datasource-juggler/lib/dao.js:160:9)
at /home/kraman/Documents/loopback/node_modules/loopback-datasource-juggler/lib/dao.js:153:7
at ModelConstructor.<anonymous> (/home/kraman/Documents/loopback/node_modules/loopback-datasource-juggler/lib/validations.js:422:11)
at ModelConstructor.next (/home/kraman/Documents
@kraman
kraman / app.js
Created Aug 14, 2014
Installing splunk and forwarder
View app.js
var express = require('express');
var app = express();
var router = express.Router();
router.use(function(req, res, next) {
console.log('sample_app: %s %s', req.method, req.url);
next();
});
router.use(function(req, res, next) {
View gist:7d4fda12810d557b147b
function __STRONGOPS_PROBE_CALLBACK() {
var id = process.uvHandleId[0];
originalCallback = handleMap[id].callback;
funcName = handleMap[id].name;
__STRONGOPS_PROBE_CALLBACK_ENTER(funcName, id);
try{
originalCallback.apply(this, arguments);
__STRONGOPS_PROBE_CALLBACK_EXIT(funcName, id);
} catch (err) {
View gist:92a7d090a5d7372a0020
dig expressjs.com
; <<>> DiG 9.8.3-P1 <<>> expressjs.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 36058
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;expressjs.com. IN A
View gist:9814c76ccfc44134d32a
achilles:strong-cli kraman$ npm run lint
> strongloop@2.6.3 lint /Users/kraman/Documents/strongloop/strong-cli
> jshint --exclude test/sandbox *.js lib test
lib/command.js: line 6, col 17, 'options' is already defined.
lib/command.js: line 13, col 56, Strings must use singlequote.
lib/command.js: line 15, col 102, Line is too long.
lib/command.js: line 1, col 11, 'assert' is defined but never used.
lib/command.js: line 2, col 10, 'spawn' is defined but never used.
View .git-prompt.sh
# bash/zsh git prompt support
#
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
# Distributed under the GNU General Public License, version 2.0.
#
# This script allows you to see repository status in your prompt.
#
# To enable:
#
# 1) Copy this file to somewhere (e.g. ~/.git-prompt.sh).
You can’t perform that action at this time.