Skip to content

Instantly share code, notes, and snippets.

View Ssenseii's full-sized avatar
🐢
expect chaos.

Simon Reinhardt Ssenseii

🐢
expect chaos.
View GitHub Profile
@Ssenseii
Ssenseii / download_spotify_music.py
Created August 7, 2025 23:09
Download your spotify tracks using your spotify data and python (requires python, ffmpeg, ytd-lp)
import json
import subprocess
import time
import os
import math
# ===== CONFIG =====
JSON_FILE = "tracks.json"
OUTPUT_DIR = "music"
AUDIO_FORMAT = "mp3"
@Ssenseii
Ssenseii / Quake_Fast_Inverse_Square_Root.ex
Created September 29, 2024 17:15
Quake's Fast Inverse Square Root Implementation in Elixir.
defmodule FastInverseSquareRoot do
@magic_number 0x5f3759df
# Quake Fast Inverse Square Root
# steps
# integer into a 32 bit integer.
# the magic number - (the integer shifted to the right)
# turn the int32integer to a float
@Ssenseii
Ssenseii / wikipedia_list_extractor.js
Last active September 29, 2024 09:18
Extract Wikipedia Lists Into a Javascript Dictionary. I needed this for a text pre-processing project.
/*
Test Case: https://en.wikipedia.org/wiki/List_of_English_abbreviations_made_by_shortening_words
Creates a js dictionary from a list in wikipedia.
modules requires! Cheerio & fs
The result might need a little cleaning
*/
const fs = require("fs");
const cheerio = require("cheerio");
@Ssenseii
Ssenseii / complex_operations.exs
Last active September 29, 2024 08:44
Elixir Module for More Complex Number Operations than the ones provided by the Complex Module
# thank you u/al2o3cr for the constructive feedback!!
defmodule Complex do
defstruct real: 0, imag: 0
@type t :: %Complex{real: number, imag: number}
def add(%Complex{real: r1, imag: i1}, %Complex{real: r2, imag: i2}) do
%Complex{real: r1 + r2, imag: i1 + i2}
end
@Ssenseii
Ssenseii / image_to_ascii.c
Created September 16, 2024 19:17
RAYLIB: Image_to_ASCII Basic Implementation (with color)
#include <stdio.h>
#include "raylib.h"
char asciiChars[] = {'@', '#', 'S', '%', '?', '*', '+', ';', ':', ',', '.'};
int windowWidth = 1024;
int windowHeight = 780;
int imageResizeValue = 100;
@Ssenseii
Ssenseii / simplified_github.js
Created December 20, 2023 15:55
GitHub Explained in OOP
class Git {
constructor(name) {
this.name = name;
this.lastCommitId = -1;
this.branches = [];
var master = new Branch("master, null");
this.branches.push(master);
this.Head = master;
@Ssenseii
Ssenseii / index.html
Created September 1, 2022 12:24
Module Shape
<div class="container">
<div class="module">
<div id="shape" class="module__shape ">
<div class="module__shape-shadow-1"></div>
<div class="module__shape-shadow-2"></div>
<div class="module__shape-shadow-3"></div>
<div class="module__shape-rec1"></div>
<div class="module__shape-rec2"></div>

Flashcard Rotation

Hover over the white circles to reveal the magic letters.

A Pen by Simon on CodePen.

License.