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
@ctsrc
ctsrc / 00_install_fbsd_14_1_hetzner.md
Last active October 16, 2024 00:50
Install FreeBSD 14.1 on Hetzner

Install FreeBSD 14.1 on Hetzner server

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

Boot the server into rescue mode

Boot the Hetzner server in Hetzner Debian based rescue mode. ssh into it.

The Hetzner rescue image will tell you hardware details about the server in the login banner. For example, with one of my servers I see:

@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.."
@mmarshall540
mmarshall540 / translate-modifiers.el
Last active November 23, 2022 01:50
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'
@no-defun-allowed
no-defun-allowed / selling-lisp-by-the-pound.org
Last active April 17, 2024 06:10
Selling Lisp by the pound

Selling Lisp by the Pound

“Paper late!” cried a voice in the crowd,

“Old man dies!” The note he left was signed,

‘Old Kiczales’ - it seems he’s drowned!

@lispstudent
lispstudent / lw-current-lang.lisp
Created January 18, 2021 16:17 — forked from svetlyak40wt/lw-current-lang.lisp
An example how to get user's preferred language on OSX and Windows using LispWorks.
#+cocoa
(defun current-language ()
(let ((lang (objc:with-autorelease-pool ()
(objc:invoke-into
'string
(objc:invoke
(objc:invoke "NSUserDefaults" "standardUserDefaults")
"objectForKey:" "AppleLanguages")
"objectAtIndex:" 0))))
;; 2019-04-29
@svetlyak40wt
svetlyak40wt / lw-current-lang.lisp
Created December 12, 2020 17:03
An example how to get user's preferred language on OSX and Windows using LispWorks.
#+cocoa
(defun current-language ()
(let ((lang (objc:with-autorelease-pool ()
(objc:invoke-into
'string
(objc:invoke
(objc:invoke "NSUserDefaults" "standardUserDefaults")
"objectForKey:" "AppleLanguages")
"objectAtIndex:" 0))))
;; 2019-04-29