Skip to content

Instantly share code, notes, and snippets.

View dch's full-sized avatar
🛋️

Dave Cottlehuber dch

🛋️
View GitHub Profile
@dch
dch / Makefile
Created March 14, 2025 16:36
surfer
PORTNAME= surfer
DISTVERSIONPREFIX= v
DISTVERSION= 0.3.0
CATEGORIES= cad
MAINTAINER= [email protected]
COMMENT= Extensible and snappy waveform viewer
WWW= https://surfer-project.org
LICENSE= EUPL12
@dch
dch / mix.exs
Created February 15, 2025 14:16
defmodule Indie.MixProject do
use Mix.Project
def project do
[version, description] = version()
[
app: :indie,
version: version,
id: description,
@dch
dch / Makefile
Created February 14, 2025 11:36
kleene
PORTNAME= kleene-daemon
DISTVERSIONPREFIX= v
DISTVERSION= 0.1.0
DISTVERSIONSUFFIX= -rc.2
CATEGORIES= sysutils
HEXPM_VERSION= 2.1.1
MASTER_SITES+= https://builds.hex.pm/installs/1.16.0/:hex
DISTFILES+= hex-${HEXPM_VERSION}.ez:hex
@dch
dch / mca.dmesg
Created January 12, 2025 09:01
straylight mca dmesg
APEI Fatal Memory Error:
Error Status: 0x400
Node: 5
Card: 0
Bank: 0
Row: 0
Column: 0
Memory Error Type: 3
Rank Number: 0
Flags: 0x1
@dch
dch / count.lua
Last active December 29, 2024 22:59
lua jail API
#!/usr/libexec/flua
local jail = require("jail")
local i = 0;
for j in jail.list({"name"}) do
i = i + 1
if i % 100 == 0 then
print(j["name"])
@dch
dch / bebuild.sh
Created December 13, 2024 21:39
builder
#!/bin/sh -eu
# echo 'WITH_CCACHE_BUILD=yes' > /etc/src.conf
# echo 'WITH_META_MODE=yes' > /etc/src-env.conf
# echo 'WITH_DIRDEPS_BUILD=yes' >> /etc/src-env.conf
umask 0022
cd /usr/src
NOW=$(date -u +%Y%m%d-%H%M)
# NCPU=$(sysctl -n hw.ncpu)
NCPU=3.0
@dch
dch / .iex.exs
Created December 10, 2024 14:10
iex
defmodule I do
def cls, do: IO.puts("\ec")
def qt(m, f \\ :_) do
l(m)
:recon_trace.calls(
{m, f, :return_trace},
{1000, 10000},
pid: :all,
scope: :local,
@dch
dch / .iex.exs
Created November 29, 2024 08:41
iex.ex
defmodule I do
def cls, do: IO.puts("\ec")
def qt(m, f \\ :_) do
:recon_trace.calls(
{m, f, :return_trace},
{1000, 10000},
pid: :all,
scope: :local,
stack: :return
@dch
dch / diff.patch
Created November 26, 2024 09:03
arcanist
--- ArcanistPatchWorkflow.php.orig 2022-05-17 23:20:14.000000000 +0000
+++ ArcanistPatchWorkflow.php 2024-11-26 09:01:01.137494000 +0000
@@ -436,10 +436,7 @@
echo phutil_console_format(
"<bg:blue>** %s **</bg> %s\n",
pht('INFO'),
- pht('Base commit is not in local repository; trying to fetch.'));
- $repository_api->execManualLocal('fetch --quiet --all');
- $has_base_revision = $repository_api->hasLocalCommit(
- $bundle->getBaseRevision());
@dch
dch / 00_nocloud.cfg
Last active July 25, 2024 16:50
cloudinit 24.1.4 on FreeBSD fails to use NoCloud provider
datasource:
NoCloud:
seedfrom: file:///root/cloud/
network:
config: disabled
timeout: 1