Skip to content

Instantly share code, notes, and snippets.

View johanneswseitz's full-sized avatar

Johannes Seitz johanneswseitz

View GitHub Profile

Keybase proof

I hereby claim:

  • I am johanneswseitz on github.
  • I am jseitz (https://keybase.io/jseitz) on keybase.
  • I have a public key ASCOIIwVOXVHKr4HRZNuTd0SBuo9vk5pNUELxroV96tPbwo

To claim this, I am signing this object:

@johanneswseitz
johanneswseitz / convert-video-to-gif.sh
Created May 16, 2016 10:57
Convert Video to Gif file
#!/usr/bin/sh
set -euo pipefail
FS=$'\n\t'
mkdir tmp
mplayer -ao null "$1" -vo jpeg:outdir=tmp
convert tmp/* "$1.gif"
convert "$1.gif" -fuzz 5% -layers Optimize "$1.opt.gif"
rm -rf tmp
@johanneswseitz
johanneswseitz / VagrantRule.java
Created May 12, 2016 10:52
Junit Rule for running Vagrant VMs in JUnit Tests
import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.concurrent.TimeUnit;
import org.junit.rules.ExternalResource;
import de.db.flexfit.conditional.Condition;
import de.db.flexfit.conditional.Waiter;
@johanneswseitz
johanneswseitz / gist:94810bfafc786f3ec404
Last active February 15, 2017 15:36
Disable Adware installation for Mac Java 8u40+
sed -i "" 's/install.disable.sponsor.offers.*/install.disable.sponsor.offers=true/g' ~/Library/Application\ Support/Oracle/Java/Deployment/deployment.properties
defaults write ~/Library/Application\ Support/JREInstaller/ThirdParty SPONSORS -string "0"
<a class="twitter-timeline" href="https://twitter.com/hashtag/socrates14" data-widget-id="491131372468060160">#socrates14 Tweets</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
@johanneswseitz
johanneswseitz / bump_version.sh
Created March 7, 2013 10:06
Bumps the internal, technical version number of an iOS App, and creates and pushes a git tag with the new version number.
#!/bin/sh
agvtool next-version -all
NEW_VERSION=`agvtool what-version -terse`
MARKETING_VERSION=`agvtool what-marketing-version -terse1`
# Generate release notes by taking commit messages prefixed with TF: from git since last tag.
git log `git describe --tags --abbrev=0`..HEAD --format=%B | grep "^TF:" | sed 's/TF:/-/g' > whats-new.txt
git commit -am "Version bump to $NEW_VERSION"
git tag "$MARKETING_VERSION-build-$NEW_VERSION"
git push --tags origin master
@johanneswseitz
johanneswseitz / changelog.sh
Created February 1, 2013 16:24
Generates a Changelog from the tags in a Git repository
#!/bin/sh
PREVIOUS="HEAD"
for TAG in `git tag | grep "\d*.\d*-build-\d*" | sort -r | head`
do
echo "========================"
echo "Changes in $PREVIOUS"
echo "========================"
CHANGES=`git log $TAG..$PREVIOUS --format=%B | grep "^TF:" | sed 's/TF:/-/g'`
if [[ -z $CHANGES ]]
then
@johanneswseitz
johanneswseitz / fix-jenkins.sh
Created April 4, 2012 16:48
Change Jenkins User
#!/bin/bash
#Execute with curl -sL https://raw.github.com/gist/2303751/fix-jenkins.sh | sudo sh
PLIST_PATH=/Library/LaunchDaemons/org.jenkins-ci
JENKINS_HOME=/Users/Shared/Jenkins/Home
if [[ $EUID -ne 0 ]]; then
echo "Execute this script with sudo"
else
echo "Jenkins will run as" $SUDO_USER
@johanneswseitz
johanneswseitz / hack.sh
Last active October 2, 2015 14:47 — forked from erikh/hack.sh
Configure OS X
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2262136/hack.sh | sh
#
@johanneswseitz
johanneswseitz / about.md
Created August 9, 2011 14:17 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer