Skip to content

Instantly share code, notes, and snippets.

View gritzko's full-sized avatar

Victor Grishchenko gritzko

View GitHub Profile
@gritzko
gritzko / speed.sh
Created January 11, 2020 11:57
ThinkPad P1 performance tuning
#!/bin/bash
#
# ThinkPad P1 performance tuning
#
# general-purpose power saving
#/usr/sbin/powertop --auto-tune
# Turn off the PROCHOT bit; it throttles the CPU at 80'C
FLAGS=`/usr/sbin/rdmsr 0x1fc -d`
#!/bin/bash
REPO=$PWD
TEST_ROOT=`tempfile -d ~/tmp -p swrm_`
rm -rf $TEST_ROOT
mkdir -p $TEST_ROOT
cd $TEST_ROOT
git clone $REPO
cd swarm
TodoApp.prototype.initSwarm = function () {
this.storage = new Swarm.SharedWebStorage ('webst', {persistent:true});
this.host = Swarm.env.localhost = new Swarm.Host (this.ssnid, '', this.storage);
this.wsServerUri = 'ws://'+window.location.host;
this.host.connect (this.wsServerUri, {delay: 50});
};
var app = app || {};
(function () {
'use strict';
// print every op to the console
Swarm.debug = true;
// ...
// compose a WebSocket URI to connect back to the server;

WeightLock: end-to-end encrypted messaging

To mark the special day of January the 30th I release this article addressing my previously made observation that most crypto messaging schemes are cheaply compromised by non-cryptographic means, i.e. by seizing servers, buying companies, server-side wiretapping, social network analysis and other means.

The point of this article is to introduce a completely end-to-end encrypted messaging scheme that is resistant to the aforementioned

Jay Kreps of LinkedIn recently made an [excellent detailed 360' overview][log] post explaining why log is an underlying data structure of pretty much everything in distributed systems. Well, I feel tempted to add that same holds true for collaborative editing (like in Google Docs and others). Also, I'd like to point out the relation between partially ordered logs, the offline-first approach, AP systems and the so-called Web 3.0 (like in Meteor, pouchdb and others).

[log]: http://engineering.linkedin.com/distributed-systems/log-what-every-software-engineer-should-know-about-real-time-datas-unifying The Log: What every software engineer should know about real-time data's unifying abstraction

Any real-time approach to collaborative editing decomposes a document into a sequence of atomic operations. The most known one is OT, also there is the WOOT/CRDT based family, including CT. GDocs is an OT system. I did a CT system currently in beta at http://letters.yandex.ru. Note that letters is a tiny pilot project