Skip to content

Instantly share code, notes, and snippets.

View Jaezmien's full-sized avatar
🐄
Moo!

Jaezmien Naejara Jaezmien

🐄
Moo!
View GitHub Profile
@Jaezmien
Jaezmien / LICENSE.md
Last active February 6, 2023 05:43
The Unicorn License

THE UNICORN LICENSE, VERSION 1

Copyright (c) [year] [copyright holder]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

  1. The source code of the Software shall be reviewed by a unicorn, who swears upon the Unicorn Law that it is reviewing the software with full honesty and integrity, ensuring that the software does not contain any harmful or malicious code.

  2. The unicorn's review shall indicate that the source code is original and not plagiarized, and that the software is safe to use.

@Jaezmien
Jaezmien / ytmp3.bat
Last active August 20, 2023 10:01
Quick lazy script to download youtube videos as mp3 using yt-dlp
@echo off
rem ; Set environment to local so that we don't leak variables
setlocal
set ytid=%1
IF "%ytid:~0,24%"=="https://www.youtube.com/" goto warning-link
IF "%ytid:~0,23%"=="http://www.youtube.com/" goto warning-link
IF "%ytid:~0,20%"=="https://youtube.com/" goto warning-link
@Jaezmien
Jaezmien / TEMPLATE.md
Created February 21, 2022 00:02
README Template

Project Name

Short description

@Jaezmien
Jaezmien / exportms3d279.py
Last active January 28, 2022 08:04
Blender Addon to objects to Milkshape 3D ASCII format
# *heavily* based on blender's export_obj.py addon + obvr's obj2ms3dascii
# for use with Blender 2.7x and below
import bpy
import os
import shutil
import mathutils
from bpy_extras import io_utils
from bpy_extras.io_utils import ExportHelper, path_reference_mode, axis_conversion, orientation_helper_factory
from bpy.props import StringProperty, BoolProperty, FloatProperty
@Jaezmien
Jaezmien / char_states.lua
Created January 9, 2022 03:12
NotITG Guide for BitmapText Character States
return {
-- + Special Characters (1)
[' '] = 0,
['space'] = 0,
['!'] = 1,
['"'] = 2,
['"'] = 2,
['#'] = 3,
['$'] = 4,
['%'] = 5,
@Jaezmien
Jaezmien / TinyBlockPos.cs
Last active January 7, 2023 03:40
Tiny version of BlockPos.jar from Minecraft for handling different formats (Vector3 & Long)
using System.Numerics;
namespace Minecraft
{
class TinyBlockPos
{
private static long X_MASK = (1L << 26) - 1L;
private static long Y_MASK = (1L << 12) - 1L;
private static long Z_MASK = (1L << 26) - 1L;
private Vector3 position;
@Jaezmien
Jaezmien / debounce.js
Last active July 25, 2021 03:14
⏱ Small debounce function
const debounce = function(f, t) {
let id;
return function() {
if( id ) clearTimeout(id);
id = setTimeout(() => {id = null; f()}, t);
}
}
@Jaezmien
Jaezmien / exec.js
Last active May 2, 2021 10:19
👂 Execute and listen the console.log of a code
function exec_js(code) {
var _log = console.log;
var logs = [];
console.log = function(...value) {
_log.apply(console, arguments);
logs.push( value );
}
Function( code )();
console.log = _log;
return logs;
@Jaezmien
Jaezmien / notitg-addresses.yml
Last active October 14, 2022 08:17
NotITG Addresses in YAML format
V1:
BuildAddress: 0x006AED20
Address: 0x00896950
BuildDate: 20161224
Size: 10
V2:
BuildAddress: 0x006B7D40
Address: 0x008A0880
BuildDate: 20170405
Size: 10
@Jaezmien
Jaezmien / pauser.ts
Created February 4, 2021 11:04
Pause async thread and continue using a separate thread
export default class Pauser {
private paused: boolean = false;
private resolve: any = undefined;
Pause() {
if( this.paused ) return;
this.paused = true;
return new Promise((res) => { this.resolve = res; });
}