Skip to content

Instantly share code, notes, and snippets.

@zentralwerkstatt
zentralwerkstatt / instructions.md
Last active February 20, 2023 23:55
Install Syncthing on Linux
  • Install the necessary packages:
sudo apt-get install apt-transport-https ca-certificates
curl -s https://syncthing.net/release-key.txt | sudo apt-key add -
echo "deb https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list
sudo apt-get update
sudo apt-get install syncthing
sudo apt-get install git
  • Start syncthing once:
@zentralwerkstatt
zentralwerkstatt / instructions.md
Last active March 29, 2019 19:49
Unix cheat sheet
  • df -h: Show disk space for humans
  • scp file user@server:path/file: Transfer file over SSH
  • whereis command: Path to command
  • ssh user@server: Start SSH session (exit with exit)
  • lshw -short: Hardware information for humans
  • ls -lah dir: Show content of directory for humans, including hidden files
  • cd dir: Change directory
  • mkdir: Create directory
  • rm -rf dir: Delete full directory
  • rm file: Delete file
@zentralwerkstatt
zentralwerkstatt / instructions.md
Last active April 14, 2020 09:43
Set up a "GitHub Pages"-style repository on a server
  • On the server:
sudo apt-get install git-core
cd ~
mkdir repo.git
cd repo.git
git init --bare
nano hooks/post-receive
  git --git-dir /home/user/repo/.git --work-tree /home/user/repo pull origin master
chmod +x hooks/post-receive