Skip to content

Instantly share code, notes, and snippets.

View lispstudent's full-sized avatar

Lisp student lispstudent

View GitHub Profile

Install FreeBSD 14.0 on Hetzner server

Hetzner no longer offers direct install of FreeBSD, but we can do it ourselves. Here is how :)

Boot the hetzner server in Hetnzer Debain based rescue mode. ssh into it. then:

wget https://mfsbsd.vx.sk/files/iso/14/amd64/mfsbsd-14.0-RELEASE-amd64.iso

qemu-system-x86_64 \
@lispstudent
lispstudent / docker-install.sh
Created February 19, 2024 10:01
Docker install on Ubuntu
#!/bin/sh
# https://docs.docker.com/engine/install/ubuntu/
# Make sure system is updated
apt -y update
apt -y upgrade
# Add Docker's official GPG key
@lispstudent
lispstudent / vcs.md
Created February 21, 2023 16:14 — forked from dertuxmalwieder/vcs.md
Comparing the single-file efficiency of version control systems

Not everything you want to keep in a VCS is a "project": Sometimes you have one single file which does not belong to any other files, but you still want to have it version-controlled. Assume a TODO file, an Office document or something. How well do various version control systems perform here?

Preface:

$ uname -smr 
Darwin 19.3.0 x86_64

$ sccs -V
sccs schily-SCCS version 5.09 2020/01/31 (x86_64-apple-macosx19.3.0)
@lispstudent
lispstudent / ddns-update.sh
Last active May 28, 2022 14:27 — forked from bomale/ddns-update
Namecheap DDNS Updater Bash Script
#!/bin/sh
# make it executable `chmod +x ddns-update`
# move it path `mv ddns-update /usr/bin/`
# setup cronjob for every 15 minutes `crontab -e`
# */15 * * * * ddns-update >/dev/null 2>&1
# dont forget to change your own domain & password
# uncomment if you want internet connection check before running
#while ! ping -c 1 -W 1 8.8.8.8; do
# echo "DDNS-UPDATE: Waiting internet connection.."
@lispstudent
lispstudent / translate-modifiers.el
Created February 24, 2022 15:52 — forked from mmarshall540/translate-modifiers.el
Translating modifier keys in Emacs
;; There seems to be no built-in mechanism to swap modifier keys in
;; Emacs, but it can be accomplished (for the most part) by
;; translating a near-exhaustive list of modifiable keys. In the case
;; of 'control and 'meta, some keys must be omitted to avoid errors or
;; other undesired effects.
(defun my/make-key-string (modsymbol basic-event)
"Convert the combination of MODSYMBOL and BASIC-EVENT.
BASIC-EVENT can be a character or a function-key symbol. The
return value can be used with `define-key'."
(vector (event-convert-list `(,modsymbol ,basic-event))))
@lispstudent
lispstudent / fix-ssh-permissions.sh
Created July 10, 2021 16:31
Fix .ssh permissions
sudo chmod -R 600 .ssh
sudo chmod -R 644 .ssh/*.pub
sudo chmod -R 700 .ssh
@lispstudent
lispstudent / .tmux.conf
Last active May 20, 2021 15:59
zshrc per servers
# set -g mouse on
set-option -g history-limit 100000
# plugins
set -g @plugin 'tmux-plugins/tpm'
#set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
@lispstudent
lispstudent / smartos-on-a-budget.sh
Created March 17, 2021 07:42 — forked from jahewson/smartos-on-a-budget.sh
Installing and Configuring SmartOS on a budget server (with a /29)
# Licensed under CC BY 3.0 http://creativecommons.org/licenses/by/3.0/
# Derived works must attribute https://gist.github.com/4492300 at the beginning, and the date.
##################################################################
Installing and Configuring SmartOS on a budget server (with a /29)
##################################################################
# if you find this gist useful, please star it
# please be aware that budget hosting companies usually cut corners somewhere,