Skip to content

Instantly share code, notes, and snippets.

View schlomo's full-sized avatar

Schlomo Schapiro schlomo

View GitHub Profile
@schlomo
schlomo / udp_stream_recorder.conf
Last active January 2, 2016 15:38
Simple Upstart Service to record incoming UDP streams into time-stamped files.
# Service definition for Upstart, put into /etc/init
description "Record TS stream from VGADVIRecorder"
start on started autofs
stop on stopping autofs
respawn
# who else will have access
umask 0000
@schlomo
schlomo / rsh_with_remote_exit_code.sh
Last active February 20, 2018 11:13
rsh wrapper that correctly returns the exit code of the remote command, just like ssh does. This wrapper installs itself as rsh and calls the real rsh. Written for Bash.
# This rsh wrapper supports reporting the exit code of the remote program.
# Assumes that remote shell is Bash or compatible and that you don't call
# exit directly (that would yield a return 127 regardless of the remote
# exit code!)
#
# Written by Schlomo Schapiro @ ImmobilienScout24
# Licensed under the GNU General Public License, see http://www.gnu.org/licenses/gpl.html for full text
#
function rsh {
local res=$(
@schlomo
schlomo / video_converter
Last active April 13, 2018 10:46
Convert videos to MP4 with HandBrake (http://handbrake.fr)
#!/bin/bash
#
# search for .m2ts, .mov, .mp4 files and convert them to .m4v files with HandBrake
# search in current dir or in files/folders given as args
if [[ "$*" == *--help* ]] ; then
cat <<EOF
Usage: $0 [path or file] ...
Convert all .m2ts, .mov, .mp4 videos in given paths or files
@schlomo
schlomo / ... SSH PKI Test Suite & Demo
Last active December 18, 2015 09:09
SSH PKI demo
Moved to https://github.com/schlomo/openssh-config-test
@schlomo
schlomo / DEB Repo Management
Last active March 12, 2018 17:19
Create and maintain a DEB repo with reprepro Support GPG signing and waiting for DropBox sync. Autoconfiguration from conf/distributions
Some scripts to help with DEB Repo Management.
See http://blog.schlomo.schapiro.org/2013/04/how-to-create-debianubuntu-repository.html for how to use this.