Skip to content

Instantly share code, notes, and snippets.

View wiomoc's full-sized avatar
👓

Christoph Walcher wiomoc

👓
View GitHub Profile

Keybase proof

I hereby claim:

  • I am wiomoc on github.
  • I am wiomoc (https://keybase.io/wiomoc) on keybase.
  • I have a public key whose fingerprint is 4E90 18DA 9BDF 9036 B823 8E60 A83F FBC7 C907 0285

To claim this, I am signing this object:

@wiomoc
wiomoc / scriptel.py
Created October 18, 2022 20:51
Daily printout
# requires https://github.com/erikflowers/weather-icons/blob/master/font/weathericons-regular-webfont.ttf saved as weathericons.ttf along the project
import datetime
import json
import urllib.request
from collections import defaultdict
from PIL import ImageDraw, Image, ImageFont
# Weather
@wiomoc
wiomoc / request.js
Created February 8, 2022 14:46
AWS CloudFront Function for embedded Shopify Admin App
function handler(event) {
const { request } = event;
const { headers, querystring } = request;
const clientId = process.env.SHOPIFY_API_KEY;
const clientSecret = process.env.SHOPIFY_API_SECRET;
const scopes = process.env.SCOPES;
const shop = querystring["shop"];
if (!shop || !shop.value) {
from urllib import request
import json
import datetime
import base64
import sys
plan = json.load(request.urlopen("https://sws.maxmanager.xyz/extern/mensa_stuttgart-vaihingen.json"))
plan = plan['Mensa Stuttgart-Vaihingen']
#days = sorted(plan.items(), key=lambda item: item[0])
day = plan.get(datetime.date.today().isoformat())
@wiomoc
wiomoc / GemPuzzleView.swift
Last active June 10, 2021 19:25
GemPuzzle Screensaver for macOS Preview: https://imgur.com/a/s8mRh
//
// GemPuzzleView.swift
// GemPuzzle
//
// Created by Christoph Walcher on 12.01.18.
// Copyright © 2018 Christoph Walcher. All rights reserved.
//
import ScreenSaver
import Foundation
@wiomoc
wiomoc / cyber77.py
Last active December 21, 2020 23:52
code_matrix = [
[0x1c, 0xbd, 0x55, 0xe9, 0x55],
[0x1c, 0xbd, 0x1c, 0x55, 0xe9],
[0x55, 0xe9, 0xe9, 0xbd, 0xbd],
[0x55, 0xff, 0xff, 0x1c, 0x1c],
[0xff, 0xe9, 0x1c, 0xbd, 0xff]
]
sequences = [
[0x1c, 0x1c, 0x55],
[0X55, 0Xff, 0X1c],
@wiomoc
wiomoc / sketch.ino
Last active October 22, 2020 22:29
Sample Code using AWS IoT with an ESP32 for alerting
#include <WiFi.h>
#include <WiFiClientSecure.h>
#include <PubSubClient.h>
#include <DHT.h>
// Retrieve using aws iot describe-endpoint --endpoint-type iot:Data-ATS
#define ENDPOINT "....-ats.iot.---.amazonaws.com"
#define SSID "YOUR_SSID"
#define PSK "YOUR_PASSWORD"
@wiomoc
wiomoc / client.html
Created July 15, 2019 22:04
WebSocket Test
<script>
var ws = new WebSocket("ws://localhost:8080/");
ws.onmessage = function (event) {
console.log(event.data);
}
</script>
@wiomoc
wiomoc / polygo.py
Created July 24, 2017 18:52
Load the recent Polygo Mastercard transactions
#!/usr/bin/python
import argparse
import requests
import re
import string
import time
try:
from BeautifulSoup import BeautifulSoup
@wiomoc
wiomoc / LyricsExtractor.java
Last active December 3, 2016 15:05
Little program to read out lyrics from several different audioformats. mp3/ID3, aac/m4a/mp4, ogg/vorbis
package de.wiomoc.Lyrics;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.Array;
import java.math.BigDecimal;
import java.nio.charset.Charset;