Skip to content

Instantly share code, notes, and snippets.

View rotespferd's full-sized avatar
👨‍🍳

Marian Hahne rotespferd

👨‍🍳
View GitHub Profile
@rotespferd
rotespferd / base16-eighties.dark.icls
Created January 18, 2016 16:32
Base 16 - Eighties Dark (for Phpstorm)
<scheme name="Base16-Eighties-Dark" version="142" parent_scheme="Default">
<option name="LINE_SPACING" value="1.1" />
<option name="EDITOR_FONT_SIZE" value="12" />
<option name="CONSOLE_FONT_NAME" value="Menlo" />
<option name="CONSOLE_LINE_SPACING" value="1.0" />
<option name="EDITOR_FONT_NAME" value="Source Code Pro" />
<colors>
<option name="ADDED_LINES_COLOR" value="99cc99" />
<option name="ANNOTATIONS_COLOR" value="515151" />
<option name="CARET_COLOR" value="e8e6df" />
@rotespferd
rotespferd / convert_nicknames.py
Last active April 10, 2021 16:36
Convert OOTP team_nick_names.txt to XML
from xml.dom import minidom
import os
txtFile = open("./team_nick_names.txt", "r")
nicknameLines = txtFile.readlines()
root = minidom.Document()
root.encoding = "utf-8"
@rotespferd
rotespferd / download-nyt-cover.ts
Created April 10, 2022 18:47
Download todays cover of the New York Times
import { format } from "https://deno.land/[email protected]/datetime/mod.ts";
const download = async (url: string, filename: string) => {
const data = (await fetch(url)).arrayBuffer();
return Deno.writeFile(filename, new Uint8Array(await data));
};
const outputDir = Deno.args[0];
const date = new Date();
const outputFile = `${outputDir}/nyt_cover_${format(date, "yyyy-MM-dd")}.pdf`;
@rotespferd
rotespferd / install-php.sh
Last active May 16, 2024 15:47
Install PHP via asdf on Fedora
sudo dnf install -y autoconf bison bison-devel \
re2c libxml2 libxml2-devel openssl-devel \
sqlite sqlite-devel libcurl libcurl-devel \
gd gd-devel oniguruma oniguruma-devel \
libpq libpq-devel postgresql \
readline readline-devel libzip libzip-devel
asdf install php 8.3.7
asdf global php 8.3.7
@rotespferd
rotespferd / fedora-update.sh
Created February 8, 2025 19:01
fedora-update.sh
#!/bin/bash
echo "Create pre snapshot..."
timestamp=$(date +%Y%m%d%H%M%S)
pre_snapshot_number=$(sudo snapper -c root create --description pre-update-${timestamp} --type pre --cleanup number --print-number)
# Update the system
echo "--- Updating the system ---"
sudo dnf update -y