Skip to content

Instantly share code, notes, and snippets.

View ovidner's full-sized avatar

Olle Vidner ovidner

View GitHub Profile
@ovidner
ovidner / install_nxopen.py
Created March 31, 2022 08:40
Install NXOpen
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]
)
@ovidner
ovidner / mount-liu-home.sh
Last active July 17, 2018 06:42
Mount LiU home directory remotely on macOS
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"
@ovidner
ovidner / headless-luks-encrypted-ubuntu-server.md
Created July 6, 2018 19:11 — forked from jkullick/headless-luks-encrypted-ubuntu-server.md
Headless LUKS encrypted Ubuntu Server on Hetzner
# 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
#!/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')
@ovidner
ovidner / keybase.md
Created August 19, 2017 22:35
keybase.md

Keybase proof

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: