Skip to content

Instantly share code, notes, and snippets.

View nimaid's full-sized avatar

Ella Jameson nimaid

  • Tucson, AZ
View GitHub Profile
@nimaid
nimaid / mount_win.bash
Last active June 23, 2023 04:23
A simple linux boot script to mount a Windows 10 drive correctly.
#!/bin/bash
#############################################
# Automatically fixes & mounts a Windows 10 #
# NTFS partition to a folder in RW mode. #
#############################################
# ~~~~~~~~ Variables ~~~~~~~~
@nimaid
nimaid / simplify_and_darken.bat
Last active June 23, 2023 21:11
A batch script to strip down a Windows 10 Sandbox instance on boot to be less visually annoying
REM Run this at at startup
REM Suggested way to use:
REM set ORIGDIR=%CD%
REM pushd %~dp0
REM set SCRIPTDIR=%CD%
REM popd
REM
REM start "Simplify and Darken Desktop" "%SCRIPTDIR%\resources\simplify_and_darken.bat"
@echo off
@nimaid
nimaid / bad_apple_movement.py
Created February 20, 2023 00:05
Glitchy rainbow movement effect for video (https://youtu.be/iuLY_cLhiZU)
import os
import urllib.request
from enum import Enum
import hashlib
import cv2
import numpy as np
bad_apple_video = "bad_apple.mp4"
# The current best source for the original video from NicoNico
@nimaid
nimaid / video.py
Created February 19, 2023 08:15 — forked from tommy-mor/video.py
not good code stay away
from moviepy.editor import *
import numpy as np
clip = VideoFileClip("hams.mkv")
import sounddevice as sd
import soundfile as sf
from queue import Queue
from collections import OrderedDict
import pprint
pp = pprint.PrettyPrinter(indent=4)
print('started')
@nimaid
nimaid / Neopets_NFT_Whitepaper.md
Last active February 14, 2023 11:04
A fake whitepaper for a Neopets NFT platform in the style of CryptoZoo.

Neopets

Neopets Official Whitepaper

[ An image of a vibrant and colorful pet shop is shown. ]

$NEO Contract Address: 0x1c232d1b8f208bF7a87a1Ce309901F9F22deaD6B

Introduction

@nimaid
nimaid / CryptoZoo_Whitepaper.md
Created February 14, 2023 09:01
A markdown, text-only version of the CryptoZoo whitepaper.

CryptoZoo

CryptoZoo Official Whitepaper

[ An image of a shining golden egg on a black background with a circular, golden border is shown. ]

$ZOO Contract Address: 0x7fFC1243232da3Ac001994208E2002816b57c669

Introduction

@nimaid
nimaid / strip_file_blank_space.py
Created May 3, 2022 10:23
A Python function to strip trailing null bytes from arbitrarily large files.
import os
import shutil
from math import floor
import warnings
import tempfile
def strip_file_blank_space(filename, block_size=1*(1024*1024)):
# Strips null bytes at the end of a file, and returns the new file size
# This will process the file in chunks, to conserve memory (default = 1 MiB)
file_end_loc = None # This will be used if the file is larger than the block size
@nimaid
nimaid / e621-dl.py
Last active October 5, 2023 21:10
Downloads ALL of the images (with tag filter option) from e621 in sequential order, with embedded XMP tags and descriptions
# To easily prepare a conda environment, use this (Linux only):
# https://raw.githubusercontent.com/nimaid/python-dl621/master/environment.yml
# Also relies on my logger module here: https://gist.github.com/nimaid/9368777e83b0ac513710606d3677a00b
import os
import time
import dl621
# Import local modules
import logger # https://gist.github.com/nimaid/9368777e83b0ac513710606d3677a00b
@nimaid
nimaid / download_video_archive.bash
Last active April 23, 2022 21:43
Download YouTube video(s) in archival form.
#!/bin/bash
set -e
yt-dlp --abort-on-error --yes-playlist --force-overwrites --write-thumbnail --write-subs --write-auto-subs --sub-format "srt" --embed-subs --embed-chapters --embed-metadata --embed-thumbnail --embed-info-json --sponsorblock-mark "all" "$1"
@nimaid
nimaid / get-location.bash
Created April 22, 2022 07:37
Prints the current time na location data, based on IP.
#!/bin/bash
set -e
# Required packages
# curl
# jq
# isoquery
VOICE="en-us"