Skip to content

Instantly share code, notes, and snippets.

View bitsycore's full-sized avatar
🦊

Bitsy bitsycore

🦊
View GitHub Profile
#include <stdio.h>
#include <stdint.h>
#include <assert.h>
static_assert(sizeof(void*) == 8, "Pointer size must be 64 bits!");
static_assert(sizeof(uint64_t) == 8, "uint64_t size must be 64 bits!");
#define _INTERNAL_TPTR_PTR_MASK 0x0000FFFFFFFFFFFFULL
#define _INTERNAL_TPTR_FLAGS_MASK 0xFFFF000000000000ULL
@bitsycore
bitsycore / ffs.md
Created November 7, 2024 20:53
Firefox Settings

Chrome Type Font

Option 1

gfx.font_rendering.cleartype_params.enhanced_contrast 100 gfx.font_rendering.cleartype_params.pixel_structure 5 gfx.font_rendering.cleartype_params.rendering_mode 5

Option 2

gfx.font_rendering.cleartype_params.cleartype_level 400 gfx.font_rendering.cleartype_params.enhanced_contrast 12 gfx.font_rendering.cleartype_params.pixel_structure 0 gfx.font_rendering.cleartype_params.rendering_mode 3

Edge Scroll

// =================================
// MARK: JSON-PRIMITIVE
// =================================
// -----------------
// Get
fun JsonPrimitive.get() : Any {
if(isString) return content
booleanOrNull?.let { return it }
intOrNull?.let { return it }
@file:Suppress("NOTHING_TO_INLINE")
// --------------------------
// MARK: IF NOT NULL
// --------------------------
class EndNotNullResult<T>(val result: NotNullResult<T>)
open class NotNullResultValue<T>(override var resultPredicate: Boolean, open val value: T) : NotNullResult<T>(resultPredicate)
open class NotNullResult<T>(open var resultPredicate: Boolean)
// IF NOT NULL FINAL
inline fun <T> T?.isNotNull(returnNonNullObject: (T) -> Unit): EndNotNullResult<T> {
@bitsycore
bitsycore / run_powershell_from_pastebin.ps1
Created November 29, 2023 16:55
Run script from Pastebin in Powershell
iex((iwr "http://pastebin.com/raw.php?i=27JX6GqJ").content)
@bitsycore
bitsycore / flac_to_mp3.py
Created November 29, 2023 16:48
This script converts FLAC files to MP3 format using ffmpeg-python
#!/usr/bin/env python
# Author: bitsydoge
# Description: This script converts FLAC files to MP3 format using ffmpeg-python
# Usage: flac_to_mp3.py [-h] [--input_folder INPUT_FOLDER] [--output_folder OUTPUT_FOLDER] [--bitrate BITRATE] [--verbose]
import os
import ffmpeg
import argparse
import tqdm
@bitsycore
bitsycore / VlcTemplate.lua
Created November 9, 2023 16:37
VlcTemplate.lua
function descriptor()
return {
title = "VlcTemplate",
version = "1.0",
author = "You",
url = "http://",
shortdesc = "Short Description",
description = "Full Description",
capabilities = {"menu", "input-listener", "meta-listener", "playing-listener"}
}
param (
[string]$folderPath,
[string]$destinationPath = $folderPath,
[string]$BLPConverter = "BLPConverter.exe"
)
# Check if folderPath is provided
if ([string]::IsNullOrEmpty($folderPath)) {
Write-Error "Error: folderPath must be provided."
Write-Host "Usage: script.ps1 -folderPath <FolderPath> [-destinationPath <DestinationPath>] [-BLPConverter <ConverterPath>]"
function descriptor()
return {
title = "Shuffle Playlist & Save",
version = "1.0",
shortdesc = "Shuffle Playlist",
description = "Shuffles all items on the playlist and save the playlist",
author = "Doge",
capabilities = {"trigger"}
}
end
@bitsycore
bitsycore / one_line_system_info.ps1
Last active November 9, 2023 16:34
One line system info
clear;"OS: $((gcim Win32_OperatingSystem).Caption.Trim()) ($(([System.Environment]::OSVersion.Version).ToString()))";"Host: $env:COMPUTERNAME";"Shell: $PSHOME";"UP: $((gcim Win32_OperatingSystem).LastBootUpTime)";"CPU: $((gcim Win32_Processor).Name)";"GPU: $((gcim Win32_VideoController).Name)";"RAM: $(([math]::Round((gcim Win32_ComputerSystem | select -ExpandProperty TotalPhysicalMemory) / 1GB))) GB"