Skip to content

Instantly share code, notes, and snippets.

# Remove old versions
apt-get remove docker docker-engine docker.io containerd runc -y
# Set up repo
apt-get update
apt-get install ca-certificates curl gnupg lsb-release -y
mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
@askiiart
askiiart / projectstem-apcsa-assignment7.md
Created February 10, 2023 20:27
A markdown version of the instructions for ProjectSTEM APCSA Assignment7

For this assignment, you will work on a multi-file program which represents a game using a spinnable Game Wheel, a bit like the one seen on the show Wheel Of Fortune (below).

Your Game Wheel will have 20 evenly cut colored “slices”, each marked with a cash prize amount. Two classes are used to create this wheel: GameWheel and Slice. You will not need to edit the Slice class, but you will implement some of the methods for the GameWheel class. You will also write a method in a third class named Game which can be used to play the game.

As this assignment uses pre-written methods which you will need to use in your code, brief documentation of the constructors and public methods of the GameWheel and Slice classes is included at the end of the assignment brief.

Part 1: GameWheel

@askiiart
askiiart / selinux-virt-context-fix.md
Last active September 10, 2023 16:41
A fix for a SELinux problem I had

SELinux virt context fix

Background

I have an RHEL 9 system with SELinux enabled. My .iso files are stored in /mnt/big-stuff/files/vm-data/files, and my .qcow2 files are stored in /mnt/big-stuff/vm-data/drives

Problem

When running a virtual machine, I get a permission denied error (for either the drive or .iso file, depending on the exact issue.

Remove Wii DVD Drive

Preface

This is a copy of this, but with better formatting, and other minor touchups.

The actual thing

First off, i'd like to apologize that I can't make this mod all spiffy and colorful like others, I'm very limited on characters.

This requires little to no previous experience, just a lot of patience. Although the chance of breaking your Wii is slim, I will take no responsibility if you do. Remember, you are opening it, and there's always the chance of breaking something when messing with the insides of a console.

#!/bin/bash
# Remove docker
sudo yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine podman runc
# Add repo
sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
# Install docker
@askiiart
askiiart / install-docker-debian.sh
Last active October 2, 2023 15:24
Script for installing Docker Engine on Debian
#!/usr/bin/env bash
set -e
if [ $(whoami) != "root" ]; then
SUDO="sudo"
fi
# Remove old versions
for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done

Merging Jupyter Notebooks

This is a guide on how to merge Jupyter Notebooks (.ipynb) properly

Install nbdime

  • Install nbdime with pip install nbdime
    • You may also need to install ipython_genutils, with pip install ipython_genutils

Run nbdime

@askiiart
askiiart / super-simple-latent-diffusion.ipynb
Last active September 28, 2022 01:47
super-simple-latent-diffusion.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@askiiart
askiiart / cool-notebooks.md
Last active October 6, 2022 03:57
Some cool jupyter notebooks

Cool Jupyter Notebooks

Some Jupyter Notebooks, most hosted on google colab, that I think are cool. These can all run in the free version of google colab (on a Tesla K80).

Image Generation

  • Stable Diffusion
    • Fast Stable Diffusion
      • Very Highly Recommended
      • 25% faster, lower GPU memory usage, can fix faces using GFPGAN, can upscale 4x using ESRGAN. And very easy.
  • Can only run on Colab hosted runtimes, not a local runtime.
@askiiart
askiiart / super-simple-disco-diffusion.ipynb
Last active September 17, 2022 03:00
super-simple-disco-diffusion.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.