Skip to content

Instantly share code, notes, and snippets.

View DeflatedPickle's full-sized avatar

DeflatedPickle

View GitHub Profile
# moves all files from all directories in the current working directory to a folder
import os
import shutil
old_path = os.getcwd()
new_path = f"{old_path}/ext"
if not os.path.exists(new_path):
os.mkdir(new_path)
@DeflatedPickle
DeflatedPickle / TabbedPanel.java
Last active September 1, 2020 18:58
A tabbed panel implementation for LeGUI.
package org.liquidengine.legui.component;
import org.joml.Vector2f;
import org.liquidengine.legui.component.optional.align.HorizontalAlign;
import org.liquidengine.legui.component.optional.align.VerticalAlign;
import org.liquidengine.legui.event.MouseClickEvent;
import org.liquidengine.legui.icon.CharIcon;
import org.liquidengine.legui.icon.Icon;
import org.liquidengine.legui.listener.MouseClickEventListener;
import org.liquidengine.legui.style.Style;
@DeflatedPickle
DeflatedPickle / css_switcher.html
Last active February 19, 2018 10:09
A NodeJS script that switches CSS depending on the current OS (for Electron).
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Index</title>
<script rel="script" type="text/javascript" src="switcher.js"></script>
</head>
@DeflatedPickle
DeflatedPickle / list.py
Last active October 20, 2017 14:09
Enhanced List
class list(list):
def __init__(self, *args):
for arg in args:
self.append(arg)
def replace(self, old, new):
self[self.index(old)] = new
def replace_all(self, old, new):
for number, item in enumerate(self):
@DeflatedPickle
DeflatedPickle / MinecraftEnergyTypes.md
Last active November 9, 2024 08:15
A simple table for Minecraft energy types and a matrix for conversion rates.

Minecraft Energy Types


Energy Name Abbreviation Original Mod Version
Anima AM Anima-Mundi 1.11.2
Blutricity BE (NO) Redpower 1.6.4
Charge RP (NO)/Fz? Factorization 1.7.10
Crystal Flux CF Actually Additions 1.12
@DeflatedPickle
DeflatedPickle / tkinter_random_number.py
Last active July 14, 2019 07:21
Endlessly generates a random number and shows it in a Tkinter window.
import tkinter as tk
import random
class Random(tk.Tk):
def __init__(self):
tk.Tk.__init__(self)
self.title("Random")
self.variable = tk.IntVar()