Skip to content

Instantly share code, notes, and snippets.

View ryanwoodsmall's full-sized avatar
🍞
🍞 bread 🍞 sandwich 🍞

ryan ryanwoodsmall

🍞
🍞 bread 🍞 sandwich 🍞
View GitHub Profile
@ryanwoodsmall
ryanwoodsmall / build.sh
Last active April 14, 2020 04:41
opengit on linux
#!/bin/sh
# segfaulting on clone, but builds now
# needs:
# bmake
# libbsd
# libmd
# libfetch
# libressl/openssl
# zlib
bmake clean
@ryanwoodsmall
ryanwoodsmall / httpd_mod_proxy_ftp.conf
Created April 24, 2020 02:54
httpd_mod_proxy_ftp.conf
# proxy requests /ftp/host.domain.tld/... to a real ftp server
ProxyRequests On
ProxyPreserveHost On
RewriteEngine On
RewriteRule "^/ftp/(.*)$" "ftp://$1" [P]
@ryanwoodsmall
ryanwoodsmall / busybox-etc_inetd.conf
Created April 27, 2020 16:12
busybox-etc_inetd.conf
chargen dgram udp wait root internal
chargen stream tcp nowait root internal
daytime dgram udp wait root internal
daytime stream tcp nowait root internal
discard dgram udp wait root internal
discard stream tcp nowait root internal
echo dgram udp wait root internal
echo stream tcp nowait root internal
time dgram udp wait root internal
time stream tcp nowait root internal

https://hackaday.com/2020/05/21/linux-fu-alternative-shells/

There's no such extant thing as "pdksh" anymore; development has mostly been picked up by mksh, along with the OpenBSD pdksh fork. mksh can be found at: https://www.mirbsd.org/mksh.htm and some portable OpenBSD versions are available at https://github.com/dimkr/loksh and https://github.com/ibara/oksh - of these mksh is probably the most featureful and useful, and is a mostly drop-in replacement for any ksh88/POSIX sh script or interactive environment.

Note, however, that pdksh derivatives are all more like the classical "ksh88" than "ksh93." The Korn shell grew a number of very useful features - associative arrays, floating point math, etc. - in the newer ksh93 version. Bash has adopted some of these, but not all, and the pdksh continuations/clones will likely stick with ksh88 compatibility. The old AT&T AST repo has relatively up-to-date (and open source) ksh93: https://github.com/att/ast and the ksh2020 branch has a build system not stuck in 199

@ryanwoodsmall
ryanwoodsmall / README.md
Created May 24, 2020 08:51 — forked from zoilomora/README.md
How to disable systemd-resolved in Ubuntu

How to disable systemd-resolved in Ubuntu

Stages

  • Disable and stop the systemd-resolved service:

      sudo systemctl disable systemd-resolved.service
      sudo systemctl stop systemd-resolved
    
  • Then put the following line in the [main] section of your /etc/NetworkManager/NetworkManager.conf:

@ryanwoodsmall
ryanwoodsmall / kill-sticky.js
Created May 27, 2020 22:28 — forked from alisdair/kill-sticky.js
Kill sticky headers.
(function () {
var i, elements = document.querySelectorAll('body *');
for (i = 0; i < elements.length; i++) {
if (getComputedStyle(elements[i]).position === 'fixed') {
elements[i].parentNode.removeChild(elements[i]);
}
}
})();
@ryanwoodsmall
ryanwoodsmall / jenkins-token.md
Created July 30, 2020 20:59
jenkins-token.md
@ryanwoodsmall
ryanwoodsmall / config.yml
Created September 25, 2020 06:41
config.yml for docker registry cleanup : registry garbage-collect /tmp/config.yml -m
version: 0.1
log:
fields:
service: registry
storage:
cache:
blobdescriptor: inmemory
filesystem:
rootdirectory: /var/lib/registry
delete:
@ryanwoodsmall
ryanwoodsmall / twilight.c
Created October 12, 2020 01:31 — forked from halfmanhalftaco/twilight.c
twilight.c
/*
*
* cc twilight.c -lgl_s -lm -o twilight
*
* Copyright (c) 1991, 1992 Silicon Graphics, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and
* its documentation for any purpose is hereby granted without fee, provided
* that the name of Silicon Graphics may not be used in any advertising or
* publicity relating to the software without the specific, prior written
@ryanwoodsmall
ryanwoodsmall / crosware_lighttpd.conf
Last active June 7, 2021 03:35
crosware_lighttpd.conf
server.document-root = "/usr/local/crosware"
server.port = 80
dir-listing.activate = "enable"
server.modules += ("mod_mbedtls")
$SERVER["socket"] == ":443" {
ssl.engine = "enable"
ssl.pemfile = "/usr/local/crosware/tmp/cert.pem"
ssl.privkey = "/usr/local/crosware/tmp/key.pem"