Skip to content

Instantly share code, notes, and snippets.

View ralphtheninja's full-sized avatar
🏠
Working from home

ralphtheninja

🏠
Working from home
View GitHub Profile
@joepie91
joepie91 / getting-started.md
Last active February 21, 2024 14:45
Getting started with Node.js

"How do I get started with Node?" is a commonly heard question in #Node.js. This gist is an attempt to compile some of the answers to that question. It's a perpetual work-in-progress.

And if this list didn't quite answer your questions, I'm available for tutoring and code review! A donation is also welcome :)

Setting expectations

Before you get started learning about JavaScript and Node.js, there's one very important article you need to read: Teach Yourself Programming in Ten Years.

Understand that it's going to take time to learn Node.js, just like it would take time to learn any other specialized topic - and that you're not going to learn effectively just by reading things, or following tutorials or courses. _Get out there and build things!

target[] = 0.10.26
target[] = 0.12.7
target[] = 1.8.1
target[] = 1.0.1
target[] = 2.4.0
@bnagy
bnagy / gpgmutt.md
Last active March 30, 2024 07:52
Mutt, Gmail and GPG

GPG / Mutt / Gmail

About

This is a collection of snippets, not a comprehensive guide. I suggest you start with Operational PGP.

Here is an incomplete list of things that are different from other approaches:

  • I don't use keyservers. Ever.
  • Yes, I use Gmail instead of some bespoke hipster freedom service
@dominictarr
dominictarr / .travis.yml
Last active January 5, 2016 01:21
pull-streams crash course
language: node_js
node_js:
- '0.10'
- '0.12'
@deanlandolt
deanlandolt / bytesspace-log.md
Last active August 29, 2015 14:23
bytespace-batchlog

bytespace-batchlog

Write-ahead logging for transactions in a bytespace.

Write operations are given a monotonically increasing id and written to transaction log. Batches are processed asynchronously and added to the store. By default, query methods withheld until batch processing is complete for the commit which was current at the time the query is received.

Batch processing pipeline

The batch processing pipeline exposes extensions points to allow pre-commit hooks to do additional work before committing to the transaction log, and post-commit hooks to do additional work after a transaction. Work can be isolated to specific subspaces, allowing heavyweight analytical processing to proceed without blocking queries in hot-path or transaction-heavy spaces. Analytical work can be delegated to subprocesses or even remote machines. Work on multiple commits can be batched together, and monotonically increasing batch ids can be leveraged to allow reads on possibly stale data to be held, e.g. until the next "

/**
* Simple userland heapdump generator using v8-profiler
* Usage: require('[path_to]/HeapDump').init('datadir')
*
* @module HeapDump
* @type {exports}
*/
var fs = require('fs');
var profiler = require('v8-profiler');
#!/bin/sh
git rebase --interactive --autosquash \
$(git merge-base $(git symbolic-ref --short HEAD) master)
var page;
window.onload = function() {
page = document.getElementsByTagName('html');
page.addEventListener('DOMMouseScroll', <HANDLER>, false);
}
window.mimicWheel = function() {
var evt = document.createEvent("MouseEvents");
evt.initMouseEvent('DOMMouseScroll', <OPTIONS> )
@max-mapper
max-mapper / readme.md
Last active May 14, 2022 09:12
list of interdisciplinary open source conferences

Interdisciplinary Open Source Community Conferences

Criteria

  • Must be an event that someone involved in open source would be interested in attending
  • Must be a community oriented event (no corporate owned for-profit events here please)
  • Can't be about a specific language/framework.

Leave suggestions in the comments below

var test = require('tape');
var bytewise = require('bytewise');
var encode = bytewise.encode;
var MIN = bytewise.MIN;
var MAX = bytewise.MAX;
test('tuple queries', function (t) {
var yearly = tuples('reports', 'yearly');
// component keys of the tuple space query are available by index