Skip to content

Instantly share code, notes, and snippets.

View bostrot's full-sized avatar
🕶️
Doing some stuff here and there...

Eric Trenkel bostrot

🕶️
Doing some stuff here and there...
View GitHub Profile
@bostrot
bostrot / create_markdown_from_files.cpp
Created January 12, 2021 11:00
This creates a nicely formatted markdown file from all the C++ source code (.cpp and .h) in a given project with multiple subprojects.
#include <iostream>
#include <fstream>
#include <filesystem>
#include <string>
namespace fs = std::filesystem;
int main() {
std::ofstream out("./cpp_snippets.md");
std::string current = "";
@bostrot
bostrot / check_grades.py
Created September 24, 2021 10:56
FH Aachen Grade checker for QIS with telegram notifications
###
# FH Aachen Selenium Grade Checker with Telegram Send for notifications
# Description: Setup telegram-send first with pip3 install telegram_send and then in bash: telegram-send --configure
# Automate with cron e.g.: crontab -e and enter 0 */12 * * * /usr/bin/python3 /path/to/check_grades.py For every 12h.
# Author: Eric Trenkel (@bostrot)
# License: MIT
###
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
@bostrot
bostrot / stackoverflow_fanatics_badge.py
Last active September 24, 2021 12:00
Stackoverflow Fanatics badge automator with daily Telegram notifications
# Run this daily with cron
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
import telegram_send
import time
chrome_options = Options()
chrome_options.add_argument('--headless')
chrome_options.add_argument('--no-sandbox')
@bostrot
bostrot / windows_store_plausible.py
Created November 2, 2021 13:16
Windows Store Analytics (Paid-, Prepaid code data) to Plausible Analytics
##############################################
# Windows Store Analytics to Plausible Event #
# Author: Bostrot #
##############################################
from typing import Text
import requests
import json
urlRequestToken = 'https://login.microsoftonline.com/TENANT_ID/oauth2/token'
@bostrot
bostrot / vscode_creator.sh
Last active February 19, 2025 13:07
VSCode Portable Creator with mingw for Windows and Archives for Mac x64/ARM, Linux x64, Windows x64
#!/bin/bash
VSCODE_OSX_LINK="https://code.visualstudio.com/sha/download?build=stable&os=darwin-universal"
VSCODE_OSXARM_LINK="https://code.visualstudio.com/sha/download?build=stable&os=darwin-arm64"
VSCODE_LINUX_LINK="https://code.visualstudio.com/sha/download?build=stable&os=linux-x64"
VSCODE_WIN_LINK="https://code.visualstudio.com/sha/download?build=stable&os=win32-x64-archive"
VSCODE_OSX_PATH=downloads/vscode-macos-x64
VSCODE_OSXARM_PATH=downloads/vscode-macos-arm
VSCODE_LINUX_PATH=downloads/vscode-linux-x64
@bostrot
bostrot / stage5.txt
Created November 19, 2022 09:08
Outcore Stages
function mv(steps) {
for (var i = 0; i < steps; i++) {
MoveForward()
}
}
function tl() {
TurnLeft()
}
@bostrot
bostrot / crc32_combine.dart
Created April 7, 2023 19:47
CRC32 Combine implementation from zlib in Dart
/// zlib crc32 combine implementation
/// Usage:
///
/// CRC32().combine(checksum1, checksum2, length2); // length of part behind checksum2
///
class CRC32 {
List<int> x2ntable = List<int>.filled(32, 0);
CRC32() {
int n, p;