Skip to content

Instantly share code, notes, and snippets.

View jxson's full-sized avatar

Jason Campbell jxson

View GitHub Profile
@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
@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")
@dshaw
dshaw / RedisConf2012.md
Created October 29, 2012 16:59
Redis Conf 2012 Talks
@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
@sethladd
sethladd / animated_text_flutter.dart
Created December 19, 2015 19:03
My first animated text with Flutter. This is using a very early version of Flutter. This probably won't work by the time you stumble across this code. :)
import 'package:flutter/material.dart'
show
BuildContext,
Positioned,
Stack,
State,
StatefulComponent,
Text,
Widget,
runApp;
@dominictarr
dominictarr / .travis.yml
Last active January 5, 2016 01:21
pull-streams crash course
language: node_js
node_js:
- '0.10'
- '0.12'
@TooTallNate
TooTallNate / node_pointer.h
Last active April 7, 2016 02:03
C helper functions for wrapping and unwrapping Node Buffer instances as "pointers"
/*
* Helper functions for treating node Buffer instances as C "pointers".
*/
#include "v8.h"
#include "node_buffer.h"
/*
* Called when the "pointer" is garbage collected.

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
@dominictarr
dominictarr / logdb.md
Last active July 29, 2016 17:06
ideas for a modular database

intro

we've had great success building modular database stuff on top of leveldb with node, but as I have learnt more about databases it's become apparent to me that the idea of a modular database would be better implemented at a slightly lower level.

Level db provides a sorted key:value store, which, because of the sorted property, many things can be implemented on top of. For example, for replication, or for consistent materialized views, we often need a write ahead log. This can easily be implemented via a batch write to level, and writing the log into a section of the leveldb key space which is treated as append only.

@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;