Skip to content

Instantly share code, notes, and snippets.

View darkarnium's full-sized avatar
💭
🔥

Peter darkarnium

💭
🔥
View GitHub Profile
@darkarnium
darkarnium / jupyterlab.sh
Last active July 17, 2022 21:42
JupyterLab Helper - Installs, configures, and runs JupyterLab in a container.
#!/bin/bash
#
# NOTE: This script enables the JupterLab Extension Manager and installs extensions.
# There are code-execution risks with this, so make sure you only use trusted
# extensions and you're comfortable with these extensions before running!
#
# This script wrappers the JupterLab Docker container. It defines a few Docker volume
# mounts to ensure that JupyterLab configuration and notebooks are persisted between
# restarts.
#
@darkarnium
darkarnium / libvirt-linux-patches.xsl
Created November 9, 2021 18:36
Terraform Libvirt Patches
<?xml version="1.0" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output omit-xml-declaration="yes" indent="yes"/>
<xsl:output method="xml" indent="yes" />
<xsl:param name="targetBusSata" select="'sata'"/>
<xsl:param name="targetBusVirtio" select="'virtio'"/>
<xsl:param name="vcpuPlacementAuto" select="'auto'"/>
<xsl:param name="diskCache" select="'none'"/>
<xsl:param name="diskIoQueues" select="'4'"/>
@darkarnium
darkarnium / hasher.go
Last active January 27, 2022 13:56
Go vs Python - SHA1 and MD5
package hasher
import (
"crypto/md5"
"crypto/sha1"
"encoding/hex"
"io"
"os"
)
@darkarnium
darkarnium / serve.sh
Last active March 14, 2024 14:25
JupyterLab - Local setup
#!/bin/bash
# If the lab container version changes, plugins and their associated Python dependencies
# may need updating.
LAB_CONTAINER="jupyter/base-notebook:lab-4.0.7"
function wait_for_jupyterlab {
while true ; do
if curl -s -m5 -o /dev/null -f http://127.0.0.1:8888; then