Skip to content

Instantly share code, notes, and snippets.

Avatar

@RubenKelevra RubenKelevra

View GitHub Profile
@RubenKelevra
RubenKelevra / IPFS-convert-datastore-with-system-service-installation.md
Created May 4, 2020
IPFS convert datastore with system service installation
View IPFS-convert-datastore-with-system-service-installation.md

Compile the tool https://github.com/ipfs/ipfs-ds-convert via your user account

echo "$GOPATH" -> if empty go to ~/go/bin/, else "$GOPATH/bin/"

copy the ipfs-ds-convert binary to /tmp/:

cp -a ipfs-ds-convert /tmp/

convert your datastore:

View gist:7a913f379afe758b083c3867c0ee5827
I understand that there's the ability to build a cluster with ipfs-cluster, with friends. But this is a shared storage space (everybody can delete stuff - not very good).
How about adding the ability to add peers as friends to a list, and give them the ability to store a given amount of bytes on my hard drive?
This could create a Web of Trust.
When the friend will pin a file, the file can be sharded and replicated according to his specifications to his list of peers - I will get also some parts of the file.
To acknowledge (somewhat reliably) that a "friend" peer still holds the data, he can be asked like once a day to XOR a salt to the file and send me the checksum. A list of salted-checksums can be calculated before seeding, avoiding that the data has to remain "local" to ask the nodes that they still hold our chunks reliably.
View gist:2f0ba915bbb58db555860e4aaf8cb100
KERNELVER=`uname -r`
LOAD=`uptime | awk -F'load average:' '{ print $2 }'`
# get uptime from /proc/uptime
uptime=$(</proc/uptime)
uptime=${uptime%%.*}
seconds=$(( uptime%60 ))
minutes=$(( uptime/60%60 ))
View 0001-revert-commit-which-breaks-multi-monitor-support.patch
From 1cc4b03fc2740bdad1debcffec10cb8141b40b94 Mon Sep 17 00:00:00 2001
From: RubenKelevra <ruben@vfn-nrw.de>
Date: Fri, 16 Sep 2016 11:16:53 +0200
Subject: [PATCH] revert commit which breaks multi-monitor-support
---
freerdp/trunk/PKGBUILD | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/freerdp/trunk/PKGBUILD b/freerdp/trunk/PKGBUILD
View 0001-Revert-commit-which-destroyes-multi-monitor-support-.patch
From 0a89047e105431ddca682f9ea7ce62d0f869f052 Mon Sep 17 00:00:00 2001
From: RubenKelevra <ruben@vfn-nrw.de>
Date: Wed, 21 Sep 2016 11:05:50 +0200
Subject: [PATCH] fix multi-monitor-support
---
client/X11/xf_window.c | 139 +++++++++++++++++++------------------------------
1 file changed, 55 insertions(+), 84 deletions(-)
diff --git a/client/X11/xf_window.c b/client/X11/xf_window.c
View udp-statistics
#!/usr/bin/perl -w
if ( $ARGV[0] ) {
if ( $ARGV[0] eq 'autoconf' ) {
if ( -r '/bin/netstat') {
print "yes\n";
exit 0;
}
print "no\n";
View start_horst.sh
sudo systemctl mask NetworkManager
sudo systemctl stop NetworkManager
sudo ip link set dev wlp3s0 down
sudo iw dev wlp3s0 del
sudo iw phy phy0 interface add mon0 type monitor
sudo horst -i mon0
sudo iw dev mon0 del
sudo iw phy phy0 interface add wlp3s0 type managed
sudo ip link set dev wlp3s0 up
sudo systemctl unmask NetworkManager
@RubenKelevra
RubenKelevra / reboot_on_kernel_updates.sh
Last active Jul 29, 2016
CentOS reboot on kernel updates
View reboot_on_kernel_updates.sh
#!/bin/bash
LAST_KERNEL=$(rpm -q --last kernel | perl -pe 's/^kernel-(\S+).*/$1/' | head -1)
CURRENT_KERNEL=$(uname -r)
if [ "$LAST_KERNEL" != "$CURRENT_KERNEL" ]; then
logger 'automatic reboot by yum-daily in 10 seconds'
sleep 10
sync
systemctl reboot&
fi
View patched PGKBUILD for homeassistant
# Maintainer: Grégoire Seux <grego_aur@familleseux.net>
# Contributor: Dean Galvin <deangalvin3@gmail.com>
_pkgname="home-assistant"
pkgname="python-home-assistant"
pkgdesc='Home Assistant is an open-source home automation platform running on Python 3'
pkgver=0.24.1
pkgrel=1
url="https://home-assistant.io/"
license=('MIT')
arch=('any')
View merge without merge commit.txt
git merge v1.0 --no-commit --no-ff
rm .git/MERGE_HEAD