Skip to content

Instantly share code, notes, and snippets.

View jbhanks's full-sized avatar

James Hanks jbhanks

View GitHub Profile
@jbhanks
jbhanks / arch-linux-install
Last active February 23, 2019 07:15 — forked from mattiaslundberg/arch-linux-install
My variation on installing Arch
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
@jbhanks
jbhanks / Permutations example
Last active August 29, 2015 14:23 — forked from jookyboi/python_resources.md
Python-related modules and guides.
# from stackexchange
#You are looking for the Cartesian Product.
#In mathematics, a Cartesian product (or product set) is the direct product of two sets.
#In your case, this would be {1, 2, 3, 4, 5, 6} x {1, 2, 3, 4, 5, 6}. itertools can help you there:
import itertools
x = [1, 2, 3, 4, 5, 6]
[p for p in itertools.product(x, repeat=2)]
@jbhanks
jbhanks / 0_reuse_code.js
Last active August 29, 2015 14:23
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console