This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require "streamio-ffmpeg" | |
class Video | |
def initialize(f="", outf="./", at=[20, 50, 80]) | |
@video=FFMPEG::Movie.new(f) | |
@at=at.map { |x| (@video.duration*x/100).to_i} | |
$stderr.puts "Video #{f} (#{@video.duration} secs) - Screenshots at #{@at.inspect}" | |
@outf=outf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#Patch bash for CVE-2014-6271 - For non-lts distro versions. | |
mkdir -p /usr/local/src && cd /usr/local/src | |
wget http://ftp.gnu.org/gnu/bash/bash-4.3.tar.gz | |
tar zxvf bash-4.3.tar.gz | |
#Get patches | |
for i in $(seq -f "%03g" 0 25); do wget http://ftp.gnu.org/gnu/bash/bash-4.3-patches/bash43-$i; done | |
cd bash-4.3 | |
for i in $(seq -f "%03g" 0 25);do patch -p0 < ../bash43-$i; done | |
./configure && make && make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/dash | |
export DEBDIR="/tmp/bashdebs" | |
[ -d $DEBDIR ] && rm -fr $DEBDIR | |
rm -f /tmp/bashdebs.tgz | |
cd /tmp/ && wget --quiet http://s3.amazonaws.com/com.versal.sysops/shellsock/bashdebs.tgz && tar zxvf bashdebs.tgz | |
cd $DEBDIR && sudo /usr/bin/dpkg -i *.deb 2>&1 1>/dev/null | |
#Test after update | |
bashver=`/usr/bin/dpkg -l bash | tail -1 | awk '{print $3}'` | |
echo "Host `hostname`, post update, with Bash $bashver" | |
rm -f echo && env -i X='() { (a)=>\' bash -c 'echo id'; cat echo |
OlderNewer