Skip to content

Instantly share code, notes, and snippets.

@kpengboy
kpengboy / fix-engNET2016eb-formatting.md
Last active June 19, 2022 10:30
Fix engNET2016eb formatting

The version of the NET from ebible.org has some formatting problems, notably that there are random |strong=Hxxx strings appended to certain words that should be Strong's annotations on those words instead. I wrote a Perl script to fix all of those formatting problems.

Instructions as of version 32.19 (2022-06-13).

  1. Download engNET2016eb modules.zip and unzip it somewhere.
  2. Save the following script in sub.pl:
use strict;
@kpengboy
kpengboy / gist:c1f871d9bfbf59f26aecb03a7860438c
Created November 8, 2021 04:18
Pin kernel series as default in GRUB
Add these functions to 10_linux (example for series 4.9):
my_version_test_gt ()
{
case "$1:$2" in
*-4.9.*:*-4.9.*)
version_test_gt "$1" "$2"
return "$?"
;;
*-4.9.*:*)
@kpengboy
kpengboy / gn-beer.gn
Last active November 8, 2021 04:16
99 bottles of beer, GN edition
# Copyright 2017 Google LLC.
# SPDX-License-Identifier: Apache-2.0
# Date: 28 Jul 2017
N = 99
print("$N bottles of beer on the wall, $N bottles of beer.")
i = N - 1
@kpengboy
kpengboy / abbrev-pwd.bash
Last active December 20, 2018 23:44
Abbreviate working directory in bash PS1
# Copyright 2018 Google LLC.
# SPDX-License-Identifier: Apache-2.0
_abbrev_pwd () {
local dir="$PWD"
if [ -n "$HOME" ] && ([ "$dir" = "$HOME" ] || [[ "$dir" == $HOME/* ]]); then
echo -n "~"
dir="${dir#$HOME}"
fi
@kpengboy
kpengboy / keybase.md
Last active January 3, 2018 06:19
Keybase proof of identity

Keybase proof

I hereby claim:

  • I am kpengboy on github.
  • I am kpengboy (https://keybase.io/kpengboy) on keybase.
  • I have a public key whose fingerprint is 408E 2C55 5A8F 4F2F 2402 F035 D36D 80E4 62B3 9338

To claim this, I am signing this object: