Skip to content

Instantly share code, notes, and snippets.

View cliffano's full-sized avatar
🎧
Hustlin' hustlin' hustlin' hustlin' hustlin'

Cliffano Subagio cliffano

🎧
Hustlin' hustlin' hustlin' hustlin' hustlin'
View GitHub Profile
@cliffano
cliffano / gist:b47b389721fe5a3403f9
Created November 5, 2014 15:26
pkjutil traverse-dependencies
* pkjutil@0.1.1
- dependencies:
- async: ~0.9.0
- bagofcli: ~0.2.0
- bagofrequest: ~0.1.0
- colors: ~1.0.3
- lodash: ~2.4.1
- prod: ~1.0.0
- semver: ~4.1.0
- devDependencies:
@cliffano
cliffano / gist:b268c090f905eccf35fe
Last active August 29, 2015 14:17
npmjs registry intermitten failure
> openssl s_client -connect registry.npmjs.org:443 -prexit
CONNECTED(00000003)
write:errno=54
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 130 bytes
@cliffano
cliffano / couchdb2couchpenter.js
Created September 2, 2015 23:11
Retrieve all database names in a CouchDB database and create a Couchpenter config.
var fs = require('fs');
var http = require('http');
var url = require('url');
if (process.argv.length !== 3) {
console.error('Usage: node couchdb2couchpenter.js https://host:port');
process.exit(1);
}
var _url = url.parse(process.argv[2]);
@cliffano
cliffano / gist:2641397
Created May 9, 2012 02:44
Mocha issue #414 example
var should = require('should');
function _something(cb) {
cb();
}
describe('foo', function () {
describe('bar', function () {
it('should do something', function (done) {
var x = {};
@cliffano
cliffano / svn2gitloop.sh
Created July 18, 2012 00:24
svn2git loop in bash
#! /bin/bash
mkdir -p workspace
cd workspace
for PROJ in 'app1' 'app2' 'app3'
do
mkdir $PROJ
cd $PROJ
# for SVN repo with structure app/trunk, app/branches, app/tags
var b = require('sandboxed-module').require('./b', {});
b.foo();
[debug] [<0.85.0>] New task status for <0.308.0>: [{checkpointed_source_seq,
98413},
{continuous,true},
{doc_id,<<"my_content">>},
{doc_write_failures,175},
{docs_read,46479},
{docs_written,46304},
{missing_revisions_found,
46479},
{progress,87},
@cliffano
cliffano / gist:5054305
Created February 28, 2013 04:57
VAGRANT_LOG vagrant up | GH-580
> VAGRANT_LOG=debug vagrant up
INFO global: Vagrant version: 1.0.6
INFO vagrant: `vagrant` invoked: ["up"]
DEBUG vagrant: Creating Vagrant environment
INFO environment: Environment initialized (#<Vagrant::Environment:0x7fad33034200>)
INFO environment: - cwd: /home/user1
INFO environment: Home path: /home/user1/.vagrant.d
INFO environment: Copying private key to home directory
/usr/lib/ruby/1.8/fileutils.rb:1268:in `initialize': Permission denied - /usr/lib/ruby/gems/1.8/gems/vagrant-1.0.6/keys/vagrant (Errno::EACCES)
from /usr/lib/ruby/1.8/fileutils.rb:1268:in `open'
@cliffano
cliffano / gist:5726639
Created June 7, 2013 02:14
NPM registry request
GET http://isaacs.iriscouch.com/registry/apis?atts_since=%5B%224-037b8021362c3319a7597c48c971a6e5%22%2C%224-05089c4258ba04259c89b3f2a8c97612%22%2C%224-0552d46c24ecdb65dd2d6c240797a56d%22%2C%224-0704025b6930979628cfc6c3e7cf7f7e%22%2C%224-08b2044a733715af4fa07417056ec78e%22%2C%224-08bd7afaad62b4baba0da5de8ff910e7%22%2C%224-0a526c7b6335f392d2cda8b8b3e8e13b%22%2C%224-0a6715d362d8a867e09f17165365dfbf%22%2C%224-0ceeacc9ca07e3c345811ec11a0ae472%22%2C%224-10ca136fcc95facdc28177cce97fb3ce%22%2C%224-124e9df218dfdb574de8b6441280090d%22%2C%224-160368532f9278a6929860c2471765af%22%2C%224-163142f0ffa5c7dd6bf5a3125fd45ebb%22%2C%224-18bdb5783ae063d6887bea6affd7514f%22%2C%224-18de5df4942206690c8163871f4f1432%22%2C%224-18f32ae20fcfd91ae634e13690cca4dd%22%2C%224-1a471de9368c2528b6ea3447e804ae83%22%2C%224-1ac85e92696815871c0a58390fc54b95%22%2C%224-1df874a5a797befbda068825aa3f1611%22%2C%224-207cddd8a6183df0f4e26dfb17aa8eb4%22%2C%224-2358faef216a5afe65d06e2702e9c8a0%22%2C%224-276856c6619a4fbaf298b8a3dd4cb56f%22%2C%224-2a39aa2d16a74
@cliffano
cliffano / gist:5931066
Last active December 19, 2015 09:09
child_process bg
>>> cat blah.js
var cp = require('child_process');
var c = cp.exec('./blah.sh &', function (err) {
if (err) {
console.error('err: ' + err.message);
} else {
console.log('done');
}
});