Skip to content

Instantly share code, notes, and snippets.

@Kelketek
Kelketek / game_clock.py
Created September 12, 2022 01:31
Example game datetime functions
from typing import Literal, Dict
# Our lowest resolution is in hours.
HOUR_LENGTH = 1
DAY_LENGTH = 24
SEASON_LENGTH = DAY_LENGTH * 30
YEAR_LENGTH = SEASON_LENGTH * 4
TimeKey = Literal['year', 'season', 'day', 'hour']
# Could use a DataClass or a TypedDict, but that would be distracting to the point I'm trying to show
@Kelketek
Kelketek / setup_opensee.sh
Last active November 3, 2021 23:09
Install and configure OpenSeeFace for use with VTube Studio on Ubuntu Linux.
#! /bin/bash
# This script is a quick setup script for those using Ubuntu-based systems
# and which want to set up OpenSeeFace to work with VTube Studio.
#
# This script will allow novice Linux users to get configured with
# a sane VTube configuration that will work with their webcam.
#
# Before running this script, make sure you've installed VTuber Studio
# using the default options in Steam.
#
### Keybase proof
I hereby claim:
* I am kelketek on github.
* I am kelketek (https://keybase.io/kelketek) on keybase.
* I have a public key ASAZTejW-F97oLwNQbQ5z-6aRBfVJjiDso_Z0j6_cO5rCQo
To claim this, I am signing this object:
# -*- coding: utf-8 -*-
"""Refactor South migrations to use settings.AUTH_USER_MODEL.
Inserts a backwards-compatible code-snippet in all
your schema migration files and uses a possibly customized user
model as introduced in Django 1.5.
Please note that this has nothing to do with changing
settings.AUTH_USER_MODEL to a new model. If you do this, stuff
will very likely break in reusable apps that have their own
migration trees.