Skip to content

Instantly share code, notes, and snippets.

Avatar

Tobias Preuss johnjohndoe

View GitHub Profile
@johnjohndoe
johnjohndoe / shuffle-keys.py
Created March 8, 2023 10:07
This script enables/disables the public/private keys for work and hobby.
View shuffle-keys.py
#!/bin/python3
#
# This script enables/disables the public/private keys for work and hobby.
import os
ACTIVATED_PRI = "/home/USERNAME/.ssh/id_ed25519"
ACTIVATED_PUB = "/home/USERNAME/.ssh/id_ed25519.pub"
INACTIVE_HOBBY_PRI = "/home/USERNAME/.ssh/id_ed25519.HOBBY"
@johnjohndoe
johnjohndoe / most-changed.sh
Created March 7, 2023 15:52
Files in the Git history which change most often. https://engineering.ramp.com/what-matters-suffers
View most-changed.sh
git log --name-only --pretty=format: | sort | uniq -c | sort -nr | head -n 30
@johnjohndoe
johnjohndoe / build.gradle
Created October 28, 2022 07:24
Java version used by Gradle
View build.gradle
import org.gradle.internal.jvm.Jvm
println "Gradle uses Java ${Jvm.current()}"
// example output: Gradle uses Java 17.0.4.1 (JetBrains s.r.o. 17.0.4.1+0-17.0.4.1b469.62-9127311)
View device-art-generator.css
h4 {
text-transform: uppercase;
}
.device-list {
padding: 1em 0 0 0;
margin: 0;
}
.device-list li {
@johnjohndoe
johnjohndoe / republica-2021-session.json
Created May 7, 2021 09:56
Sessions dump of re:publica 2021
View republica-2021-session.json
[
{
"nid": "39546",
"title": "„Team Timster“: Medienwissen für Kinder und Erwachsene",
"langcode": "und",
"changed": "1619190145",
"status": "Accepted",
"short_thesis": "Die Mediennutzung von Kindern wandelt sich: Einige Eltern sehen die Digitalisierung mit großer Sorge, andere bringen Medien kreativ in den Familienalltag ein. „Team Timster“ ist das Medienmagazin von KiKA, rbb und NDR. Im Gespräch blicken Soraya Jamal, Tim Gailus (Moderation „Team Timster“), Steffi Warnatzsch-Abra, Robin Blase und Inka Kiwit (Redaktion „Team Timster“) auf die Herausforderungen von medienpädagogischer Bildungsarbeit, aktuelle Themen und Fragen.",
"description": "<p>Die Mediennutzung von Kindern wandelt sich fundamental: Einige Eltern sehen die Digitalisierung im Kinderzimmer mit großer Sorge, andere bringen Medien kreativ und fördernd in den Familienalltag ein.</p>\r\n\r\n<p>„Team Timster“ ist das plattformübergreifende Medienmagazin von KiKA, rbb und NDR. Gemeinsam mit Grundschüler*innen entdecke
@johnjohndoe
johnjohndoe / ffmpeg-scale-video.md
Created January 14, 2021 22:09
Resize / scale a video with FFmpeg
View ffmpeg-scale-video.md

Resize / scale a video with FFmpeg

  • Scale the input.mp4 to a height of 600px.
  • Let FFmpeg choose a number which is divisible by 2 to avoid the not divisible by 2 error.
ffmpeg -i input.mp4 -vf scale=-2:600,setsar=1:1 ouput.mp4

Related

@johnjohndoe
johnjohndoe / Rezept-Rosenkohl-in-Schmandsoße.md
Created December 20, 2020 23:57
Rezept: Rosenkohl in Schmandsoße
View Rezept-Rosenkohl-in-Schmandsoße.md

Rezept: Rosenkohl in Schmandsoße

Zutaten

  • Rosenkohl
  • 1 kleine Zwiebel
  • 100g Schinkenspeck
  • 1/2 halber oder ganzer Becher Schmand (je nachdem, wie viel Soße man möchte)
  • gefrorene Kräutern
  • Salz, Pfeffer
@johnjohndoe
johnjohndoe / FindMatchesAction.groovy
Created July 6, 2020 12:57 — forked from jbarr21/FindMatchesAction.groovy
IntelliJ plugin to perform multiple structural search and replace actions. Can be installed with https://github.com/dkandalov/live-plugin
View FindMatchesAction.groovy
import com.intellij.openapi.actionSystem.*
import com.intellij.openapi.application.*
import com.intellij.openapi.command.*
import com.intellij.openapi.diagnostic.*
import com.intellij.openapi.fileTypes.*
import com.intellij.openapi.progress.*
import com.intellij.openapi.project.*
import com.intellij.openapi.ui.*
import com.intellij.openapi.vfs.*
import com.intellij.psi.*
@johnjohndoe
johnjohndoe / how-to-irssi.md
Created March 31, 2020 21:29
irssi installed via snap, see https://snapcraft.io/irssi
View how-to-irssi.md

Installation location

$ /snap/irssi/current/bin/irssi

Configuration file

$ /home/USERNAME/snap/irssi/common/.irssi/config
@johnjohndoe
johnjohndoe / README.md
Last active March 7, 2020 13:50 — forked from Wikinaut/README.md
Vereinfachte Verkehrsordnungswidrigkeitenanzeige bei Halt- und Parkverstößen per E-Mail an die Bußgeldstelle. https://twitter.com/tbsprs/status/1236287577981964289
View README.md