Skip to content

Instantly share code, notes, and snippets.

View roguephysicist's full-sized avatar

Sean Anderson roguephysicist

View GitHub Profile
@roguephysicist
roguephysicist / QEMUwrap.sh
Created January 8, 2023 02:38
QEMU Wrapper
#!/bin/bash
MODE="$1"
# Image files
# FILE_ISO="CentOS-7-x86_64-NetInstall-2009.iso"
# FILE_IMG="centos7.qcow2"
FILE_IMG="centos8.qcow2"
# FILE_ISO="CentOS-8.3.2011-x86_64-boot.iso"
@roguephysicist
roguephysicist / readKPTS.py
Created October 29, 2019 00:19
Python NetCDF4: read kpts
'''
A simple script for reading the "kpts.nc" NetCDF file generated by ABINIT, for
determining the generated kpt grid.
'''
import netCDF4
import numpy as np
def kpts_abi(infile):
'''
@roguephysicist
roguephysicist / adobe2latex.sh
Last active August 20, 2019 12:42
adobe2latex: build and use Adobe fonts within a TeX distribution
#/bin/bash
# Allows the user to install and make use of Adobe fonts with a TeX distribution
# Requires installation of 'lcdf-typetools' using package manager
function adobe2latex () {
FONT="$1"
cp ~/Dropbox/link/Docs/backup/fonts/adobe/${FONT}*.otf otf/
./scripts/makeall ${FONT}
sudo ./scripts/install $(kpsewhich -var-value TEXMFLOCAL)
sudo mkdir -p $(kpsewhich -var-value TEXMFLOCAL)/web2c
@roguephysicist
roguephysicist / gnuplot_line_styles
Last active January 24, 2018 22:30
gnuplot: line styles
set style line 1 dt 1 lc rgb "#6c71c4" lw 1.0 #violet
set style line 2 dt 1 lc rgb "#859900" lw 1.0 #green
set style line 3 dt 1 lc rgb "#cb4b16" lw 1.0 #orange
set style line 4 dt 1 lc rgb "#2aa198" lw 1.0 #cyan
set style line 5 dt 1 lc rgb "#dc322f" lw 1.0 #red
set style line 6 dt 1 lc rgb "#268bd2" lw 1.0 #blue
set style line 7 dt 1 lc rgb "#d33682" lw 1.0 #magenta
set style line 8 dt 1 lc rgb "#b58900" lw 1.0 #yellow