Skip to content

Instantly share code, notes, and snippets.

View newbamboo's full-sized avatar

New Bamboo newbamboo

View GitHub Profile
# Copyright 2009 Michael Ivey, released to public domain
# Disqus guts lifted from http://github.com/squeejee/disqus-sinatra-importer/tree/master
# I wanted it to run from MySQL and command line, instead of a Sinatra app
require 'rubygems'
require 'rest_client'
require 'json'
require 'sequel'
disqus_url = 'http://disqus.com/api'
@newbamboo
newbamboo / s3_db_backup.rake
Created January 19, 2009 17:29
S3 database backup adapted for Merb
# S3 Backup Task for MySQL
# Assumes InnoDB tables
# Database User needs the "reload" permission on the database (for --flush-logs in mysqldump)
#
# Stores files in Amazon S3 using the excellent AWS Gem: http://amazon.rubyforge.org/
# For information about Amazon S3: http://aws.amazon.com/s3
#
# Installation
# 1) Install AWS Gem
# 2) Enter your S3 Bucket, access_key_id and secret_access_key in this file
(
cat <<'EOF'
nameserver 192.168.1.10
EOF
) > /etc/resolv.conf
echo "Setting up newbamboo user and home dir...."
echo "newbamboo:password:1000:1000:New Bamboo,,,:/home/newbamboo:/bin/bash" > /etc/newusers
newusers /etc/newusers
---
FFMPEG
---
Compile ffmpeg with h264 support (debian doesn't include it)
http://www.jbkempf.com/blog/post/2007/10/04/Build-vlc-under-a-fresh-sid
./configure --enable-libx264 --enable-gpl --enable-libfaad
--enable-libfaac --enable-swscaler --enable-pp --enable-libmp3lame
--enable-libamr-nb --enable-libamr-wb --enable-liba52
--enable-libtheora --enable-libvorbis --enable-libxvid
diff -Naur nginx_uploadprogress_module/ngx_http_uploadprogress_module.c nginx_uploadprogress_module_safari_fix/ngx_http_uploadprogress_module.c
--- nginx_uploadprogress_module/ngx_http_uploadprogress_module.c 2007-10-10 11:42:17.000000000 +0000
+++ nginx_uploadprogress_module_safari_fix/ngx_http_uploadprogress_module.c 2008-02-29 14:24:49.000000000 +0000
@@ -7,6 +7,7 @@
#include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_http.h>
+#include <ctype.h>
#define TIMER_FREQUENCY 15 * 1000