Skip to content

Instantly share code, notes, and snippets.

View schlomo's full-sized avatar

Schlomo Schapiro schlomo

View GitHub Profile
@schlomo
schlomo / demo3.ipxe
Last active October 27, 2015 04:51
iPXE Installation menu with several Linux Distributions and Live CDs
#!ipxe
menu Bitte waehlen Sie ein Betriebssystem zur Installation aus
item ubuntu Ubuntu installieren
item fedora Fedora installieren
item --gap
item back Zurueck zum Hauptmenue
choose --timeout 20000 --default back target && goto ${target} || goto menu
:ubuntu
set ubuntu http://archive.ubuntu.com/ubuntu/dists/trusty/main/installer-i386/current/images/netboot/ubuntu-installer/i386
@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 / 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 / avconcat.sh
Created January 15, 2014 20:32
Simple Video Tricks: Concatenate
#!/bin/bash
#
# concatenate several SOURCE_CONCAT_FILE_NAMES files into a mp4
# FIRST_NAME and second argument are file names or parts of a filename. All files inbetween will be concatenated.
START="$1" ; shift
END="$1" ; shift
COMMON_PREFIX=""
# find all input files
00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family DRAM Controller (rev 09)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
00:16.0 Communication controller: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 (rev 04)
00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (rev 04)
00:1a.0 USB controller: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 (rev b4)
00:1c.1 PCI bridge: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 2 (rev b4)
00:1c.2 PCI bridg

Keybase proof

I hereby claim:

  • I am schlomo on github.
  • I am schlomo (https://keybase.io/schlomo) on keybase.
  • I have a public key whose fingerprint is EAE2 A8B2 C84B 7F63 9914 C80E 6D97 452D AD64 9AF2

To claim this, I am signing this object:

@schlomo
schlomo / amazon-id.conf
Created September 10, 2014 15:34
Amazon ID plugin for YUM. This will add 2 headers to the HTTP requests. With these headers the YUM repo server can identify the EC2 instance. These files come from the rh-amazon-rhui-client RPM package found on RHEL EC2 instances, probably part of the Red Hat Update Infrastructure (https://access.redhat.com/products/red-hat-update-infrastructure/)…
[main]
enabled=1
@schlomo
schlomo / aws_mfa.sh
Created September 18, 2014 09:03
Helper Bash function to set up temporary AWS credentials for MFA protected accounts.
function aws_mfa {
if [[ -z "$AWS_ACCESS_KEY_ID" ]] ; then
echo "Please set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY"
return 1
fi
if [[ -z "$REAL_AWS_ACCESS_KEY_ID" ]] ; then
REAL_AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID
REAL_AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY
fi
@schlomo
schlomo / Vagrantfile
Created May 2, 2017 19:45
Vagrantfile to show the autorelabel bug with centos/7 Vagrant images. See https://github.com/rear/rear-workshop-osbconf-2016/issues/4 and https://bugs.centos.org/view.php?id=13213
# 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
@schlomo
schlomo / LICENSE.txt
Last active June 9, 2017 08:41
Simple daily cron job as Kubernetes container image. See http://blog.schlomo.schapiro.org/2017/06/using-kubernetes-with-multiple.html for details.
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