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
@cjdelisle
cjdelisle / cjdns_packet_priority.md
Last active December 8, 2019 19:22
Cjdns Packet Prioritization System

Cjdns Packet Prioritization System

The packet prioritization system is designed to allow access to a link to be exercised by it's owner, thus allowing for bandwidth to be sold and used.

  • A packet SHOULD NOT be dropped unless there is actually not enough bandwidth to send everything.
  • A bandwidth lease MUST be able to send at least its bandwidth limit.
  • Unused bandwidth SHOULD be divided between those leases which are currently sending traffic in a fair way based on the relative size of the leases.

ARCHITECTURE

cabal clients
  cabal-core

cabal-core
  discovery-swarm
    dat-swarm-defaults
  kappa-view-level
 kappa-core
module levelup
version
downloads in the
last 30 days
total downloads
level-sublevel ~0.19.0 151,300 1,226,226
pouchdb 1.3.8 124,983 1,162,731
browserify-fs ^0.18.2 100,027 458,142
pouchdb-adapter-leveldb-core 1.3.8 97,566 419,461
level-packager ~1.3.0 74,165 758,119
merkle-patricia-tree ^1.2.1 13,231 127,025
dynalite ^1.3.3 10,553 258,090
mosca ^1.3.8 9,513 171,844
var neat = require('neat-log')
var output = require('neat-log/output')
var progress = require('progress-string')
var crypto = require('crypto')
var hypercore = require('hypercore')
var hyperdiscovery = require('hyperdiscovery')
var feed = hypercore('data', process.argv[2], {valueEncoding: 'json'})
@max-mapper
max-mapper / readme.md
Created March 10, 2017 00:03
DIY DAT DYNDNS

for ubuntu, to set up a dynamic dns service that tells you what the external ip of some machine is

  • npm install dat lil-pids run-every add-to-systemd -g
  • mkdir ipdat; cd ipdat; dat create; cd ..;
  • edit file services with this:
cd ipdat && dat sync
cd ipdat && run-every 3600 curl ipinfo.io/ip > ip.txt
@ipbastola
ipbastola / clean-up-boot-partition-ubuntu.md
Last active August 16, 2024 13:39
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@jaronkk
jaronkk / cleanup_docker.sh
Created June 2, 2016 14:11
Cleanup and reset docker on Jenkins workers / slaves
#!/bin/bash
# This script should be located on each Jenkins slave, and the jenkins user should have permission to run it with sudo
# Attempts to cleanly stop and remove all containers, volumes and images.
docker ps -q | xargs --no-run-if-empty docker stop
docker ps -q -a | xargs --no-run-if-empty docker rm --force --volumes
docker volume ls -q | xargs --no-run-if-empty docker volume rm
docker images -a -q | xargs --no-run-if-empty docker rmi -f
# Stops the docker service, unmounts all docker-related mounts, removes the entire docker directory, and starts docker again.
{
"name": "utp-hole-punching",
"dependencies": {
"utp-native": "*",
"discovery-channel": "*"
}
}
var duplexify = require('duplexify')
var lpstream = require('length-prefixed-stream')
var ids = require('numeric-id-map')
var util = require('util')
function RPC () {
duplexify.call(this) // subclass yolo
this._encode = lpstream.encode()
this._decode = lpstream.decode()
this._pending = ids()
#!/bin/bash
#
# /etc/rc.d/init.d/xvfbd
#
# chkconfig: 345 95 28
# description: Starts/Stops X Virtual Framebuffer server
# processname: Xvfb
#