Skip to content

Instantly share code, notes, and snippets.

Avatar

Fabian Offert zentralwerkstatt

View GitHub Profile
@zentralwerkstatt
zentralwerkstatt / instructions.md
Last active Sep 6, 2021
Run Streamlit apps from within Google Colab
View instructions.md
!pip install streamlit
!npm install localtunnel
!streamlit run http://app.py &>/dev/null&
!npx localtunnel --port 8501
@zentralwerkstatt
zentralwerkstatt / instructions.md
Last active Dec 15, 2020
Adapt KDE Plasma scaling to 4K monitor
View instructions.md
@zentralwerkstatt
zentralwerkstatt / instructions.md
Created Oct 29, 2020
Get contents of S3 bucket
View instructions.md
View instructions.md
  • Add user with home directory: sudo useradd -m username
  • As user, change default shell: chsh -s /bin/bash
  • Set temp. password: sudo passwd username
  • Create group: sudo groupadd groupname
  • Add users: usermod -a -G groupname username
  • Make shared directory: sudo mkdir /home/groupname
  • Set group for shared directory: sudo chgrp groupname /home/groupname
  • Add write access for group: sudo chmod g+w /home/groupname
  • "Set GID" for group (all files created owned by group): sudo chmod 2775 /home/groupname
  • Change to different user to test: su - username
@zentralwerkstatt
zentralwerkstatt / instructions.md
Created Nov 1, 2018
Update Anaconda environment
View instructions.md
  • source activate environment
  • conda update --all
@zentralwerkstatt
zentralwerkstatt / instructions.md
Last active Aug 20, 2020
Change git history comprehensively
View instructions.md
  • On a Mac, we might need to run first: git config --global core.trustctime false
  • Rebase: git rebase -i --root
  • Edit according to instructions
  • Set commit date as author date: git filter-branch -f --env-filter 'GIT_COMMITTER_DATE=$GIT_AUTHOR_DATE; export GIT_COMMITTER_DATE'
  • Force push: git push origin +master
  • In case of errors: git rebase --abort
@zentralwerkstatt
zentralwerkstatt / instructions.md
Last active Apr 13, 2018
"The following packes have been kept back..."
View instructions.md

sudo apt install packages

@zentralwerkstatt
zentralwerkstatt / instructions.md
Last active Jul 5, 2021
SSH into Linux Subsystem for Windows
View instructions.md
  • In /etc/ssh/sshd_conf, set UsePrivilegeSeparation to no
  • In /etc/ssh/sshd_conf, temporarily enable plaintext passwords
  • In /etc/ssh/sshd_conf, change port (e.g. to 23) to avoid confusion with Windows SSH server
  • sudo service ssh restart
  • Add alternative port as a new rule to Windows firewall
  • On the client: ssh-copy-id user@server
  • In /etc/ssh/sshd_conf, re-disable plaintext passwords

To fix Could not load host key ... error:

  • sudo ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
View instructions.md
  • On the client: ssh-copy-id user@server
  • On the server, in etc/ssh/sshd_config: PasswordAuthentication no
  • sudo apt-get install ufw
  • sudo ufw allow ssh
  • sudo ufw enable
  • sudo apt install fail2ban
@zentralwerkstatt
zentralwerkstatt / instructions.md
Last active Aug 7, 2017
Blender, Unreal Engine, Touch Designer
View instructions.md

Shortcuts (Blender):

  • Shift + A: New object
  • E: Extrude face, edge, or vertice
  • F: Create face or edge between selected vertices
  • Tab: Edit mode/object mode
  • Ctrl + Tab: Mesh mode
  • S: Scale
  • G: Move
  • R: Rotate
  • Middle button: Rotate view