Skip to content

Instantly share code, notes, and snippets.

View wmanth's full-sized avatar

Wolfram Manthey wmanth

  • Munich, Germany
View GitHub Profile
@wmanth
wmanth / docker-upload.sh
Last active March 20, 2021 15:42
Upload a docker image to a remote SSH server without publishing it on a docker registry
// upload a docker image to a remote SSH server without publishing it on a docker registry
docker save <IMAGE_NAME> | gzip -c | ssh <REMOTE_SERVER> "gunzip -c | docker load"
@wmanth
wmanth / docker-cleanup
Created August 12, 2019 14:22
Remove exited docker containers
#!/bin/sh
CONTAINERS=$(docker ps --all --quiet --filter status=exited)
if [ -z "$CONTAINERS" ]
then
echo Nothing to cleanup
else
echo Removing containers:
docker rm $CONTAINERS
fi
@wmanth
wmanth / subtitle.sh
Last active May 16, 2024 23:02
Using MP4Box to add subtitles in SRT format to MP4 files that will be supported by AppleTV
# Add English language subtitle to MP4 file
MP4Box -add <Subtitle>.srt:hdlr=sbtl:lang=eng <MovieWithoutSubtitle>.mp4 -out <MovieWithSubtitle>.mp4
# Add English language subtitle with 1sec time delay to MP4 file
MP4Box -add <Subtitle>.srt:hdlr=sbtl:lang=eng:delay=1000 <MovieWithoutSubtitle>.mp4 -out <MovieWithSubtitle>.mp4
@wmanth
wmanth / ICU-58.1-tvOS.makefile
Last active January 21, 2018 17:54
Makefile to build ICU 58.1 for tvOS
ROOT = ${PWD}
DIST_DIR = ${ROOT}/dist
BUILD_DIR = ${ROOT}/build2
HOST_DIR = ${BUILD_DIR}/host
TVOS_DIR = ${BUILD_DIR}/tvos
TVSIMULATOR_DIR = ${BUILD_DIR}/tvsimulator
LIBS = libicui18n.a libicuio.a libicuuc.a
TVOS_LIBS = $(addprefix ${TVOS_DIR}/,${LIBS})
TVSIMULATOR_LIBS = $(addprefix ${TVSIMULATOR_DIR}/,${LIBS})
DIST_LIBS = $(addprefix ${DIST_DIR}/,${LIBS})
@wmanth
wmanth / lldb_qt.py
Last active August 29, 2015 14:22
LLDB script to summarize Qt types in Xcode.
import lldb
def __lldb_init_module(debugger, internal_dict):
debugger.HandleCommand('type summary add QString -F lldb_qt.QString_summary')
debugger.HandleCommand('type summary add QUuid -F lldb_qt.QUuid_summary')
print 'lldb_qt.py has been loaded and is ready for use.'
def QString_summary(value, internal_dict):
name = value.GetName()
deref = '->' if value.TypeIsPointerType() else '.'
@wmanth
wmanth / mingw.sh
Last active December 16, 2015 09:29 — forked from henry0312/mingw.sh
#!/bin/sh
# 初期設定
WORK=$HOME/Builds/GCC
PREFIX=$HOME/mingw
export PATH="$HOME/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"
# ソースコードのダウンロード
if [ ! -d $WORK/src ] ; then
mkdir -p $WORK/src
@wmanth
wmanth / gpx2kml.xsl
Last active April 20, 2017 03:44
XSLT to transform geo data from GPX to KML.
<?xml version="1.0"?>
<!--
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:gpx="http://www.topografix.com/GPX/1/0">
-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:gpx="http://www.topografix.com/GPX/1/1">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" />
<xsl:template match="/">
<kml xmlns="http://www.opengis.net/kml/2.2"