Skip to content

Instantly share code, notes, and snippets.

Schlomo Schapiro schlomo

Block or report user

Report or block schlomo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@schlomo
schlomo / autoexec.py
Created May 15, 2014
XBMC automatically play all videos in a permanent loop. Ideal for video presentations, digital signage or party mode.
View autoexec.py
# See also http://wiki.xbmc.org/index.php?title=Autoexec.py
# Put this into the userdata folder, see http://wiki.xbmc.org/index.php?title=Userdata for details where this is for each platform
import xbmc
xbmc.executebuiltin('xbmc.PlayMedia("/storage/videos/","isdir")')
xbmc.executebuiltin('xbmc.PlayerControl(repeatall)')
xbmc.executebuiltin("Action(Fullscreen)")
View test.html
<html>
<body>
<p>hello world</p>
</body>
</html>
<!-- licensed under the MIT -->
@schlomo
schlomo / aws-assume-role.sh
Last active May 29, 2018
Understanding AWS IAM Roles and useful scripts to assume a role. See http://blog.schlomo.schapiro.org/2017/06/understanding-iam-roles-in-amazon-aws.html for details.
View aws-assume-role.sh
#!/bin/bash -ue
die() { echo 1>&2 "ERROR: $*" ; exit 1 ; }
info() { echo 1>&2 "INFO: $*" ; }
test "${1:-}" || die "Usage: $0 <role-name | role ARN> [<role-name | role ARN> ...]"
while test "${1:-}" ; do
role="$1"
shift
@schlomo
schlomo / video_converter
Last active Apr 13, 2018
Convert videos to MP4 with HandBrake (http://handbrake.fr)
View video_converter
#!/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 / deployment.yaml
Last active Mar 22, 2018
Files for demo of Kubernetes: Shifting the mindset from servers to containers talk
View deployment.yaml
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
annotations:
labels:
app: webdav
name: webdav
spec:
replicas: 1
revisionHistoryLimit: 0
@schlomo
schlomo / DEB Repo Management
Last active Mar 12, 2018
Create and maintain a DEB repo with reprepro Support GPG signing and waiting for DropBox sync. Autoconfiguration from conf/distributions
View DEB Repo Management
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.
@schlomo
schlomo / rsh_with_remote_exit_code.sh
Last active Feb 20, 2018
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.
View rsh_with_remote_exit_code.sh
# 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 / ...README.md
Last active Jul 21, 2017
Demo for UI testing with selenium based on Zalenium, see http://blog.schlomo.schapiro.org/2017/07/web-ui-testing-made-easy-with-zalenium.html for details
View ...README.md
@schlomo
schlomo / LICENSE.txt
Last active Jun 9, 2017
Simple daily cron job as Kubernetes container image. See http://blog.schlomo.schapiro.org/2017/06/using-kubernetes-with-multiple.html for details.
View LICENSE.txt
Copyright 2017 Schlomo Schapiro / Zalando SE
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE O
View Vagrantfile
# BUG proof for VirtualBox vagrant with centos/7 failing to run autorelabel
#
# before starting install the reload plugin with: vagrant plugin install vagrant-reload
#
# see the bug: vagrant up
# destroy VM: vagrant destroy -f
# see the fix (disable serial console): FIX=1 vagrant up
#
# destroy VM: vagrant destroy -f
You can’t perform that action at this time.