Skip to content

Instantly share code, notes, and snippets.

View evilpacket's full-sized avatar
:octocat:

Adam Baldwin evilpacket

:octocat:
View GitHub Profile
var Docker = require('dockerode');
var docker = new Docker({socketPath: '/var/run/docker.sock'});
docker.createContainer({ Image: 'ubuntu', Cmd: ['/bin/ls','/stuff'], "Volumes":{"/stuff": {}} }, function (err, container) {
container.attach({stream: true, stdout: true, stderr: true, tty: true}, function (err, stream) {
stream.pipe(process.stdout);
container.start({"Binds":["/home/vagrant:/stuff"]}, function (err, data) {
console.log(data);

Keybase proof

I hereby claim:

  • I am evilpacket on github.
  • I am adam_baldwin (https://keybase.io/adam_baldwin) on keybase.
  • I have a public key whose fingerprint is 06A7 065F ABC8 39CC 27D3 5E01 D9D0 F356 6734 88E4

To claim this, I am signing this object:

@evilpacket
evilpacket / gist:984b344070a001e5c43f
Created August 26, 2015 02:40
Get list of modules from npm most depended page with jquery
//https://www.npmjs.com/browse/depended
var links = {};
$('div.container.content a').each(function() {
links[this.href.split('/package/')[1]] = 1
});
Object.keys(links).forEach(function(item) {
console.log(item)
})