Skip to content

Instantly share code, notes, and snippets.

View Weltraumschaf's full-sized avatar

Sven Strittmatter Weltraumschaf

View GitHub Profile
@Weltraumschaf
Weltraumschaf / convert.py
Created September 6, 2024 11:40
Convert DSOMM Generated Activities to Excel
import os
import sys
import yaml
from openpyxl import Workbook
# This script converts the given `generated.yaml` from DSOMM into an Excel file.
#
# Get the generated.yaml:
@Weltraumschaf
Weltraumschaf / jquey.crockford.js
Created July 17, 2022 15:50
This plugin provides some util functions and methods inspired by the book "JavaScript: The Good Parts" from Douglas Crockford.
/**
* This plugin provides some util functions and methods inspired
* by the book "JavaScript: The Good Parts" from Douglas Crockford
*
* @author Sven Strittmatter <[email protected]>
*/
(function($) { // pass in the jQuery object as $ (see end of file)
/**
* Adds a method to an Object. This method is used
* to augment the standard objects with some usefull
@Weltraumschaf
Weltraumschaf / tasks.yml
Last active January 15, 2022 08:55
Pi-hole unattended
- name: Install Git
apt:
name:
- git
state: latest
- name: Ensure there is a ~/src dir
file:
path: '$HOME/src'
state: directory
@Weltraumschaf
Weltraumschaf / gist:6d9f9acac4dcac0826ccfbca35e1243e
Created April 13, 2020 18:11 — forked from jessedearing/gist:2351836
Create self-signed SSL certificate for Nginx
#!/bin/bash
echo "Generating an SSL private key to sign your certificate..."
openssl genrsa -des3 -out myssl.key 1024
echo "Generating a Certificate Signing Request..."
openssl req -new -key myssl.key -out myssl.csr
echo "Removing passphrase from key (for nginx)..."
cp myssl.key myssl.key.org
openssl rsa -in myssl.key.org -out myssl.key

EDIT from 2019: Hi folks. I wrote this gist for myself and some friends, and it seems like it's gotten posted somewhere that's generated some (ahem, heated) discussion. The whitespace was correct when it was posted, and since then GitHub changed how it formats <pre> tags. Look at the raw text if you care about this. I'm sure someone could tell me how to fix it, but (thank you @anzdaddy for suggesting a formatting workaround) honestly this is a random throwaway gist from 2015, and someone more knowledgable about this comparison should just write a proper blog post about it. If you comment here I'll hopefully see it and stick a link to it up here. Cheers. @oconnor663

Here's the canonical TOML example from the TOML README, and a YAML version of the same. Which looks nicer?

title = "TOML Example"
 
@Weltraumschaf
Weltraumschaf / prepare-commit-msg
Created March 2, 2020 13:45 — forked from vsrc/prepare-commit-msg
Git pre commit hook for automatic adding branch name to commit message
#!/bin/bash
# This way you can customize which branches should be skipped when
# prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_NAME="${BRANCH_NAME##*/}"
@Weltraumschaf
Weltraumschaf / Vagrantfile
Created February 17, 2019 09:55
Create one master and two nodes with Debian to play around with Docker swarm mode.
# -*- mode: ruby -*-
# vi: set ft=ruby :
# https://manski.net/2016/09/vagrant-multi-machine-tutorial/
BOX_IMAGE = "bento/debian-9"
NODE_COUNT = 2
Vagrant.configure("2") do |config|
config.vm.define "master" do |subconfig|
\opening{Sehr geehrte Damen und Herren,}
...
Daher bitte ich um Auskunft darüber, ob Sie personenbezogene Daten über meine Person gespeichert haben. Sollte dies der Fall sein, bitte ich um Auskunft darüber,
\begin{itemize}
\item[a)] welche personenbezogenen Daten ganz konkret bei Ihnen verarbeitet werden (z.B. Name, Vorname, Anschrift, Geburtsdatum, Beruf, medizinische Befunde) sowie
\item[b)] zu welchem Zweck diese Daten verarbeitet werden.
\end{itemize}
@Weltraumschaf
Weltraumschaf / keybase.md
Created October 21, 2017 19:54
Keybase proof

Keybase proof

I hereby claim:

  • I am weltraumschaf on github.
  • I am weltraumschaf (https://keybase.io/weltraumschaf) on keybase.
  • I have a public key ASAzR0bB3DuKbByDvdBKlMPDVuyPkAtAURE0C6DOsL9NAAo

To claim this, I am signing this object:

@Weltraumschaf
Weltraumschaf / Spec.scala
Created January 23, 2017 13:07
My Spec Idea
package de.htwg.msi.set.model
import org.specs2.mutable._
class FieldSpec extends Specification {
"A new Field" should {
val field = new Field()
field.startUp()