Skip to content

Instantly share code, notes, and snippets.

[root@build ~/configurator/node_modules/node-ncurses-0.4.1]# node-gyp -d rebuild
gyp info it worked if it ends with ok
gyp info using node-gyp@0.10.1
gyp info using node@0.10.4 | sunos | x64
gyp info spawn python
gyp info spawn args [ '/opt/local/lib/node_modules/node-gyp/gyp/gyp',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
@konobi
konobi / read_test.js
Created February 7, 2013 03:50
basic streams2 readable example
var util = require("util");
var stream = require("stream");
var ee = require("events").EventEmitter;
var Readable = stream.Readable;
var emitter = new ee();
// basically just to show stuff going from one place to abother
var pushed = ['a', 'b', 'c', 'd', 'e'];
var pulled = [];
@konobi
konobi / mylife.set.to.md
Last active December 11, 2015 09:59
Extract from my twitter archive of tracks I've liked.
FATAL:/Developer/usr/bin/../libexec/gcc/darwin/x86_64/as: I don't understand '-' flag!
[BUILD] bin/__divdi3.o
In file included from <command-line>:0:
include/compiler.h:192:1: error: "__weak" redefined
<built-in>: error: this is the location of the previous definition
make: *** [bin/__divdi3.o] Error 1
set nocp " Use vim defaults, not vi ones
" set dg " Use digraphs
set fo+=r " Auto-format comments while typing
set com-=:% " '%' doesn't start comments
set hls " Highlight search pattern matches
set nojs " Join lines with only one space
set kp= " No external help system
set mps+=<:> " Make % work with <>
set mls=1 " Check one line for modelines
---- HOSTS
GET /hosts/<hostname>
{ owner: "bob", private: "true", committers: ["bob", "fred"] }
GET /hosts/<hostname>/committers
["bob", "fred"]
GET /hosts/<hostname>/owner
["bob"]
exports.normalizeArray = function(arr) {
var [final_array, items, item] = [ [], arr.slice(0), null ];
while(items.length){
item = items.shift();
if( (item == undefined) || (item == '') || (item == '.') ){
// do nothing
} else if(item == '..'){
final_array.pop();
} else {
var require;
(function(){
var module = {};
require = function(module_name, stack){
if(!stack) stack = [];
var self = arguments.callee;
var resolved = resolve(module_name, stack);
var [use_string, breakup] = [resolved.identifier, resolved.breakup];
# In .ssh/config:
Host *
ControlMaster no # Connections by default are not a master
ControlPath ~/.ssh/master-%r@%h:%p
ServerAliveInterval 60
ServerAliveCountMax 60
# On normal connections, if there is no master running on the ControlPath it will behave as normal
ssh some.host
use strict;
use warnings;
use Encode;
use HTTP::Request;
use LWPx::ParanoidAgent;
use JavaScript;
use Try::Tiny;