Skip to content

Instantly share code, notes, and snippets.

@CodingKoopa
CodingKoopa / setup-llvm.sh
Last active October 30, 2022 20:36
Setup LLVM
#!/bin/sh -eu
# See https://clang.llvm.org/get_started.html.
LLVM_VERSION=15.0.0
readonly LLVM_VERSION
source_dir=llvm-project-$LLVM_VERSION.src
source_archive=llvm-project-$LLVM_VERSION.src.tar.xz
source_url=https://github.com/llvm/llvm-project/releases/download/llvmorg-$LLVM_VERSION/$source_archive
class EntityNotFound extends Error {
constructor(message) {
super(message);
this.name = "EntityNotFound";
}
}
function _getFolderByName(parent_folder, name) {
if (parent_folder === undefined || name === undefined) {
throw new Error(`Did you accidentally run this function directly?`);
@CodingKoopa
CodingKoopa / driveHelper.gs
Created August 18, 2022 02:39
something google script
// Entrypoint function.
function driveHelper() {
// Get a collection of all files in the user drive.
const files = DriveApp.getFiles();
// For each file.
while (files.hasNext()) {
// Get the file.
const file = files.next();
// Fix restricted characters (https://rclone.org/local/#restricted-characters)
@CodingKoopa
CodingKoopa / apt.md
Last active August 18, 2025 06:15
APT Repositories Explained

Intro

To install and update packages on Debian, Ubuntu, or most derived distributions, you use APT, the Advanced packaging tool, to download the packages and their dependencies, which uses dpkg to install them.

These notes go into the downloading part, as I think it's easy to get overwhelmed by how the repositories work. I will eventually turn this into a page on my website.

Repository

A repository is where the packages come from. It provides binary packages for an arbitrary selection of architectures as well as source packages. Repositories are APT's data source. [https://wiki.debian.org/DebianRepository]

@CodingKoopa
CodingKoopa / php-remote-debugging-with-xdebug-2-in-docker.md
Last active March 27, 2024 23:51
Setting up PHP Remote Debugging with Xdebug 2 in Docker

This document describes how I setup remote PHP debugging with Xdebug 2, running within a Docker container, with Visual Studio Code.

On ports

The first thing I did when setting up an Xdebug client within a Docker container is add its port (9000) to my Compose file:

services:
    httpd:
        #
@CodingKoopa
CodingKoopa / building-wine-with-pdb-files.md
Last active July 19, 2024 20:06
How to build Wine with PDB files encapsulating CodeView symbols using LLVM's Clang and LLD, for debugging purposes.

Building Wine with PDB files

Background

Program database (PDB) files contain debugging information for Portable Executables (PEs). Essentially, they are the Windows version of DWARF data. Accordingly, there is a strong ecosystem for using PDB files, as well as a large amount of developers accustomed to using PDBs to diagnose programs. It's useful to be able to provide PDB files for Wine's DLL implementations to assist in diagnosing crashes in Wine.

A PDB file itself is a Multi-Stream Format (MSF) file containing arbitrary streams of data. Each stream within a PDB serves a particular purpose, between metadata, PE identification, and the symbols themselves. The symbol and type data is stored using the CodeView format. The PDB format wa

@CodingKoopa
CodingKoopa / discordminesweeper.py
Last active June 12, 2022 21:07 — forked from vgmoose/discordminesweeper.py
Discord minesweeper grid generator with emojis and spoiler tags
#!/bin/python3
import sys
import random
emojis = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "X"]
mine = -1
def gen_grid(num_row, num_col, mines):
grid = [[0 for col in range(num_col)] for row in range(num_row)]
@CodingKoopa
CodingKoopa / 1readme.md
Last active August 25, 2019 20:59
Patches for donut
  • remove-duplicate-file.patch is likely needed for a build on any platform (at least, I don't see how builds could succeed with the variables being redifined as they are).
  • fix-case-insensitive-paths.patch is needed for a build on any Unix-like systems (e.g. Linux, Mac OSX) that are case-insensitive.
  • fix-build-without-debug-libs.patch is a hack I put in because Cmake complained about the debug libraries not being present.
@CodingKoopa
CodingKoopa / main.cpp
Created March 9, 2017 22:20
Save Data Check Test
// Save Data Check Test - Tries to open a system archive. Code is mostly from 3dsutils.
#include <3ds.h>
#include <memory>
int main(int argc, char **argv)
{
gfxInitDefault();
//Initialize console on top screen. Using NULL as the second argument tells the console library to use the internal console structure as current one
@CodingKoopa
CodingKoopa / Clear-Blue-Mod.theme.css
Created November 27, 2016 03:21
BetterDiscord Clear Blue Theme Mod
//META{"name":"Clear Blue Mod","description":"A fancy looking clear blue theme, modified to fix some colors and the friend list.","author":"Taff, TheKoopaKingdom","version":"1.0"}*//
.message-group.compact .emoji.jumboable {
width: 128px !important;
height: 128px !important;
}
.settings-header {
background:#213248 !important;