Skip to content

Instantly share code, notes, and snippets.

View qguv's full-sized avatar
vibing

Quint Guvernator qguv

vibing
View GitHub Profile
@qguv
qguv / TestKnightPlace.hs
Created April 11, 2015 17:01
Knight Project Tests
module TestKnightPlace where
import Test.Hspec
import Data.Matrix (Matrix, matrix, mapCol, identity, getElem, zero)
import KnightPlace
-- a matrix of full of False with only one cell true
matrixOnly row col = matrix 4 4 (\(i, j) -> i == row && j == col)
-- a matrix of the given dimensions representing a function applied to each
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@qguv
qguv / vbox_efi_persist.md
Last active November 25, 2015 15:21
Virtual Box EFI persistance workaround

Is Virtual Box's EFI firmware failing to keep data between VM restarts? Have you tried both manual configuration and efibootmgr to no avail?

Make a file called startup.nsh containing your kernel boot line, e.g.

vmlinuz-linux root=/dev/sdXY initrd=/initramfs-linux.img

This will use EFISTUB to boot the kernel directly, see https://wiki.archlinux.org/index.php/EFISTUB#Using_UEFI_Shell. This still isn't really causing persisting changes (e.g. config changes via the NVRAM still don't persist) but at least this lets you boot EFI without fiddling with settings all the time.

Keybase proof

I hereby claim:

  • I am qguv on github.
  • I am qguv (https://keybase.io/qguv) on keybase.
  • I have a public key whose fingerprint is 65A6 6455 A2A5 CAC8 13E4 93FB FC13 890A 40FE EF7B

To claim this, I am signing this object:

#!/bin/bash
TEST_DIR="HW3-TestVectors"
rm_test_files() {
rm -rf \
ciphertext \
plaintext.pdf \
plaintext \
receiver_private_key \
#!/usr/bin/env python3
'''Created to answer the question: How does bitcoin mining work? Key
differences between this method and bitcoin's:
- This method doesn't actually store transactions. :-)
- This primes the hash function with the previous nonce solution, so solving
for the nth iteration necessarily requires a solution for the (n-1)
iteration and all iterations before it. Bitcoin primes the hash function
with the entire previous block, (which includes its nonce). This method is
@qguv
qguv / config.x86_64
Created May 16, 2016 05:29
turing Kernel Configuration 20160515
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 4.6.0-rc7 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_PERF_EVENTS_INTEL_UNCORE=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"
@qguv
qguv / identity.ipynb
Created June 28, 2016 17:48
Identity on tumblr and reddit
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@qguv
qguv / multibuild.py
Created August 22, 2016 22:48
Build a buncha different versions
#!/usr/bin/env python3
from itertools import zip_longest
from os import chdir, environ, getcwd, makedirs
from pathlib import Path
from subprocess import CalledProcessError, check_call
from sys import argv, exit
def commits_from_file(filename):
with open(filename, 'r') as f: