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
'use strict'; | |
var Promise = require('bluebird'); | |
var Connection = require('tedious').Connection ; | |
var Request = require('tedious').Request ; | |
var config = { | |
server: '152.16.26.58', | |
userName: 'sa', |
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
PID 24572 received SIGSEGV for address: 0xc295000 | |
/home/myndzi/kefir-scrape/node_modules/segfault-handler/build/Release/segfault-handler.node(+0xd14)[0xb773dd14] | |
[0xb774340c] | |
node(_ZN7unibrow15Utf8DecoderBase14WriteUtf16SlowEPKhPtj+0x49)[0x86f8d39] | |
node(_ZN2v88internal7Factory17NewStringFromUtf8ENS0_6VectorIKcEENS0_13PretenureFlagE+0x1d2)[0x84b2172] | |
node(_ZN2v86String11NewFromUtf8EPNS_7IsolateEPKcNS0_13NewStringTypeEi+0xa5)[0x83b6105] | |
node(_ZN4node11StringBytes6EncodeEPN2v87IsolateEPKcjNS_8encodingE+0x2c8)[0x87eb758] | |
node(_ZN4node6Buffer9Utf8SliceERKN2v820FunctionCallbackInfoINS1_5ValueEEE+0xfe)[0x87b839e] | |
node(_ZN2v88internal25FunctionCallbackArguments4CallEPFvRKNS_20FunctionCallbackInfoINS_5ValueEEEE+0x79)[0x83c6f69] | |
node[0x83e7a74] |
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
'use strict'; | |
var pattern = new Buffer([0xF0, 0x9F, 0x92, 0x95]); | |
var data = new Buffer(8000); | |
for (var i = 0; i < 8000; i += 4) { | |
pattern.copy(data, i, 0, 4); | |
} | |
data.slice(0, 7833).toString(); |
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
return [ | |
'actor', | |
'director', | |
'writer', | |
'producer' | |
].reduce(function (persons, role) { | |
var list = movie[role+'s'].list; | |
var newPersons = list.map((person) => { | |
return { |
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
'use strict'; | |
var Promise = require('bluebird'); | |
modeminit({ | |
ports: | |
[ { DEVNAME: '/dev/ttyUSB1', | |
ID_MODEL: 'E173s 3G broadband stick (modem on)' }, | |
{ DEVNAME: '/dev/ttyUSB0', | |
ID_MODEL: 'E173s 3G broadband stick (modem on)' }, |
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 Promise = require('bluebird'); | |
var mysql = require('mysql'); | |
var fs = require('fs'); | |
var args = process.argv; | |
// Configure MySql connection | |
var con = Promise.promisifyAll(mysql.createConnection({ | |
host: 'localhost', | |
user: 'friroot', |
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 request = Promise.promisifyAll(require('request')); | |
function getIssues() { | |
return request(options) | |
.spread(r, body) { | |
if (r.statusCode !== 200) { | |
console.log("unsuccessful status code!"); | |
console.log(body); | |
return; | |
} |
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 Promise = require('bluebird'), | |
request = Promise.promisifyAll(require('request')), | |
extend = require('extend'); | |
// this would be more appropriately imported from some config file | |
var defaultOptions = { | |
/* whatever request options you are using go here */ | |
url: 'http://jira-url/' | |
}; |
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
a: { | |
def: [ ' X', ' ', ' ', 'XXX ', | |
' X', ' ', 'XX ', ' X ', | |
' XX', ' X ', 'X ', ' ', | |
' ', ' XXX', 'X ', ' ' ], | |
size: 4, | |
compiled: [ | |
{ max: { x: 4, y: 4 }, | |
minos: [ 13, 14, 25, 36 ], | |
shifts: [ [ 14, 25, 36 ], [ 13, 14 ], [ 13, 25, 36 ], [ 13, 36 ] ], |
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 errors = require('errors'); | |
errors.create({ name: 'SaveAndQuit', scope: module.exports }); |