Skip to content

Instantly share code, notes, and snippets.

# Source of PI value from https://rationalwiki.org/wiki/Fun:Pi_to_32768_digits_in_binary
PI = """
00100100 00111111 01101010 10001000 10000101 10100011 00001000 11010011 00010011 00011001 10001010 00101110 00000011 01110000 01110011 01000100
10100100 00001001 00111000 00100010 00101001 10011111 00110001 11010000 00001000 00101110 11111010 10011000 11101100 01001110 01101100 10001001
01000101 00101000 00100001 11100110 00111000 11010000 00010011 01110111 10111110 01010100 01100110 11001111 00110100 11101001 00001100 01101100
11000000 10101100 00101001 10110111 11001001 01111100 01010000 11011101 00111111 10000100 11010101 10110101 10110101 01000111 00001001 00010111
10010010 00010110 11010101 11011001 10001001 01111001 11111011 00011011 11010001 00110001 00001011 10100110 10011000 11011111 10110101 10101100
@p-kraszewski
p-kraszewski / test_raid.sh
Created July 11, 2022 10:31
LVM2 RAID6 to RAID0 conversion example
#!/bin/bash
NR_DRIVES=5
DRIVE_SIZE=100M
VGNAME=TestVG
LVNAME=TestLV
fail(){
echo "ERROR: $1"
exit 1
Updating crates.io index
Installing cargo-outdated v0.9.8
Compiling libc v0.2.68
Compiling cfg-if v0.1.10
Compiling pkg-config v0.3.17
Compiling autocfg v1.0.0
Compiling proc-macro2 v1.0.9
Compiling unicode-xid v0.2.0
Compiling syn v1.0.17
Compiling lazy_static v1.4.0

Keybase proof

I hereby claim:

  • I am p-kraszewski on github.
  • I am pkraszewski (https://keybase.io/pkraszewski) on keybase.
  • I have a public key whose fingerprint is E030 A049 9C33 C1E9 28EA 50C9 821F DA62 0A90 D330

To claim this, I am signing this object:

@p-kraszewski
p-kraszewski / openpgp.txt
Created September 23, 2017 12:37
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:53ed8137c4ec07e6e033dbbe1e17138740d5bff2]
@p-kraszewski
p-kraszewski / openpgp.txt
Created September 23, 2017 12:26
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:53ed8137c4ec07e6e033dbbe1e17138740d5bff2]
@p-kraszewski
p-kraszewski / openpgp.txt
Created September 23, 2017 12:26
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:53ed8137c4ec07e6e033dbbe1e17138740d5bff2]
@p-kraszewski
p-kraszewski / openpgp.txt
Created September 23, 2017 12:25
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:53ed8137c4ec07e6e033dbbe1e17138740d5bff2]
@p-kraszewski
p-kraszewski / openpgp.txt
Created September 23, 2017 12:25
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:53ed8137c4ec07e6e033dbbe1e17138740d5bff2]

Keybase proof

I hereby claim:

  • I am p-kraszewski on github.
  • I am pkraszewski (https://keybase.io/pkraszewski) on keybase.
  • I have a public key whose fingerprint is 53ED 8137 C4EC 07E6 E033 DBBE 1E17 1387 40D5 BFF2

To claim this, I am signing this object: