Skip to content

Instantly share code, notes, and snippets.

View jxson's full-sized avatar

Jason Campbell jxson

View GitHub Profile
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@dstokes
dstokes / changelog.sh
Last active August 29, 2015 14:10
Create a CHANGELOG.md with Bash + Git
#!/bin/bash
# vim: set syntax=sh :
#
# Generate a changelog
#
git tag | sort -r | awk '
/^v/ {
# print commit log diff
if(NR>1)
system("git log " $1 "..." prev " --pretty=format:\"- [%s](http://github.com/<owner>/<repo>/commit/%H) \" | tail -n+2")
@staltz
staltz / introrx.md
Last active April 25, 2024 04:18
The introduction to Reactive Programming you've been missing
@trevnorris
trevnorris / perf-flame-graph-notes.md
Last active December 24, 2023 05:25
Quick steps of how to create a flame graph using perf

The prep-script.sh will setup the latest Node and install the latest perf version on your Linux box.

When you want to generate the flame graph, run the following (folder locations taken from install script):

sudo sysctl kernel.kptr_restrict=0
# May also have to do the following:
# (additional reading http://unix.stackexchange.com/questions/14227/do-i-need-root-admin-permissions-to-run-userspace-perf-tool-perf-events-ar )
sudo sysctl kernel.perf_event_paranoid=0

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.

@totherik
totherik / npmjs.ini
Last active August 29, 2015 13:56
npmjs.org registry install script
; CouchDB Config
; Drop in PREFIX/local.d/npmjs.ini
[couch_httpd_auth]
public_fields = appdotnet, avatar, avatarMedium, avatarLarge, date, email, fields, freenode, fullname, github, homepage, name, roles, twitter, type, _id, _rev
users_db_public = true
[httpd]
secure_rewrites = false
@chromatic
chromatic / gist:8467580
Last active April 17, 2017 20:33
A very basic, procedural TAP library for the Rust language (hardly idiomatic, but it's my second day)
#[crate_id(name = "rusttap")];
#[crate_type = "lib"];
#[feature(globs)];
#[desc = "TAP implementation for rust"];
#[license = "BSD"];
#[allow(dead_code)];
#[allow(unused_variable)];
pub mod rusttap {
use std::io;

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
@juliangruber
juliangruber / gist:7337388
Created November 6, 2013 14:57
browserify bundling tests
# simple bundle
$ time browserify --debug lib/boot/index.js | wc -c
1397809
real 0m1.726s
user 0m1.540s
sys 0m0.139s
# bundle without node_modules

Recipe for customizing a SmartoOS image and cloning it

1. Create base image

1.1. Download and install the base image:

[root@00-0c-29-aa-24-ba ~]# imgadm list
UUID                                  NAME             VERSION  OS       PUBLISHED
9eac5c0c-a941-11e2-a7dc-57a6b041988f  base64           13.1.0   smartos  2013-04-26T15:17:57Z