Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# install packages/dependencies for compilation
sudo yum -y install gcc make ncurses-devel
cd /tmp
# the latest version of ncdu is published here: http://dev.yorhel.nl/ncdu
# update the link below if necessary:
wget -nv http://dev.yorhel.nl/download/ncdu-1.10.tar.gz
@erwinverdonk
erwinverdonk / pr.md
Created August 12, 2022 10:31 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@erwinverdonk
erwinverdonk / 01-directory-structure.md
Created March 25, 2021 13:42 — forked from tracker1/01-directory-structure.md
Anatomy of a JavaScript/Node project.

Directory structure for JavaScript/Node Projects

While the following structure is not an absolute requirement or enforced by the tools, it is a recommendation based on what the JavaScript and in particular Node community at large have been following by convention.

Beyond a suggested structure, no tooling recommendations, or sub-module structure is outlined here.

Directories

  • lib/ is intended for code that can run as-is
  • src/ is intended for code that needs to be manipulated before it can be used
@erwinverdonk
erwinverdonk / amazon-linux-1-user-data.txt
Created May 12, 2020 14:54 — forked from devgrok/amazon-linux-1-user-data.txt
Add ephemera storage to Amazon ECS-optimized AMIs (v1)
Content-Type: multipart/mixed; boundary="==BOUNDARY=="
MIME-Version: 1.0
--==BOUNDARY==
MIME-Version: 1.0
Content-Type: text/cloud-config
# this script ensures that empheral storage doesn't get mounted by cloud-init
mounts:
- [ ephemeral0 ]
@erwinverdonk
erwinverdonk / monadic-transaction-test.js
Created February 12, 2020 12:18 — forked from Nekuromento/monadic-transaction-test.js
Testing out using Reader monad for wrapping SQL operations in a transaction
'use strict';
var Promise = require('pacta');
var Reader = require('fantasy-readers');
var pg = require('pg');
var ReaderPromise = Reader.ReaderT(Promise);
var doM = f => {
const get = f();
@erwinverdonk
erwinverdonk / tv.js
Created July 6, 2019 12:28 — forked from ang-st/tv.js
Trading view data
var util=require('util')
var WebSocketClient = require('websocket').client;
var client = new WebSocketClient();
var conn = null
var received = false
client.on('connectFailed', function(error) {
console.log('Connect Error: ' + error.toString());
});
@erwinverdonk
erwinverdonk / spacemacs-cheshe.md
Created January 13, 2018 07:10 — forked from robphoenix/spacemacs-cheshe.md
Spacemacs Cheat Sheet

Useful Spacemacs commands

  • SPC q q - quit
  • SPC w / - split window vertically
  • SPC w - - split window horizontally
  • SPC 1 - switch to window 1
  • SPC 2 - switch to window 2
  • SPC w c - delete current window
  • SPC TAB - switch to previous buffer
  • SPC b b - switch buffers
@erwinverdonk
erwinverdonk / dd.log
Created December 10, 2016 05:23 — forked from ktheory/dd.log
EC2 EBS-SSD vs instance-store performance on an EBS-optimized m3.2xlarge
# /tmp/test = EBS-SSD
# /mnt/test = instance-store
root@ip-10-0-2-6:~# dd bs=1M count=256 if=/dev/zero of=/tmp/test
256+0 records in
256+0 records out
268435456 bytes (268 MB) copied, 3.26957 s, 82.1 MB/s
root@ip-10-0-2-6:~# dd bs=1M count=256 if=/dev/zero of=/tmp/test
256+0 records in
256+0 records out