Skip to content

Instantly share code, notes, and snippets.

@memreflect
memreflect / README.md
Last active Sep 1, 2021
Sway/Wayland screen locker
View README.md

Requirements

  • [swayidle][]
  • [swaylock][]
  • any shell supporting sh syntax and execution of tasks in the background (job control is not necessary); just make sure that you fix the path to the shell at the top of the script if it isn't /bin/sh

Installation

@memreflect
memreflect / go.mod
Last active May 31, 2021
Print memory segments in current process with wx or rwx permissions using procstat(1) on FreeBSD
View go.mod
module printwx
go 1.16
require github.com/mattn/go-isatty v0.0.13
@memreflect
memreflect / Makefile.diff
Last active Sep 8, 2020
Patch providing options to enable/disable QtHelp or HTML documentation for devel/cmake-doc port
View Makefile.diff
Index: /usr/ports/devel/cmake-doc/Makefile
===================================================================
--- /usr/ports/devel/cmake-doc/Makefile (revision 547972)
+++ /usr/ports/devel/cmake-doc/Makefile (working copy)
@@ -16,15 +16,24 @@
DISTINFO_FILE= ${.CURDIR}/../cmake/distinfo
+OPTIONS_DEFAULT= HTML
+OPTIONS_MULTI= FORMAT
@memreflect
memreflect / errval.c
Created Jul 22, 2020
Bounded line input routine `get_line`
View errval.c
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include "errval.h"
static char const* errstrings[] = {
[ErrOK] = "no error",
[ErrIO] = "I/O error",
[ErrMore] = "more data available",
@memreflect
memreflect / poudriere-ncurses.sh
Created May 10, 2020
Install devel/ncurses into a Poudriere jail, so ports can be built against it
View poudriere-ncurses.sh
# Path to packages/xxx/All
PKGS=/usr/local/poudriere/data/packages/12amd64/All
# Name of ZFS pool containing Poudriere jail
ZPOOL=zpool
# Path to jail, without ZPOOL/ prefix
JAIL=poudriere/jails/12amd64
#
# End of customizable variables
#