Skip to content

Instantly share code, notes, and snippets.

View deadem's full-sized avatar
🏒
Focusing

deadem deadem

🏒
Focusing
View GitHub Profile
@deadem
deadem / yd-syncthing.sh
Created July 18, 2024 15:13 — forked from nsuvorov83/yd-syncthing.sh
Run containers yandex-disk and syncthing
#See Dockerfile here: https://github.com/nsuvorov83/docker-yandex.disk
#Setup yandex.disk
docker run -it --rm --name yandex-disk -v yd-config:/root/.config/yandex-disk -v yd-data:/root/Yandex.Disk yandex-disk sh -c "yandex-disk --dir=/root/Yandex.Disk setup"
#Run yandex.disk as a daemon
docker run -d --restart always -v yd-config:/root/.config/yandex-disk -v yd-data:/root/Yandex.Disk yandex-disk sh -c "yandex-disk --dir=/root/Yandex.Disk start && tail -f /dev/null"
#Run Syncthing with the same volume as yandex.disk
docker run -d --name=syncthing --hostname=syncthing -e PUID=1000 -e PGID=1000 -e TZ=Europe/Moscow -p 8384:8384 -p 22000:22000/tcp -p 22000:22000/udp -p 21027:21027/udp -v syncthing-conf:/config -v yd-data:/data1 --restart unless-stopped lscr.io/linuxserver/syncthing:latest
@deadem
deadem / open-vm-tools-vmware-ubuntu-sharing.md
Created February 27, 2021 12:04 — forked from darrenpmeyer/open-vm-tools-vmware-ubuntu-sharing.md
open-vm-tools and VMWare Shared Folders for Ubuntu guests

(NB: adapted from this Ask Ubuntu thread -- tested to work with Ubuntu 16 LTS branches and Ubuntu 17.10)

Unlike using VMWare Tools to enable Linux guest capabilities, the open-vm-tools package doesn't auto-mount shared VMWare folders. This can be frustrating in various ways, but there's an easy fix.

TL;DR

Install open-vm-tools and run:

sudo mount -t fuse.vmhgfs-fuse .host:/ /mnt/hgfs -o allow_other
@deadem
deadem / latency.markdown
Created October 11, 2016 18:19 — forked from hellerbarde/latency.markdown
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs