Skip to content

Instantly share code, notes, and snippets.

View orlin's full-sized avatar

Orlin M Bozhinov orlin

  • Astrolet
  • Varna, Bulgaria
  • X @orlin
View GitHub Profile

So, as I mentioned last time, I have two fundamental goals with dat that are not addressed by simply running dat share.

  • Uptime: making sure that the site is seeded even if my local laptop is closed, eaten by a bear, or disconnected from the internet
  • Resilience: ensuring that there's a way to restart my website if the original seeding computer is lost. I try to make everything on my primary work/personal computer work in such a way that I can recover it all, easily, onto a new machine if I need to

To break these down a bit more, uptime is a combination of two things:

  • Ensuring that there are seeders
  • Ensuring that those seeders are seeding, and they're up-to-date
@adammw
adammw / README.md
Created August 3, 2012 06:30
Node.js for Raspberry Pi

Node.js for Raspberry Pi

Pre-built binaries

Recent releases have been pre-built using cross-compilers and this script and are downloadable below.

If you have found these packages useful, give me a shout out on twitter: @adammw

@mbbx6spp
mbbx6spp / Vagrantfile.rb
Created February 5, 2011 05:36
Riak cluster Vagrantfile to offer an alternative to Basho Chef+Vagrant blog post suggestion and receive feedback at http://blog.basho.com/2011/02/04/creating-a-local-riak-cluster-with-vagrant-and-chef/
# Offering alternative Chef + Vagrant Riak cluster setup to the following blog post at basho:
# http://blog.basho.com/2011/02/04/creating-a-local-riak-cluster-with-vagrant-and-chef/
# Assumes Vagrant 0.7.0+ and VirtualBox 4.0+
# Now you should be able to launch your X (where X=4 in this case) vagrant VMs with the following:
# % vagrant up db1
# % vagrant up db2
# % vagrant up db3
# % vagrant up db4
@lantiga
lantiga / state.ki.js
Last active July 21, 2019 23:07
State management in ki (http://ki-lang.org)
ki macro (export $name $val)
(js exports.$name = $val)
ki require core
// Ported from https://github.com/clojure/clojurescript/blob/master/src/cljs/clojure/data.cljs
ki (ns diff
@belisarius222
belisarius222 / ford-fusion-writeup.md
Last active August 5, 2020 14:17
ford fusion writeup

Ford Fusion

Overview and Rationale

Ford Fusion was an overhaul of Urbit's over-the-air upgrade process and a rewrite of its build system. The new update system corrects a few long-standing bugs with the previous one, and the new build system is simpler, smaller (by around 5,000 lines), and easier to manage.

Since deployment of Ford Fusion to the livenet in late June, over-the-air updates (OTAs) have been much smoother. Before Ford Fusion, it was common for an OTA to take several hours, use too much memory, and leave ships in inconsistent states. After Ford Fusion, multiple OTAs have been pushed out, including kernelspace changes, and most users didn't even notice.

Urbit has always been able to update itself OTA, but this process has often been rocky. Updating an operating system kernel on-the-fly is a difficult problem in general, like performing heart replacement surgery on yourself while running a marathon. Code that allows Linux to update its kernel in this way became a startup called Ksplice, won

@max-mapper
max-mapper / readme.md
Last active September 29, 2020 18:45
merkle dag replication draft

Synchronization for Merkle graphs

abstract

intro

  • Problem we’re solving: Efficient p2p Merkle DAG replication
  • Proposed solution in a nutshell: Simplistic and symmetric protocol with reference implementation in Node.js
@iamkvein
iamkvein / hook_method.js
Created March 9, 2012 14:32
Improved way of temporarily replacing a method on an object
var install_hook_to = function(obj) {
if (obj.hook || obj.unhook) {
throw new Error('Object already has properties hook and/or unhook');
}
obj.hook = function(_meth_name, _fn, _is_async) {
var self = this,
meth_ref;
@swannodette
swannodette / om_data.cljs
Last active January 9, 2021 16:09
Om + DataScript
(ns om-data.core
(:require [om.core :as om :include-macros true]
[om.dom :as dom :include-macros true]
[datascript :as d]))
(enable-console-print!)
(def schema {})
(def conn (d/create-conn schema))
@jimeh
jimeh / jquery.myplugin.coffee
Created April 7, 2011 23:44
Example jQuery plugin written in CoffeeScript, and the resulting compiled JavaScript file.
$.fn.extend
myplugin: (options) ->
self = $.fn.myplugin
opts = $.extend {}, self.default_options, options
$(this).each (i, el) ->
self.init el, opts
self.log el if opts.log
$.extend $.fn.myplugin,
default_options:
@tbranyen
tbranyen / server.js
Last active July 4, 2021 18:44
backbone/node.js pushState enabled server
// Require libraries
var os = require("os");
var fs = require("fs");
var readline = require("readline");
var cluster = require("cluster");
var express = require("express");
var site = express();
// Var up, bro
var i, read;