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
@edef1c
edef1c / config-security
Last active August 29, 2015 14:12
Sane security defaults for SSH clients. Disables everything old and nasty.
# vim: ft=sshconfig
# Sane security defaults for SSH clients. Disables everything old and nasty.
# Unfortunately, SSH appears to provide no way to *exclude* old protocols,
# so we have a list of known-secure key exchange algorithms, symmetric ciphers,
# and message authentication codes.
# Config taken from [https://stribika.github.io/2015/01/04/secure-secure-shell.html]
Host *
KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256
Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
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
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> )
#!/bin/sh
git rebase --interactive --autosquash \
$(git merge-base $(git symbolic-ref --short HEAD) master)
@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 "

target[] = 0.10.26
target[] = 0.12.7
target[] = 1.8.1
target[] = 1.0.1
target[] = 2.4.0
@ralphtheninja
ralphtheninja / node-and-npm-in-30-seconds.sh
Created May 6, 2012 22:09 — forked from isaacs/node-and-npm-in-30-seconds.sh
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl http://npmjs.org/install.sh | sh
@juliangruber
juliangruber / gist:5071867
Last active December 14, 2015 10:28
horst api

horst

Usage

Create a server that listens for hosts:

var horst = require('horst');
var hub = horst();
# setup fd 3 as udp connection to drone
exec 3<>/dev/udp/192.168.1.1/5556
# takeoff
echo -e "AT*REF=1,512\r" >&3
# landing
echo -e "AT*REF=2,0\r" >&3
...
# profit?
@darach
darach / makeymakey-copter.js
Created September 16, 2013 20:16
NodeConf EU NodeCopter - Use EEP (Embedded Event Processing) and Beam (compute streams) to fly an AR Drone. Uses a makey makey (www.makeymakey.com) or keyboard as input
// Copyright © 2013 Darach Ennis. All rights reserved.
//
// Sample EEP/Beam AR drone integration.
// Works with keyboard
// Works with a makey makey - http://www.makeymakey.com/
// Coded during NodeConf EU but not demonstrated or tested ...
//
// Enjoy!
//