Skip to content

Instantly share code, notes, and snippets.

View dnnsmnstrr's full-sized avatar
:shipit:

Dennis Muensterer dnnsmnstrr

:shipit:
View GitHub Profile
@dnnsmnstrr
dnnsmnstrr / wiki-table-scraper.js
Last active February 6, 2024 15:19
Wiki Table Scraper
(function() {
const table = document.querySelector('.wikitable'); // Adjust the selector if needed
if (!table) {
console.log('Table not found.');
return;
}
const rows = table.querySelectorAll('tr');
const data = Array.from(rows).slice(1).map(row => {
const cells = row.querySelectorAll('td');
{
"basics": {
"name": "Dennis Muensterer",
"label": "Developer",
"image": "https://avatars.githubusercontent.com/u/3686989?v=4",
"email": "dennismuensterer@gmail.com",
"url": "http://dnnsmnstrr.github.io",
"summary": "Dennis develops mobile and web applications. He is an alumni of the Apple Developer Academy in Naples, Italy.",
"location": {
"address": "",
@dnnsmnstrr
dnnsmnstrr / gitlabAPI.js
Created January 21, 2023 02:29
A scriptable module to interface with the gitlab api
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: blue; icon-glyph: magic;
/**
* Keychain key for GitLab url and personal access token.
*/
const GITLAB_ACCESS_TOKEN_KEY = "gitlab.widget.accessToken";
const GITLAB_URL_KEY = "gitlab.widget.url";
@dnnsmnstrr
dnnsmnstrr / projects.md
Last active July 3, 2023 20:05
Projects
@dnnsmnstrr
dnnsmnstrr / replaceEmoji.js
Last active April 23, 2023 12:49
A text formatter that replaces text with matching emoji
function format(text) {
const emojimap = {
"❤️": "love",
"😂": "laughing",
"😍": "awesome",
"👍": "great",
"😭": "crying",
"😊": "smiling",
"😘": "kiss",
"🔥": "fire",
@dnnsmnstrr
dnnsmnstrr / spotifyUri.js
Last active April 23, 2023 11:54
PastePal transform Spotify URL to URI
function transform(clip) {
const pathRegex = /^[a-z]+:\/\/[^:\/]+(:[0-9]+)?\/(.*?)(\/[0-9]+)?(\?.*)?$/
const uriPath = clip.text.replace(pathRegex, '$2');
const spotifyUri = "spotify:" + uriPath.replaceAll('/', ':')
return spotifyUri;
}
[
"Show us the weirdest thing you have in the room with you right now.",
"There is a free, round-trip shuttle to Mars. The catch: it will take one year of your life to go, visit, and come back. Are you in?",
"What is your least favorite thing about technology?",
"What superpower would you most want?",
"What food is best with cheese?",
"Would you go in the mother-ship with aliens if they landed on Earth tomorrow?",
"Would you join a community in space if it was permanent?",
"Would you rather live 100 years in the past or 100 years in the future?",
"You are the best criminal mastermind in the world. What crime would you commit if you knew you would get away with it?",
@dnnsmnstrr
dnnsmnstrr / applescript.md
Last active March 23, 2023 23:55
Applescripts

These are some of the applescripts i've used/made

@dnnsmnstrr
dnnsmnstrr / trashplan.js
Created March 11, 2023 14:03
Helper to figure out the schedule for who was responsible to bring out the trash in which week
const parties = [
'Herr Freitag',
'Frau Samstag',
'WG'
]
console.log(parties.length)
const START_WEEK = 6
@dnnsmnstrr
dnnsmnstrr / advent.js
Created March 11, 2023 13:29
Prototype code for advent calendar
const schema = {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://example.com/advent.json",
"title": "Advent Calendar",
"description": "A calendar for the Advent season",
"type": "object",
"properties": {
"title": {
"description": "The title of the calendar",
"type": "string"