Skip to content

Instantly share code, notes, and snippets.

View kvutien's full-sized avatar

Vu Tien Khang kvutien

View GitHub Profile
@kvutien
kvutien / IPFS-welcome.txt
Created September 6, 2021 16:54
IPFS welcome file
pi@ipfs-pi:/mnt/xdisk/ipfs-rpi $ ipfs cat /ipfs/QmQPeNsJPyVWPFDVHb77w8G42Fvo15z4bG2X8D2GhfbSXc/readme
Hello and Welcome to IPFS!
██╗██████╗ ███████╗███████╗
██║██╔══██╗██╔════╝██╔════╝
██║██████╔╝█████╗ ███████╗
██║██╔═══╝ ██╔══╝ ╚════██║
██║██║ ██║ ███████║
╚═╝╚═╝ ╚═╝ ╚══════╝
@kvutien
kvutien / output-IPFS-install.txt
Created September 6, 2021 16:52
output of IPFS install script
pi@ipfs-pi:/mnt/xdisk $ cd ipfs-rpi
pi@ipfs-pi:/mnt/xdisk/ipfs-rpi $ ./install
>>> Starting installation on ARM device compatible with ? (unknown ARM system)
>>> Installing IPFS version v0.10.0-rc1
/tmp/go-ipfs_v0.10.0-rc1_linu 100%[================================================>] 19.86M 4.51MB/s in 4.2s
>>> Starting IPFS
generating ED25519 keypair...done
peer identity: 12D3KooWEoUcXH1CxWLFsniPyBmhG3ZcWoYAi2Z2DMRgYCjCbGWc
initializing IPFS node at /home/pi/.ipfs
to get started, enter:
@kvutien
kvutien / output-clone-IPFS-install-script.txt
Created September 6, 2021 16:50
output cloning the IPFS install script
pi@ipfs-pi:~ $ cd /mnt/xdisk
pi@ipfs-pi:/mnt/xdisk $ sudo git clone https://github.com/claudiobizzotto/ipfs-rpi.git
Cloning into 'ipfs-rpi'...
remote: Enumerating objects: 60, done.
remote: Total 60 (delta 0), reused 0 (delta 0), pack-reused 60
Unpacking objects: 100% (60/60), done.
pi@ipfs-pi:/mnt/xdisk $ ls -ls
total 16896
128 -rwxrwxrwx 1 root root 118 Jan 20 2016 'Samsung portable SSD SW for Android.txt'
9856 -rwxrwxrwx 1 root root 10091479 Apr 29 2020 SamsungPortableSSD_Setup_Mac.pkg
@kvutien
kvutien / output-df-command-showing SSD.txt
Created September 6, 2021 16:47
output of df -T listing the RPi3 file system with SSD plugged
pi@ipfs-pi:~ $ df -T
Filesystem Type 1K-blocks Used Available Use% Mounted on
/dev/root ext4 30384508 1445636 27671172 5% /
devtmpfs devtmpfs 439400 0 439400 0% /dev
tmpfs tmpfs 472680 0 472680 0% /dev/shm
tmpfs tmpfs 472680 6340 466340 2% /run
tmpfs tmpfs 5120 4 5116 1% /run/lock
tmpfs tmpfs 472680 0 472680 0% /sys/fs/cgroup
/dev/sda1 fuseblk 488384000 55040 488328960 1% /mnt/xdisk
/dev/mmcblk0p1 vfat 258095 50110 207985 20% /boot
@kvutien
kvutien / automount-command-in-fstab.txt
Created September 6, 2021 16:42
command to add to fstab to automount SSD
PARTUUID=cab80be4-01 /mnt/xdisk exfat defaults,auto,users,rw,nofail,x-systemd.device-timeout=30,umask=000 0 0
@kvutien
kvutien / output-of-install-exfat-fuse.txt
Created September 6, 2021 16:36
output when installing exfat-fuse
pi@ipfs-pi:~ $ sudo apt install exfat-fuse
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
exfat-utils
The following NEW packages will be installed:
exfat-fuse exfat-utils
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 67.7 kB of archives.
@kvutien
kvutien / lsblk-output-with-SSD.txt
Created September 6, 2021 16:32
output of lsblk zhen SSD is plugged
pi@ipfs-pi:~ $ lsblk -o UUID,NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL,MODE
UUID NAME FSTYPE SIZE MOUNTPOINT LABEL MODE
sda 465.8G brw-rw----
344C-FEA0 `-sda1 exfat 465.8G Samsung_T5 brw-rw----
mmcblk0 29.7G brw-rw----
5DE4-665C |-mmcblk0p1 vfat 256M /boot boot brw-rw----
7295bbc3-bbc2-4267-9fa0-099e10ef5bf0 `-mmcblk0p2 ext4 29.5G / rootfs brw-rw----
@kvutien
kvutien / wpa_supplicant.conf
Created September 6, 2021 16:10
Raspbian wpa-supplicant example
country=LU
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="your wi-fi SSID"
psk="your-wifi-password-example204877"
}
@kvutien
kvutien / orbitdb-tuto-sh.txt
Created July 8, 2021 10:08
output of orbitdb-tuto-sh.js
[1] 28719
Initializing daemon...
go-ipfs version: 0.7.0
Repo version: 10
System version: amd64/darwin
Golang version: go1.14.4
Swarm listening on /ip4/127.0.0.1/tcp/4001
Swarm listening on /ip4/127.0.0.1/udp/4001/quic
...
WebUI: http://127.0.0.1:5001/webui
@kvutien
kvutien / orbitdb-tuto-sh.js
Created July 8, 2021 09:57
Tutorial "Hello World" for IPFS & OrbitDB
/*
* create an orbitDB key-value database of pet animals
* July 2021 - (c) Vu Tien Khang - Machu Picchu
*/
// import the packages
const IPFS = require('ipfs-http-client');
const OrbitDB = require('orbit-db');
async function main () {
const ipfsOptions = { }; // placeholder