Skip to content

Instantly share code, notes, and snippets.

🐢
Learning rust and PostgreSQL

Lars-Magnus Skog ralphtheninja

🐢
Learning rust and PostgreSQL
Block or report user

Report or block ralphtheninja

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ,prebuildrc
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 Jul 22, 2019
Mutt, Gmail and GPG
View gpgmutt.md

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
@substack
substack / backup
Last active Mar 12, 2016
backup and restore settings
View backup
#!/bin/bash
SERVER=yourwebsite.com
tar -cjf- ~/.crypt/passwd ~/.ssh ~/.bashrc ~/.profile ~/.vimrc ~/.gitconfig \
~/.config/chromium ~/.mozilla \
| openssl enc -aes-256-cbc \
| ssh $SERVER 'cat>~/www/backup/`date +%F.%T`'
ssh $SERVER 'ls -1 ~/www/backup | grep ^[0-9] | sort > ~/www/backup/list.txt'
@dominictarr
dominictarr / .travis.yml
Last active Jan 5, 2016
pull-streams crash course
View .travis.yml
language: node_js
node_js:
- '0.10'
- '0.12'
@deanlandolt
deanlandolt / bytesspace-log.md
Last active Aug 29, 2015
bytespace-batchlog
View bytesspace-log.md

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 "

View heapdump.js
/**
* 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');
View git-squash
#!/bin/sh
git rebase --interactive --autosquash \
$(git merge-base $(git symbolic-ref --short HEAD) master)
View wheel
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> )
@maxogden
maxogden / readme.md
Last active Nov 13, 2018
list of interdisciplinary open source conferences
View readme.md

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

View gist:849eb63d28f7e7bb8c97
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
You can’t perform that action at this time.