Skip to content

Instantly share code, notes, and snippets.

View lispstudent's full-sized avatar

Lisp student lispstudent

View GitHub Profile
@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
@skirmess
skirmess / windows-10-pro-smartos-bhyve.md
Last active May 21, 2025 05:17
Windows 10 Pro Image for SmartOS Bhyve

Windows 10 Pro

Windows 10 Pro ISO

Create a fresh Windows 10 Pro ISO file with Microsofts Media Creation Tool. (I created a Windows 10 Pro 64 bit German ISO image)

Save the created image on your SmartOS global zone.

cp ... /zones/Windows10_64de.iso
@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
@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
@hiway
hiway / README.md
Last active July 25, 2024 02:14
Creating a single process FreeBSD (12.1) Jail

How to jail a single process web server on FreeBSD 12.1

You may have found many great resources on how to set up jails on latest FreeBSD, however there is scant information on how to go about creating a barebones jail with nothing but the one process that you want to isolate.

I was curious if I could contain a statically compiled web server that I wrote while learning Rust all by itself in a jail instead of having a full userland.

@dertuxmalwieder
dertuxmalwieder / vcs.md
Last active February 21, 2023 16:14
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)
@ivan-krukov
ivan-krukov / modal-view.el
Last active March 6, 2023 12:11
Personal setup for modal navigation with view mode
;; add view mode keybindings
(use-package view
:config (setq view-read-only t) ;; C-x C-q can also toggle view-mode
:straight nil
:bind (("<f13>" . view-mode) ;; remap R-Shift to F 13
:map view-mode-map
("n" . forward-line)
("p" . previous-line)))

Installing FileRun in FreeBSD (or in a FreeNAS jail) with Caddy as webserver

Here are the general instructions to install FileRun on FreeBSD or in a FreeNAS jail. For those who don't know, "jail" is the container technology used by the FreeBSD.

This guide was written while I was actually installing, and I guess it reflects the exact steps needed to accomplish the task. Anyway this guide must not be followed alone: you still need the general guide provided by the FileRun documentation. Here you will find only the relevat parts regarding the FreeBSD system.

Feel free to comment and point my mistakes, not only the technical ones but the grammar and spelling also, so I can make this guide more accurate as possible.

Some assumptions

@xh4
xh4 / html-test.lisp
Created March 12, 2020 09:13
Common Lisp HTML Generation Test
(in-package :cl-user)
(ql:quickload :cl-who)
(ql:quickload :spinneret)
(defpackage :html-test
(:use :cl :cl-who :spinneret))
(in-package :html-test)