Skip to content

Instantly share code, notes, and snippets.

View CrazySqueak's full-sized avatar

ItsAnnie CrazySqueak

View GitHub Profile
@CrazySqueak
CrazySqueak / extract_vlc_android_playlist.py
Last active May 6, 2024 17:39
Extracts a playlist from VLC for Android, and writes it to an m3u8 file. Follow usage instructions at the top of the file.
#!/usr/bin/env python3
# By Anabelle Page-John, 2024
#
# Installation:
# 1. Download this file to your phone.
# 2. Install termux from the Google Play Store or F-Droid (if you have it).
# 3. In termux, type "pkg install python3" and press ENTER to install python.
#
# Usage:
# In VLC, go to Advanced and select Dump Media Database
@CrazySqueak
CrazySqueak / .instructions.md
Last active February 28, 2024 13:16
Simulates a realistic day/night cycle in Godot 4. Able to handle different latitude/longitude and seasons, as well as polar night/day and similar.

Quickstart Tutorial:

  1. Add the following file (solartime.gd) to your Godot project.
  2. Create a new Node3D, but don't attach the script to it yet. Name this Node3D "solar center" or something similar, and ensure it's in the center of your level.
  3. Add a DirectionalLight3D as a child to the Node3D. This will represent the sun.
  4. Move the DirectionalLight3D to a suitable height on the Y-axis, and point it downwards. Right now, it should be facing downwards and directly overhead.
  5. Now, attatch solartime.gd to the original Node3D you created. Configure the settings for latitude/longitude/season/etc. as you wish.
  6. Click "Run" and you should be good to go!

Note: This is intended only for adjusting the lighting (via a DirectionalLight3D or two). This should not be used to display a skybox unless you know what you are doing. If you're new and looking to make the sky look pretty now you have a working sun, look up "sky shaders" for

@CrazySqueak
CrazySqueak / thanos_snap.py
Created January 2, 2024 09:46
Thanos snap the current directory (non-recursive)
import sys, os, random
dirname = os.path.abspath(os.getcwd())
proportion = float(sys.argv[1]) if len(sys.argv)>=2 else 0.5
print("Current Directory:", dirname)
print("Proportion To Kill:", proportion)
v = input("Please enter the absolute path of the current directory to confirm you want to do this.\n(THIS CANNOT BE UNDONE).\n").strip()
if v.strip() != dirname:
print("Verification failed.")