Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
# DEC graphics
dec_lua=$(printf '\e(0\152\e(B') # lua, left-to-up angle
dec_lda=$(printf '\e(0\153\e(B') # lda
dec_rda=$(printf '\e(0\154\e(B') # rda
dec_rua=$(printf '\e(0\155\e(B') # rua
dec_x=$(printf '\e(0\156\e(B') # x, cross
dec_h=$(printf '\e(0\161\e(B') # h, horizontal
dec_btr=$(printf '\e(0\164\e(B') # btr, branch-to-right
dec_btl=$(printf '\e(0\165\e(B') # btl
@TuvianNavy
TuvianNavy / minimal_git_for_alone.md
Last active March 12, 2019 10:58
minimal git for alone

MINIMAL git FOR ALONE.

prepare ~/.gitconfig (do first before git init)

me@workhost:~$ cat > ~/.gitconfig
[user]
        email = me@example.com
        name = My Name
[core]
use lspci -nnD first
@TuvianNavy
TuvianNavy / ipv4_best_suballoc.txt
Last active January 24, 2019 12:00
IPv4 class-C compact suballocation best practice
IPv4 class-C compact suballocation best practice
0 network
1-19 for external service endpoints or dhcp for human-handled terminals
20-39 for server mgmt
40-53 for network appliance mgmt (ex. routers or firewalls)
60-99 for various use (do not place physical servers or appliances)
100-119 dhcp or some floating IPs
@TuvianNavy
TuvianNavy / uefi_chronology.md
Last active July 18, 2020 11:20
UEFI Chronology
  • 1981 IBM PC 5150 (MBR and INT13H as BIOS specifications)
  • 1992 PCI 1.0
  • 1996 USB1.0, ACPI 1.2 (first public version, 1.0 and 1.1 kept internally)
  • 2000 EFI 1.02, Windows 2000 (diskpart.exe replaces fdisk.exe)
  • 2001 efibootmgr started, Windows 2000 ASLE (supports GPT and EFI boot, IA-64 only)
  • 2002 EFI 1.10, Windows XP 64-bit Edition (supports GPT and EFI boot, IA-64 only)
  • 2003 HP rx2600 (Widely sold commercial EFI products, Itanium2), ELILO started
  • 2005 Unified EFI Forum started, Windows XP x64 Edition (first GPT-aware consumer Windows, x64 only)
  • 2006 UEFI 2.0, Core Duo, Core 2 Duo, Intel Mac (first EFI personal computers, supports x64 on Late 2006), Boot Camp
  • 2008 Windows Server 2008/Vista SP1 (uses bootmgr, supports EFI boot on IA-32/x64)
[root@recover images]# gdisk /dev/sdc
GPT fdisk (gdisk) version 0.8.6
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.