Skip to content

Instantly share code, notes, and snippets.

@cjihrig
cjihrig / README libvirt cloud-init with static networking.md
Created February 14, 2019 20:22 — forked from itzg/README libvirt cloud-init with static networking.md
Configuring a libvirt domain with a static IP address via cloud-init local datasource

Here is how to create a cloud-init disk image and OS disk image suitable for configuring into a libvirt domain file.

In my case I am naming my domain (a.k.a. virtual machine or VM) xenial with a static IP address of 192.168.0.101. The filenames "network-config" and "user-data" files are arbitrary, so they can be named with a prefix for the domain, etc.

First, get the cloud image and convert into QCOW2 format:

qemu-img convert -O qcow2 xenial-server-cloudimg-amd64-disk1.img xenial-server-cloudimg-amd64-disk1.qcow2

Challenges in using post-mortem debugging with async/await

Introduction

async/await is a new feature of the EcmaScript programming language that combines generators and promises to improve the language-level model for writing asynchronous code.

It is [currently in "stage 3"](https://github.com/tc39/ecma262#current- proposals) of the TC39 process,

@cjihrig
cjihrig / README.md
Created November 11, 2016 20:21 — forked from renchap/README.md
One-line certificate generation/renews with Letsencrypt and nginx

Prerequisites : the letsencrypt CLI tool

This method allows your to generate and renew your Lets Encrypt certificates with 1 command. This is easily automatable to renew each 60 days, as advised.

You need nginx to answer on port 80 on all the domains you want a certificate for. Then you need to serve the challenge used by letsencrypt on /.well-known/acme-challenge. Then we invoke the letsencrypt command, telling the tool to write the challenge files in the directory we used as a root in the nginx configuration.

I redirect all HTTP requests on HTTPS, so my nginx config looks like :

server {

build

Clone and build Node for analysis:

$ git clone https://github.com/joyent/node.git
$ cd node
$ export GYP_DEFINES="v8_enable_disassembler=1"
$ ./configure
$ make -j4
@cjihrig
cjihrig / v8.md
Last active August 29, 2015 14:16 — forked from kevincennis/v8.md

Installing V8 on a Mac

Prerequisites

  • Install Xcode (Avaliable on the Mac App Store)
  • Install Xcode Command Line Tools (Preferences > Downloads)

Build V8

  • git clone git@github.com:v8/v8.git
@cjihrig
cjihrig / mdb.md
Last active August 29, 2015 14:06 — forked from tjfontaine/mdb.md

MDB is unlike most debuggers you've experienced.

It is not a source level debugger like gdb or lldb or even Node's builtin debugger

Generally used for postmortem analysis.

Postmortem is for Production and Development

We operate mostly on core files, though you can attach to running processes as well.

@cjihrig
cjihrig / install.md
Created August 20, 2014 23:16 — forked from geek/install.md