Skip to content

Instantly share code, notes, and snippets.

View joehand's full-sized avatar
🌳
be like tree

Joe Hand joehand

🌳
be like tree
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

Transferring your dats from one beaker to another

WARNING 1. If you do this, it MUST be either a transfer or a backup. Don't do this to run your Dats from two different computers. The Dat protocol doesn't support multiple computers running a Dat at the same time (yet) and you WILL corrupt your data.

WARNING 2. This will nuke the data in your new install.

WARNING 3. I havent actually tried this. Good luck!

If you're using Beaker 0.7.x, you'll need to copy part of your Beaker app data, and then your library folder (~/Sites).

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
@cryzed
cryzed / fix-infinality.md
Last active April 30, 2024 22:01
A set of instructions on how to fix the harfbuzz + Infinality issue and restoring good-looking, Infinality-like font rendering.

Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.

Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.

Check the gist's comments for any further tips and instructions, especially if you are running into problems!

Screenshots

Results after following the guide as of 11.01.2017 13:08:

dat architecture

  ┌─────────────┐     ┌─────────────┐    ┌─────────────┐     ┌─────────────┐
  │             │     │             │    │             │     │             │
  │   Website   │     │   Desktop   │    │ HTTP Server │     │     CLI     │
  │             │     │             │    │             │     │             │
  └─────────────┘     └─────────────┘    └─────────────┘     └─────────────┘
         ▲                   ▲                  ▲                   ▲       
         └───────────────────┴──────────┬───────┴───────────────────┘       
@pfrazee
pfrazee / link-checker.js
Created September 17, 2016 20:02
Quick link-checker script for Jekyll sites
@mafintosh
mafintosh / index.js
Last active July 26, 2016 23:01
dat stats demo that plays sintel.mp4
var swarm = require('hyperdrive-archive-swarm')
var hyperdrive = require('hyperdrive')
var stats = require('hypercore-stats-ui')
var http = require('http')
var memdb = require('memdb')
var serve = require('hyperdrive-http')
var drive = hyperdrive(memdb())
// a remote dat

Dat Core Technical Roadmap

A small roadmap for the core tech in dat. this mostly relates to the core dependencies such as hypercore/hyperdrive and not the cli or dat.land

Implementation

1. Finish random access APIs

Adding var cursor = drive.createByteCursor(file). A cursor api that quickly allows you to seek anywhere in the file content.

@PurpleBooth
PurpleBooth / README-Template.md
Last active May 3, 2024 03:58
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites