Skip to content

Instantly share code, notes, and snippets.

View lispstudent's full-sized avatar

Lisp student lispstudent

View GitHub Profile
@Tanhueco
Tanhueco / danube-cloud-hetzner-install.doc
Created November 11, 2019 05:03
Danube Cloud Install on Hetzner Dedicated Servers
Danube Cloud is a Copyright of Erigones, s. r. o.
https://danubecloud.org
Wiki: https://github.com/erigones/esdc-ce/wiki
*********************************************************************************************************************************
Danube Cloud Install on Hetzner Dedicated
Servers with a /29 Subnet
*********************************************************************************************************************************
Danube Cloud starting v4.2 now supports hybrid boot from USB and from a disk. That means you can boot through legacy BIOS or UEFI
% git diff
diff --git a/usr/src/cmd/zpool/zpool_main.c b/usr/src/cmd/zpool/zpool_main.c
index 2e8082b681..d0504345ca 100644
--- a/usr/src/cmd/zpool/zpool_main.c
+++ b/usr/src/cmd/zpool/zpool_main.c
@@ -3226,6 +3226,7 @@ print_vdev_stats(zpool_handle_t *zhp, const char *name, nvlist_t *oldnv,
         * print all other top-level devices
         */
        for (uint_t n = 0; n < 3; n++) {
@Tanhueco
Tanhueco / smartos-on-hetzner.doc
Last active May 21, 2025 05:15
SmartOS On Hetzner Dedicated Server and Subnet
# 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 at Hetzner (with a /29)
##################################################################
# This is another version of Jahewson's Gist here: https://gist.github.com/jahewson/4492300 that adds a gate to prevent packets
from leaking out from the main MAC address.
@priyadarshan
priyadarshan / plex-on-omnios-r151028-lx-zone.md
Last active May 17, 2022 17:48
Install Plex on OmniOS r151028 via lx zone
@Rychu-Pawel
Rychu-Pawel / zfs_health_check.sh
Last active March 12, 2023 09:18
ZFS Health Check script for monit. For detailed description and usage go to http://pawelrychlicki.pl/Article/Details/58/zfs-health-check-script-for-monit-09
#! /bin/bash
#
## ZFS health check script for monit.
## v1.0.2
#
## Should be compatible with FreeBSD and Linux. Tested on Ubuntu.
## If you want to use it on FreeBSD then go to Scrub Expired section and Trim Expired section
## and comment two Ubuntu date lines and uncomment two FreeBSD lines in Scrub Expired section.
## In Trim Expired section adjust the date format directly in the for loop's awk parameter.
#

C bit hacks

Related:

Index

Bit Twiddling Hacks

@jdwoody
jdwoody / README
Last active July 5, 2021 12:31
Nextcloud on SmartOS
These scripts install nextcloud on Apache in a SmartOS Zone.
Replace the necessary values in nc.sql, httpd.conf, and smartos.json (look for [your... ])
Use the json below to create the nextcloud zone: vmadm validate create -f smartos.json && vmadm create -f smartos.json
Place the install.sh, nc.sql, httpd.conf, and php.ini file into the nextcloud zone
This script assumes mysql is installed on another server/zone and the root user can login from this zone. You can modify the script
to install mysql server if needed.
Run ./install.sh
@tanakahx
tanakahx / json-parser.lisp
Last active August 30, 2021 12:20
JSON parser implemented with cl-lex and CL-Yacc
#|
JSON parser implemented with cl-lex and CL-Yacc
USAGE:
JSON-PARSER> (parse-with-lexer (json-lexer
"{\"foo\":\"bar\",\"baz\":\"bang\",\"bing\":100,\"bingo\":1.1,\"bazo\": [1,2,\"foo\"]}")
json-parser)
(:OBJ ("foo" . "bar") ("baz" . "bang") ("bing" . 100) ("bingo" . 1.1) ("bazo" 1 2 "foo"))
JSON-PARSER> (with-open-file (*standard-input* "test.json")
@petervanderdoes
petervanderdoes / zfs_health.sh
Last active March 18, 2025 23:23
ZFS Health Check Script
#! /usr/local/bin/bash
#
# Calomel.org
# https://calomel.org/zfs_health_check_script.html
# FreeBSD 9.1 ZFS Health Check script
# zfs_health.sh @ Version 0.15
# Check health of ZFS volumes and drives. On any faults send email. In FreeBSD
# 10 there is supposed to be a ZFSd daemon to monitor the health of the ZFS
# pools. For now, in FreeBSD 9, we will make our own checks and run this script
@lispm
lispm / gist:e028d3f3c11c9f74d4e7
Created December 5, 2014 14:16
some clever sorting
(defun split-alphanumeric-string (string)
(let ((pos0 0)
(pos1 0) )
(labels ((end-pos-of (fn)
(loop while (and (< pos1 (length string))
(funcall fn (aref string pos1)))
do (incf pos1))
pos1))
(loop while (< pos0 (length string))
when (not (digit-char-p (aref string pos0)))