# stop active raid
mdadm --stop /dev/md[01]
# destroy partition table on hdds
dd if=/dev/zero of=/dev/sda bs=1M count=512
dd if=/dev/zero of=/dev/sdb bs=1M count=512
# create new partition table
sgdisk -og /dev/sda
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import pathlib | |
import site | |
def main(): | |
# Hack-ish way to get site-packages | |
site_packages_path = pathlib.Path( | |
[x for x in site.getsitepackages() if "site-packages" in x][0] | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
username="oller120" | |
mountpoint="/Users/olle/liuhome" | |
homeserver="filur02.it.liu.se" | |
sudo ssh -L 139:$homeserver:139 -L 445:$homeserver:445 -N -f [email protected] | |
mount -t smbfs "//ad.liu.se;$username@localhost/students/$username" "$mountpoint" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import json | |
import sys | |
from itertools import chain, groupby | |
from os import path | |
# This assumes that this script is placed in a subdirectory relative to the | |
# project root, such as /bin | |
PROJECT_ROOT = path.dirname(path.dirname(path.abspath(__file__))) | |
PIPFILE_LOCK_PATH = path.join(PROJECT_ROOT, 'Pipfile.lock') |
I hereby claim:
- I am ovidner on github.
- I am ovidner (https://keybase.io/ovidner) on keybase.
- I have a public key ASDFuy6dkTsI3D0se_Mqj89oDPEyc_WKX77Ln7F8B5gBFQo
To claim this, I am signing this object: