32 private links
restore SELinux labels on mounted drives:
sudo restorecon -Rv /nvme2
sudo restorecon -Rv /nvme
sudo restorecon -Rv /seagate
change default shell:
chsh -s $(which zsh)
development tools:
sudo dnf install cmake perl-core clang-devel llvm-devel postgresql-devel git opencl-headers ninja-build ncurses-devel libxcrypt-compat libcurl-devel fuse fuse-libs just
tools:
sudo dnf install mediawriter fastfetch yt-dlp syncthing keepassxc mpv flatpak btop arandr pavucontrol flameshot nmap-ncat nvidia-vaapi-driver libva-utils xset wget aria2c acl strace ImageMagick speedtest-cli ethtool
grafana-pcp:
sudo semanage fcontext -a -t httpd_sys_content_t "/usr/libexec/grafana-pcp(/.*)?"
sudo restorecon -Rv /usr/libexec/grafana-pcp
general:
sudo restorecon -RvF /usr/sbin/grafana-* \
/etc/grafana \
/var/log/grafana \
/var/lib/grafana \
/usr/share/grafana
/code/spack/bin/spack load --sh gcc@13.2.0
ffmpeg \
-f x11grab \
-y \
-framerate 20 \
-s "$(xdpyinfo | grep dimensions | awk '{ print $2 }' )" \
-i :0.0 \
-c:v libx264 \
-preset superfast \
-crf 21 \
"$(date +'%Y-%m-%d_%H-%M-%S').mp4"
chmod 700 .ssh
chmod 600 .ssh/authorized_keys
What used to be Alt+drag is now Super+drag. Super is the Windows/Apple/Meta key next to the Alt key on most keyboards. In the process of finding that, I also discovered that Super+middle button+drag resizes windows (which apparently used to work with Alt too, but I never knew about it).
systemctl disable --now systemd-oomd
ystemctl is-enabled systemd-oomd
systemctl is-enabled systemd-oomd
systemctl mask systemd-oomd
systemctl is-enabled systemd-oomd
== RE-ENABLE ==
systemctl enable systemd-oomd
systemctl unmask systemd-oomd
find /path/to/base/dir -type d -print0 | xargs -0 chmod 755
find /path/to/base/dir -type f -print0 | xargs -0 chmod 644
find . -maxdepth 2 -name '*.py' -type f | xargs -0 chmod +x
=== REPLACE ALL INSTANCES ON OSX ===
LC_ALL=C find ./ -type f -name "*.py" -exec sed -i '.bak' -e 's/trade_fee_percent/curve_fee_mult/g' {} \;
== MULTIPLE FILETYPES
find ./ -type f ( -iname *.jpg -o -iname *.png )
make group hack and share folder with it
sudo groupadd hack
sudo chgrp -R hack /data/trueblocks
sudo chmod 770 /data/trueblocks
sudo chmod +s /data/trueblocks
create new user and add it to group hack
sudo useradd jacob --home-dir /home/jacob --shell /bin/zsh --no-create-home
sudo cp -r /home/alex/ /home/alex/
sudo chown -vR jacob:jacob /home/jacob
sudo usermod -aG hack alex
shared permissions
sudo chown root:hack /code
sudo chmod 2750 /code (2770 for executable)
sudo chmod go-rwx /code/*
sudo chmod g+rX /code/zsh-autosuggestions /code/zsh-syntax-highlighting
sudo chown -R :hack /code/zsh-autosuggestions /code/zsh-syntax-highlighting
sudo chmod -R g+s /code/zsh-autosuggestions /code/zsh-syntax-highlighting
sudo setfacl -R -m g:hack:rwx /code/zsh-autosuggestions /code/zsh-syntax-highlighting
sudo setfacl -R -d -m g:hack:rwx /code/zsh-autosuggestions /code/zsh-syntax-highlighting
Prerequisites to run X applications on OS-X:
You need to have XQuartz installed on the client side (check that it's working for your account by running XQuarts and starting a local terminal)
You need to allow XForwarding on your server. Set the X11Forwarding option (most commonly found in /etc/ssh/sshd_config): X11Forwarding yes (don't forget to restart the ssh server after editing the sshd_config file).
Your sshd server should be running on the server side.
Your firewall (on both ends) should allow for traffic over port 22.
If you want to disable that message for all ssh users, edit /etc/pam.d/sshd and comment out the lines
session optional pam_motd.so motd=/run/motd.dynamic noupdate
session optional pam_motd.so # [1]
there are a plethora of bugs around RAID5/6 that makes it straight up unsuitable
btrfs device add /dev/sdb /mnt
add any necessary path (e.g., /app/pyenv/shims) to secure_path, and it will be passed to sudo commands.