Skip to content

Instantly share code, notes, and snippets.

View lispstudent's full-sized avatar

Lisp student lispstudent

View GitHub Profile
@lispstudent
lispstudent / data.json
Created September 21, 2020 17:30 — forked from jorinvo/data.json
Test data for little challenge
This file has been truncated, but you can view the full file.
[
{"name":"Keeley Bosco","email":"katlyn@jenkinsmaggio.net","city":"Lake Gladysberg","mac":"08:fd:0b:cd:77:f7","timestamp":"2015-04-25 13:57:36 +0700","creditcard":"1228-1221-1221-1431"},
{"name":"Rubye Jerde","email":"juvenal@johnston.name","city":null,"mac":"90:4d:fa:42:63:a2","timestamp":"2015-04-25 09:02:04 +0700","creditcard":"1228-1221-1221-1431"},
{"name":"Miss Darian Breitenberg","email":null,"city":null,"mac":"f9:0e:d3:40:cb:e9","timestamp":"2015-04-25 13:16:03 +0700","creditcard":null},
{"name":"Celine Ankunding","email":"emery_kunze@rogahn.net","city":null,"mac":"3a:af:c9:0b:5c:08","timestamp":"2015-04-25 14:22:22 +0700","creditcard":"1228-1221-1221-1431"},
{"name":"Dr. Araceli Lang","email":"mavis_lehner@jacobi.name","city":"Yvettemouth","mac":"9e:ea:28:41:2a:50","timestamp":"2015-04-25 21:02:11 +0700","creditcard":"1211-1221-1234-2201"},
{"name":"Esteban Von","email":null,"city":null,"mac":"2d:e4:f0:dd:90:96","timestamp":"2015-04-25 21:47:09 +0700","creditcard":null},
{"name":"Everette Swift","em
name creditcard
Keeley Bosco 1228-1221-1221-1431
Rubye Jerde 1228-1221-1221-1431
Celine Ankunding 1228-1221-1221-1431
Dr. Araceli Lang 1211-1221-1234-2201
Terrell Boyle 1228-1221-1221-1431
Libby Renner 1234-2121-1221-1211
Alessandro Barton 1234-2121-1221-1211
Dr. Art Grimes 1211-1221-1234-2201
Keven Purdy 1211-1221-1234-2201
@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
@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,
@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 / 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 / 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)

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 \