Skip to content

Instantly share code, notes, and snippets.

View markusfisch's full-sized avatar

Markus Fisch markusfisch

View GitHub Profile
@markusfisch
markusfisch / README.md
Last active September 25, 2020 18:06
Create a simple chart showing the development of the COVID-19 7 day incidence score in your city

7 day incidence development chart

A Python script that creates a simple chart showing the development of the COVID-19 7 day incidence in your city (or cities of interest).

Data is taken from [lgl.bayern.de][lgl] so it works only for cities in Bayern, Germany.

How to use

@markusfisch
markusfisch / README.md
Last active February 7, 2024 01:09
Render some Markdown file to HTML and show it in your browser

Preview Markdown files locally

Render some Markdown file to HTML and show it in your browser.

This is useful when you want to check a Markdown file before pushing it onto GitHub/GitLab/etc or if you want to simply print a nice looking Markdown file. Just print it from your browser.

The look is broadly similar to that on GitHub but stripped down to the bare minimum. It can also be changed easily. Just have a look at the

@markusfisch
markusfisch / README.md
Last active April 8, 2020 00:06
Play nethack while you wait for some process (like a looong build)

Play nethack while you wait for some process

Like a looong build.

Prerequisites

Obviousely you need to have nethack.

Less obviousely, you also need tmux because I use tmux. Sorry ;)

@markusfisch
markusfisch / README.md
Last active January 2, 2022 13:18
Make a collage in shape of 2019 of your best shots of the year

Year In Pictures

Take your best picture of this year, put them into a folder and run this script:

$ python3 yip.py PICTURE_FOLDER

You'll get a collage in shape of 2019 where the digits are made from your pictures:

Time Calculator

Quickly calculate when it's time to leave or when something will be over.

Because the calculation of clock times is a bit cumbersome. At least if it is not carried out regularly.

Examples

Here, I want to be somewhere at 19:30 and have three things to do that take

@markusfisch
markusfisch / README.md
Last active December 26, 2023 12:19
Explore a random snippet from five different popular open source projects like a dungeon in a roguelike

Guess the file

Explore a snippet of source code like a dungeon in a roguelike. Looks like this:

              e

@markusfisch
markusfisch / emojize-swift.sh
Last active December 16, 2017 16:41
Replace that boring variable names with funny emojis in your Swift code
#!/usr/bin/env bash
# Replace that boring variable names with funny emojis in your Swift code
#
# @param 1 - file to emojize
emojize() {
local FILE=$1
local EMOJI=(😀 😬 😁 😂 😃 😄 😅 😆 😇 😉 😊 🙂 🙃 😋 😌 😍 😘 😗 😙 😚 😜 😝 😛 🤑 🤓 😎 🤗 😏 😶 😐 😑 😒 🙄 🤔 😳 😞 😟 😠 😡 😔 😕 🙁 😣 😖 😫 😩 😤 😮 😱 😨 😰 😯 😦 😧 😢 😥 😪 😓 😭 😵 😲 🤐 😷 🤒 🤕 😴 💤 💩 😈 👿 👹 👺 💀 👻 👽 🤖 😺 😸 😹 😻 😼 😽 🙀 😿 😾 🙌 👏 👋 👍 👊 👌 💪 🙏 👆 👇 👈 👉 🖕 🤘 🖖 💅 👄 👅 👂 👃 👁 👀 👤 🗣 👶 👦 👧 👨 👩 👱 👴 👵 👲 👳 👮 👷 💂 🕵 🎅 👼 👸 👰 🚶 🏃 💃 👯 👫 👬 👭 🙇 💁 🙅 🙆 🙋 🙎 🙍 💇 💆 💑 💏 👪)
local EMOJI_LEN=${#EMOJI[@]}
local I=0
@markusfisch
markusfisch / smoke.glsl
Last active November 8, 2020 22:37
Wallpaper smoke shader; set in on Android with Shader Editor; for best performance run with 1/8 size
// from http://editor.thebookofshaders.com/?log=170202213311
#ifdef GL_FRAGMENT_PRECISION_HIGH
precision highp float;
#else
precision mediump float;
#endif
uniform vec2 resolution;
uniform float time;
uniform vec2 offset;
@markusfisch
markusfisch / center.sh
Last active January 20, 2017 14:16
Center input from stdin in terminal or return 1 if it doesn't fit
#!/usr/bin/env bash
# Print n blank lines
#
# @param 1 - number of blank lines to print (default 1)
blanks() {
local I
for (( I=${1:-1}; I--; ))
do
echo