Skip to content

Instantly share code, notes, and snippets.

View yauh's full-sized avatar

Stephan Hochhaus yauh

View GitHub Profile
version: "3"
services:
uptime-kuma:
image: louislam/uptime-kuma:latest
container_name: uptime-kuma
environment:
- TZ=Europe/Berlin
ports:
- 3001:3001
network_mode: bridge
@yauh
yauh / whisper_vtt2transcript.py
Created January 22, 2023 13:33
This file takes a whisper generated VTT file and makes it compatible with loads of podcasts hosts out there
#!/usr/bin/env python3
import argparse
import re
def correct_timestamp(timestamp): # will return a timestamp with HH:MM:SS.sss
print("subroutine for " + timestamp)
timestamp_split = timestamp.split(":")
if len(timestamp_split) == 2:
timestamp_split.insert(0, "00")
@yauh
yauh / extract_rodecaster_polywav.sh
Created March 22, 2021 09:02
extract_rodecaster_polywav.sh
#!/bin/bash
# Rødecaster Pro Extraction Tool
# This script assumes all recording files for a podcast episode to be in the same directory as the script
# It then extracts all 14 single channels from the wav file and concatenates them
# Regardless of how many (split) recording wav files you have it will always produce 14 flac files
# sox must be available on the system http://sox.sourceforge.net
# Rødecaster Pro channel config
# adjust this if you have a different channel setup for your polywav files
@yauh
yauh / data-config.xml
Last active May 4, 2017 16:46
Making Solr import XML files
<dataConfig>
<dataSource name="fds" encoding="ISO-8859-1" type="FileDataSource"/>
<document>
<entity name="files"
dataSource="null"
rootEntity="false"
processor="FileListEntityProcessor"
baseDir="/tmp/provision/import"
fileName=".*\.xml"
@yauh
yauh / Vagrantfile
Created March 4, 2014 11:00
My vagrant setup for testing Yii apps with codeception
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# It's a wheezy box with 64bit 7.3 Debian
# full lamp stack, yii framework 1.1.14 and all required PHP/Pear modules for devs
@yauh
yauh / acceptance.suite.yml
Created March 19, 2014 13:12
My working configuration for running codeception acceptance test with coverage and Yii 1 framework
# Codeception Test Suite Configuration
# suite for acceptance tests.
# perform tests in browser using the Selenium-like tools.
# powered by Mink (http://mink.behat.org).
# (tip: that's what your customer will see).
# (tip: test your ajax and javascript by one of Mink drivers).
# RUN `build` COMMAND AFTER ADDING/REMOVING MODULES.
---
# file: group_vars/all
bootstrap_user: stephan # change this to your user account that manages the server
use_sudo: True
admin_email: mail@example.org
---
# file: hardening.yml
- hosts: all
sudo: "{{ use_sudo }}"
@yauh
yauh / gist:8595566
Created January 24, 2014 11:15
pear installation via ansible
- name: PEAR installing modules
command: pear install {{ item }}
register: pear_result
with_items:
- pear.netpirates.net/phpDox
- pear.symfony.com/Yaml
- pear.phpmd.org/PHP_PMD
changed_when: pear_result.stdout.find("already installed") == -1
results in errors like this:
@yauh
yauh / gist:8044583
Last active December 31, 2015 21:09
Try to explain what the first sub of https://gist.github.com/asciidisco/cb094eadfb4c590e2701 does
sub HMLAN_Initialize($) { # sub takes only one argument
my ($hash) = @_; # takes all arguments provided during the sub routine call and shoves them into $hash
require "$attr{global}{modpath}/FHEM/DevIo.pm"; # gets another perl module involved (need to check this for function definitions as well)
# Provider
$hash->{ReadFn} = "HMLAN_Read"; # basically assigns values to the attributes provided to the sub routine call
$hash->{WriteFn} = "HMLAN_Write";
$hash->{ReadyFn} = "HMLAN_Ready";
$hash->{SetFn} = "HMLAN_Set";
@yauh
yauh / update-commit-setting.sh
Created June 3, 2015 13:42
Update git commit count in settings.json
#!/bin/bash
# update-commit-setting.sh
# Usage: `update-commit-setting.sh [branch] [settings-file]`
BRANCH=${1:-'master'}
SETTINGS=${2:-'app/settings.json'}
BUILDNUMBER=$(expr $(git rev-list $BRANCH --count) - $(git rev-list HEAD..$BRANCH --count))
echo "Updating build number in $SETTINGS to $BUILDNUMBER using branch '$BRANCH'."
sed "s/\"git-commit-count\": [0-9]*/\"git-commit-count\": $BUILDNUMBER/g" $SETTINGS > tmp.json