Skip to content

Instantly share code, notes, and snippets.

View eljefedelrodeodeljefe's full-sized avatar
💭
👍

Robert Jefe Lindstädt eljefedelrodeodeljefe

💭
👍
View GitHub Profile
@morkro
morkro / left.png
Last active March 19, 2023 15:24
Welcome to my GitHub dot com profile!
left.png
@eljefedelrodeodeljefe
eljefedelrodeodeljefe / 1_dopsbox.js
Last active July 23, 2017 17:12
Hierarchical, Recursive Conversation Tree
#!/usr/bin/env node
const argv = require('minimist')(process.argv.slice(2))
const clear = require('clear')
const chalk = require('chalk')
const debug = require('debug')('binary')
const EventEmitter = require('events')
const questions = require('./questions')
const help = require('./help')
@joehand
joehand / index.js
Last active January 9, 2017 00:18
Dat Download Basic
var Hyperdrive = require('hyperdrive')
var Level = require('level')
var Swarm = require('discovery-swarm')
var swarmDefaults = require('datland-swarm-defaults')
// run this like: node thisfile.js 4c325f7874b4070blahblahetc
var link = new Buffer(process.argv[2], 'hex')
var LOCAL_PORT = Number(process.argv[3]) || 3282 // specify port or use 3282
var db = Level('./dat.db')
@kost
kost / harden.sh
Created November 16, 2015 04:47 — forked from jumanjiman/harden.sh
hardening script for an alpine docker container
#!/bin/sh
set -x
set -e
#
# Docker build calls this script to harden the image during build.
#
# NOTE: To build on CircleCI, you must take care to keep the `find`
# command out of the /proc filesystem to avoid errors like:
#
# find: /proc/tty/driver: Permission denied
@thlorenz
thlorenz / update_to_nan_v2.0.x.sh
Last active October 13, 2016 08:04
Script to update Node.js addons to work with nan 2.0.x and thus with iojs v3.x (gets you 90% there)
#!/bin/bash
replacements=(
"NanAsyncWorker/Nan::AsyncWorker"
"NanAsyncQueueWorker/Nan::AsyncQueueWorker"
"NanCallback/Nan::Callback"
"NanSetInternalFieldPointer/Nan::SetInternalFieldPointer"
"NanGetInternalFieldPointer/Nan::GetInternalFieldPointer"
"NanNewBufferHandle\\(([^;]+);/Nan::NewBuffer(\\1.ToLocalChecked();"
"(NanNew(<(v8::)?String>)?\\(\"[^\"]*\"\\))/\\1.ToLocalChecked()"
@beaugunderson
beaugunderson / cool-modules.md
Last active February 2, 2023 19:58
cool modules from nodeconf

from streams session

  • end-of-stream - specify a callback to be called when a stream ends (which is surpsingly hard to get right)
  • duplexify - compose a Duplex stream from a Readable and a Writable stream
  • pump - pipe streams together and close all of them if one of them closes
  • pumpify - combine an array of streams into a single duplex stream using pump and duplexify
  • through2 - tools for making Transform streams
  • from2 - tools for making Readable streams

from "participatory modules" session

@ericelliott
ericelliott / essential-javascript-links.md
Last active June 14, 2025 18:43
Essential JavaScript Links
@thlorenz
thlorenz / steps-lldb-jit-on-osx.md
Last active April 21, 2021 09:56
lldb JIT on OSX (showing no useful info at this point)

Installation

Ninja

  • needed for faster Node.js builds
brew install ninja
// Restify Server CheatSheet.
// More about the API: http://mcavage.me/node-restify/#server-api
// Install restify with npm install restify
// 1.1. Creating a Server.
// http://mcavage.me/node-restify/#Creating-a-Server
var restify = require('restify');
@kevincennis
kevincennis / v8.md
Last active October 7, 2025 21:46
V8 Installation and d8 shell usage

Installing V8 on a Mac

Prerequisites

  • Install Xcode (Avaliable on the Mac App Store)
  • Install Xcode Command Line Tools (Preferences > Downloads)
  • Install depot_tools
    • $ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
    • $ nano ~/.zshrc
    • Add path=('/path/to/depot_tools' $path)