Skip to content

Instantly share code, notes, and snippets.

@jherrlin
jherrlin / arch-linux-install
Created December 1, 2017 15:05 — forked from binaerbaum/arch-linux-install
Minimal instructions for installing arch linux on an UEFI NVMe system with full system encryption using dm-crypt and luks
# 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.
# Set swiss-french keymap
** 2DV505 - Current Topics in Computer Science :school:
Johan is available every Tuesday between 10:00-12:00.
*** Ideas
**** Emacs Lisp
***** Network manager integration
***** Minor mode
***** Unitime integration
***** Something in orgmode
#python3.5
import urllib.request as urllib2
import json
import codecs
#API base url,you can also use https if you need
url = "http://macvendors.co/api/"
#Mac address to lookup vendor from
mac_address = "BC:92:6B:A0:00:01"
@jherrlin
jherrlin / arch-linux-install
Created October 31, 2016 15:59 — forked from mattiaslundberg/arch-linux-install
Minimal instructions for installing arch linux on an UEFI system with full system encryption using dm-crypt and luks
# 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.
# Set swedish keymap
from pprint import pprint as pp # Good looking print
animals = [
{'name': 'Fluffykins', 'species': 'rabbit'},
{'name': 'Caro', 'species': 'dog'},
{'name': 'Hamilton', 'species': 'dog'},
{'name': 'Harold', 'species': 'fish'},
{'name': 'Ursula', 'species': 'cat'},
{'name': 'Jimmy', 'species': 'fish'}
]
def add(a, b):
return a + b
add('hej', 'san') # Ska funka eftersom det är strings.
add(1, 2) # Ska funka eftersom båda är ints.
add('hejsan', 1) # Python är hårt typat, så här får vi type error.
function setup {
echo "Removing test container..."
rm -rf containers
echo "Git clone owtf valhalla containers"
git clone git@github.com:Kodkollektivet/owtf-valhalla-containers.git containers
printf "Creating virtual environment...\n\n"
virtualenv --python=/usr/bin/python venv
import string
first = [i for i in range(7)]
second = ["{}{}".format(a,b) for a in string.ascii_uppercase for b in string.ascii_uppercase]
third = ['{}'.format(i).zfill(3) for i in range(10)]
big_list = []
for a in first:
<script type="text/javascript">
function loadImageFileAsURL()
{
var filesSelected = document.getElementById("image").files;
var base64 = document.getElementById("base64");
if (filesSelected.length > 0)
{
var fileToLoad = filesSelected[0];
var fileReader = new FileReader();
d = {
'name': 'john',
'age': 30,
'city': 'Vaxjo'
}
for key, value in d.items():
print(key, value)
# Replace all