Skip to content

Instantly share code, notes, and snippets.

View ingorichter's full-sized avatar

Ingo Richter ingorichter

View GitHub Profile
@ingorichter
ingorichter / script-template.sh
Created January 4, 2021 15:39 — forked from m-radzikowski/script-template.sh
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
@ingorichter
ingorichter / listAllProjectsWithPerforceSCM.groovy
Created July 26, 2011 05:45
groovy cli script to display all jobs with a perforce scm configuration
def jobs = hudson.model.Hudson.instance.items
jobs.each { job ->
def scm = job.scm
if (scm.class.name == 'hudson.plugins.perforce.PerforceSCM') {
println "Job '${job.name}' uses the following perforce configuration"
println '-' * 80
println "P4Port: ${scm.getP4Port()}"
println "P4Client: ${scm.getP4Client()}"
println "P4User: ${scm.getP4User()}"

Keybase proof

I hereby claim:

  • I am ingorichter on github.
  • I am ingorichter (https://keybase.io/ingorichter) on keybase.
  • I have a public key ASA96HzC-n-VzOhme4q21L5CoU6QGrU1bJ-u1QPxDud1qAo

To claim this, I am signing this object:

@ingorichter
ingorichter / extractbusinesslocationjson.sh
Created June 3, 2018 19:11
Extract business location JSON from impossiblefoods.js
curl https://www.impossiblefoods.com/scripts/main.js | tr '\n' '\a' | grep -o "e.exports=\[{geometry:.*\"}}]},{}\]," | sed "s/e.exports=//" | sed "s/},{}],//" | sed "s/\([a-zA-Z]*\):/\"\1\":/g" | sed "s/\"\"https\"/\"https/g" | sed "s/\"ext\":/ext:/" | sed "s/\"coordinates\":\[,\]/\"coordinates\":\[0,0\]/g" | tr -d '\a' > result.js
ffmpeg -i https://host/playlist.m3u8 -c copy -bsf:a aac_adtstoasc OUTPUT-FILE-NAME.mp4
#!/bin/sh
JAVA_OPTS=-Xmx256m
OSX_OPTIONS=-Xdock:name="MediathekView" -Xdock:icon=info/MediathekView.png -Dapple.laf.useScreenMenuBar=true
dir=`dirname "$0"`
cd "$dir"
if [ -n "$JAVA_HOME" ]; then
$JAVA_HOME/bin/java ${JAVA_OPTS} -jar ./MediathekView.jar $*
@ingorichter
ingorichter / preinstall.sh
Last active December 20, 2015 18:59
shell script checks if the dependencies are already installed. Only if there is something missing, the install gets triggered. This scripts get called on the build machine, but there is nobody to provide the password to sudo. For this reason I run this script manually to setup the build machine with all required dependencies. During the automati…
#!/bin/bash
if [ `uname` == "Linux" ]; then
# Linux only: install development dependencies
pkgs=('libnss3-1d' 'libnspr4-0d' 'gyp' 'libgtk2.0-dev')
pkgs_to_install=()
for pkg in ${pkgs[@]}; do
dpkg-query -s ${pkg} > /dev/null
if [ $? -ne 0 ]; then
@ingorichter
ingorichter / gist:1895655
Created February 23, 2012 23:18
brew install libplist fails
==> Downloading http://cgit.sukimashita.com/libplist.git/snapshot/libplist-1.8.tar.bz2
File already downloaded in /Users/irichter/Library/Caches/Homebrew
/usr/bin/tar xf /Users/irichter/Library/Caches/Homebrew/libplist-1.8.tar.bz2
==> Patching
/usr/bin/patch -f -p1 -i 001-homebrew.diff
patching file libcnary/node.c
patching file src/base64.c
==> cmake -DCMAKE_INSTALL_PREFIX='/usr/local/Cellar/libplist/1.8' -DCMAKE_BUILD_TYPE=None -Wno-dev -DCMAKE_INSTALL_NAME_DIR=/usr/local/Cellar/libplist/1.8/lib .
cmake -DCMAKE_INSTALL_PREFIX='/usr/local/Cellar/libplist/1.8' -DCMAKE_BUILD_TYPE=None -Wno-dev -DCMAKE_INSTALL_NAME_DIR=/usr/local/Cellar/libplist/1.8/lib .
-- The C compiler identification is GNU
@ingorichter
ingorichter / designer.html
Created November 18, 2014 21:28
designer
<link rel="import" href="../paper-toast/paper-toast.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-item/core-item.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
@ingorichter
ingorichter / result-integration.xml
Created May 11, 2014 00:22
Brackets Integration Test Suite Results Linux
<?xml version="1.0" encoding="UTF-8" ?>
<testsuites>
<testsuite name="StringMatch" errors="0" tests="0" failures="0" time="0" timestamp="2014-05-08T12:35:43">
</testsuite>
<testsuite name="StringMatch _generateMatchList" errors="0" tests="6" failures="0" time="0" timestamp="2014-05-08T12:35:43">
undefined
undefined
undefined
undefined
undefined