Skip to content

Instantly share code, notes, and snippets.

View fapestniegd's full-sized avatar

James S White fapestniegd

View GitHub Profile
#!/bin/bash
INFILE=$1
OUTFILE=$2
DEINTERLACE=""
#DEINTERLACE="-deinterlace"
usage(){
echo "$0 <infile> <outfile>"
exit 1;
}
################################################################################
# http://blog.kyri0s.org/post/1406637341/
# Freshly deployed Debian 5.0.7 (lenny) on a linode 512
################################################################################
sudo apt-get install -y build-essential subversion git-core yasm pkg-config \
libssl-dev libbz2-dev ruby rubygems sudo apache2
[ -d /opt/local/src/FFMPEG ] || mkdir -p /opt/local/src/FFMPEG
cd /opt/local/src/FFMPEG || exit -1
################################################################################
# http://blog.kyri0s.org/post/1406637341/
# Freshly deployed Debian 5.0.7 (lenny) on a linode 512
################################################################################
sudo apt-get install -y build-essential subversion git-core yasm pkg-config \
libssl-dev libbz2-dev ruby rubygems sudo apache2
[ -d /opt/local/src/FFMPEG ] || mkdir -p /opt/local/src/FFMPEG
cd /opt/local/src/FFMPEG || exit -1
apt-get build-dep -y ffmpeg
apt-get install -y ffmpeg libsdl1.2-dev libfaad-dev libfaad2 libconfig8-dev \
libavformat-dev libfaac-dev libmp3lame-dev libx264-dev \
ruby rubygems
git-clone git://github.com/carsonmcdonald/HTTP-Live-Video-Stream-Segmenter-and-Distributor.git segmenter
(cd segmenter; make)
a "grep require *" shows that http_streamer.rb requires the other .rb files,
apt-get build-dep -y ffmpeg
apt-get install -y ffmpeg libsdl1.2-dev libfaad-dev libfaad2 libconfig8-dev \
libavformat-dev libfaac-dev libmp3lame-dev libx264-dev \
ruby rubygems
git-clone git://github.com/carsonmcdonald/HTTP-Live-Video-Stream-Segmenter-and-Distributor.git segmenter
(cd segmenter; make)
a "grep require *" shows that http_streamer.rb requires the other .rb files,
Xab+Oh+j6knNzC4C8ZzlyloQG5kz05kOJxWzrl+CWIXCVK0gJQVckifoqe5iJ1pzlJ44z1MMGuzRqQrVaR/pSmuhzYG7Hjh4pRbbxQJ2vIqshK3mX4KGCSnd471vJfEpXjuUlVQqWaOa1FWaDSCHXpFG4OjloiTqEpFlFCsS+2LS2d7k4HFuMxD5PDwiyv78TrLqAi5PS4Ha5HZLOzYC+60Ao0wHnxeDcgd3gXEc2KYQJOO8gybyv1/vVYXqIZvQU8gXAlg9DN1/ZcJTmGmah9pmFia2yOh+E8H62yuVbux6d1IEnenniImBfQ2tFCyAdpA6ougqP5eEH7nI2wyA0w==
private function httpLogin()
{
$user = $_SERVER['REMOTE_USER'];
if(isset($_SERVER['AUTH_TYPE']) && !empty($user))
{
$record = $this->_db->query( 'SELECT id, admin FROM tor_passwd WHERE user = ?', $user );
if($record !== false)
{
$this->_session->id_user = $record['id'];
$this->_session->admin = !!$record['admin'];
$db = new PDOe('sqlite:' . $options['db_file'], null, null, array(PDO::ERRMODE_EXCEPTION));
if(is_object($db))
{
$db->modify('INSERT INTO tor_passwd VALUES(1, ?, ?, 1, \'\', 0)', $options['user'], md5($options['passwd']));
}
#!/usr/local/bin/perl
#
# We use /usr/local/bin/perl because cygwin installs in /usr/bin/perl and we want to
# use ActiveState Perl on Windows. As a result, we have to symlink all others
# links:
# !compiled_on_cygwin::
# /usr/local/bin/perl -> /usr/bin/perl type=symbolic
#
use strict;
# This is the LDAP module that makes all the dynamic stuff in cfengine work
#!/usr/bin/perl
use strict;
# This module simply defines where $cfroot is for update.conf
# If this module breaks, all of cfengine's git updates will not
# propigate. So keep this module simple, please.
package Cfengine::Root;
use Data::Dumper;
sub new{