Skip to content

Instantly share code, notes, and snippets.

View karlbunch's full-sized avatar

Karl Bunch karlbunch

View GitHub Profile
@karlbunch
karlbunch / alpine-zfs-grub-uefi.md
Created August 30, 2022 20:19 — forked from kongkrit/alpine-zfs-grub-uefi.md
Install Alpine Linux on ZFS Root - grub bootloader on UEFI

Alpine Linux Installation on ZFS Root with grub on UEFI

  • References [ ref1 | ref2 | ref3 ]
  • Boot from alpine-extended [ download ]
  • login as root without any password
  • setup network interfaces and start networking:
    setup-interfaces
    /etc/init.d/networking start
    
  • add, config, and enable openssh:
@karlbunch
karlbunch / long2ip.sh
Last active July 19, 2021 10:37
Quick way to convert integer ip4 ip address to dot notation
#!/bin/bash
#
# long2ip - Bash example to convert integer ip to long
#
# Example: long2ip 201691728
#
long2ip() {
local ip=$1
echo $((ip >> 24 & 255))"."$((ip >> 16 & 255))"."$((ip >> 8 & 255 ))"."$((ip & 255))
# checkout
git fetch origin refs/meta/config:refs/remotes/origin/meta/config
git checkout meta/config
#directly:
git push origin meta/config:meta/config
#via review:
git push origin meta/config:refs/for/refs/meta/config
@karlbunch
karlbunch / disable_spectre.md
Created June 19, 2021 18:35 — forked from rizalp/disable_spectre.md
Disable Spectre/Meltdown Mitigation

In /etc/default/grub, modify:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash noibrs noibpb nopti nospectre_v2 nospectre_v1 l1tf=off nospec_store_bypass_disable no_stf_barrier mds=off tsx=on tsx_async_abort=off mitigations=off"

Then sudo update-grub

#!/bin/bash
#
# resize - cheap bash implementation of the X11 resize command to avoid installing all the X11 stuff for one command
#
# Author: Karl Bunch <karlbunch@karlbunch.com>
#
# Created: Sat Sep 2 08:30:14 EDT 2017
#
if [ "X$1" = "X-s" -a -n "$2" -a -n "$3" ]; then
echo -ne "\033[8;$2;$3t"
@karlbunch
karlbunch / boot-from-ram-debian.md
Created September 10, 2017 10:18 — forked from avinash-oza/boot-from-ram-debian.md
How to boot from RAM on debian
@karlbunch
karlbunch / user-data.txt
Created October 6, 2017 18:03 — forked from heri16/user-data.txt
Docker-CE Cloud-init for Ubuntu 16.04 (LTS)
#cloud-config
# Upgrade the instance on first boot
# (ie run apt-get upgrade)
#
# Default: false
# Aliases: apt_upgrade
package_upgrade: true
# Install additional packages on first boot

Keybase proof

I hereby claim:

  • I am karlbunch on github.
  • I am karlbunch (https://keybase.io/karlbunch) on keybase.
  • I have a public key ASCoSLZN0yITsCEVolBDol4-YvF8Ht6j74H1MsBZtyBJTQo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am karlbunch on github.
  • I am karlbunch (https://keybase.io/karlbunch) on keybase.
  • I have a public key ASAigm7tkOrtPXPAmmw06cITx2iGPZymQpZNqTaYsGUcYAo

To claim this, I am signing this object:

-- BEGIN CURRENCY TOKEN FIXUP
DROP TABLE IF EXISTS temp_currency_items;
CREATE TEMPORARY TABLE temp_currency_items (itemEntry mediumint(8) unsigned);
INSERT INTO temp_currency_items VALUES
-- Add any currency items that need conversion to this list...
(20558),(20559),(20560),(29024),(29434),(37836),(40752),(40753),(41596),(42425),(43016),(43228),(43308),(43589),(44990),(45624),(47395),(47241),(49426),(43949),(41749),(38644),(37742),(37711)
;
DROP FUNCTION IF EXISTS temp_check_currency;
DROP PROCEDURE IF EXISTS temp_currency_item_report;
DROP PROCEDURE IF EXISTS temp_fix_currency;