Skip to content

Instantly share code, notes, and snippets.

@dubiousjim
dubiousjim / process.js
Created January 25, 2020 16:54
reworked deno Process, readAll, Buffer.readFrom
let { EOF } = Deno; // may move to Deno.symbols
let { Buffer, ErrorKind, read, close, run: oldDenoRun, Process } = Deno;
const MIN_READ = 512;
Buffer.prototype.readFrom = async function readFrom(r) {
let n = 0;
while (true) {
try {
const i = this._grow(MIN_READ);
@dubiousjim
dubiousjim / kconfig-diff.py
Last active January 31, 2017 14:21
Kernel config choices and symbols that differ between Alpine's linux-grsec, linux-xenguest, and linux-virt-grsec.
#!/usr/bin/ipython2 -i
"""
This script should be run from a folder residing at the toplevel of the kernel source tree, and which also contains
https://raw.github.com/ulfalizer/Kconfiglib/master/kconfiglib.py
Invoke as follows:
./kconfig-diff.py x86 DEFAULT kern1.conf kern2.conf kern3.conf
@dubiousjim
dubiousjim / configure.patch
Last active December 17, 2015 12:09
stuff for porting GHC from Arch to Alpine
diff -Naurp ghc-7.6.3.orig/configure ghc-7.6.3/configure
--- ghc-7.6.3.orig/configure 2013-04-18 22:47:00.000000000 +0000
+++ ghc-7.6.3/configure 2013-05-12 20:16:02.370861547 +0000
@@ -3597,7 +3597,7 @@ case "$host_cpu" in
case "$host_vendor" in
- pc|gentoo) # like i686-pc-linux-gnu and i686-gentoo-freebsd8
+ pc|gentoo|buildroot) # like i686-pc-linux-gnu and i686-gentoo-freebsd8
HostVendor="unknown"
@dubiousjim
dubiousjim / buildroot-makes.patch
Last active December 17, 2015 11:29
configs and patches to make buildroot toolchain targeting Alpine Linux
--- ./package/gmp/gmp.mk.orig 2013-05-18 04:20:34.754578623 +0000
+++ ./package/gmp/gmp.mk 2013-05-18 04:23:55.340009552 +0000
@@ -11,6 +11,7 @@ GMP_INSTALL_STAGING = YES
GMP_LICENSE = LGPLv3+
GMP_LICENSE_FILES = COPYING.LIB
GMP_DEPENDENCIES = host-m4
+GMP_CONF_OPT = --enable-mpbsd --enable-cxx --with-pic
$(eval $(autotools-package))
$(eval $(host-autotools-package))
@dubiousjim
dubiousjim / kernelconfig.x86
Created May 8, 2013 06:44
Kernel config files for Linode Xen guest/DomU
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 3.8.11 Kernel Configuration
#
# CONFIG_64BIT is not set
CONFIG_X86_32=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_OUTPUT_FORMAT="elf32-i386"
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/i386_defconfig"