Spark in me
2.31K subscribers
670 photos
44 videos
114 files
2.59K links
Lost like tears in rain. DS, ML, a bit of philosophy and math. No bs or ads.
Download Telegram
Tricky rsync flags

Rsync is the best program ever.

I find these flags the most useful
--ignore-existing (ignores existing files)
--update (updates to newer versions of files based on ts)
--size-only (uses file-size to compare files)
-e 'ssh -p 22 -i /path/to/private/key' (use custom ssh identity)

Sometimes first three flags get confusing.

#linux
SSH hopping from Windows?

Yeah, finally I found a recipe.
I always was one flag away from it.
Rsync at your pleasure and have your key only on your laptop!

You just need to:

(0) Use PuTTY / PuTTT-gen to create your ssh key (note that putty format and open-ssh format are different!)
(1) (or just import your open-ssh key into PuTTY-gen if you have it)
(2) Add your private key to pageant (PuTTY authentication agent)
(3) Do not forget to check Allow agent forwarding flag in PuTTY under Connection => SSH => Auth
(4) SSH into your server
(5) Go to /etc/ssh/ssh_config
(6) Uncomment and change the ForwardAgent yes line

Now you can rsync as much as you want.
Also inside of tmux.

#linux
Spark in me
2020 DS / ML Digest 2 Highlights - New STT benchmarks from FAIR - Analysis of GPT-2 by thegradient - Google’s Meena, a 2.6 billion parameter end-to-end trained neural conversational model (not AGI ofc) - OpenAI now uses PyTorch - LaserTag - cool idea on…
Setting up Wi-Fi on a Headless Server

Yeah, that's a pain in the ass!
Chicken and egg problem - you need to install packages, but you need to set-up Wi-Fi first.
So first you need to install packages ... by copying them via USB stick.
Remember CD-ROM sneakernet? =)
Also making Wi-Fi robust to reboots is a pain.

This guides worked for me on Ubuntu 18.04.3 server:

- https://www.linuxbabe.com/command-line/ubuntu-server-16-04-wifi-wpa-supplicant
- rc.local worked instead of systemd or crontab for me https://gist.github.com/mohamadaliakbari/1cb9400984094541581fff07143e1c9d
- better use your router to nail down the static IP

#linux
Ubuntu Snap Strings Attached

Ubuntu has its play store ... and when you install Ubuntu 20 server from scratch ... it offers you to pre-install Docker.

Do not do it. It comes with some app armor bs, which prevents you from using docker-compose and glitches with nvidia-docker.

Canonical forcing their app store too much, selling out or it is just early stage? I do not know. But their app store sucks compared to apt.

#linux
Downloading via SOCKS 5 Proxy With Wget

Afaik, wget supports only HTTP proxies. aria2c also does not support socks.

No problem, you can use socksify:

sudo apt-get install dante-client
SOCKS_USERNAME="user" SOCKS_PASSWORD="password" SOCKS_SERVER="11.111.11.11:1080" socksify wget -c url

Yet another linux magic trick!

#linux
VPN Landscape Changes

There used to be only 2 types of popular VPN services:

1. Self-hosted Open VPN (which is VERY painful to setup) from scratch

2. Using "middlemen" who even overtook YouTube with their sponsored ads. It was so noxious, that everyone was joking about it

But the time showed that there were huge security breaches with some of these "experts" ... and look, these are marketing people, who are basically re-selling you Open VPN at 10x the cost. If it is not enough - they would just sell or lose your data. There is NO INCENTIVE for them to care, as famously quoted.

What has changed lately:

- Wireguard appeared. Supposedly it is much easier to install by yourself. Did not try it myself. Please report your experience

- Enterprise OSS tools like pritunl still exist, which are basically enterprise wrappers around Open VPN and Wireguard. Their docs become more and more convoluted and enterprise focused, but I guess it still works. Key advantage - it is fully OSS and kind of independent (cannot fully check it)

- Open VPN itself ... wrote a "pritunl"-like app called OpenVPN Access Server (great name by the way), and now it is offered by major hosting providers as a bundled app at the price of hosting (DO, Vultr, Hetzner, but Hetzner is not fully bundled). I may be wrong here, but they learned their mistake and made this app not OSS.

What would I choose, if I were to make a choice now? I guess Wireguard or Pritunl.

What do you think?

#linux