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
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 |
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
--- | |
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 |
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
( | |
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 | |
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
# 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 |
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
# 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' |
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
articles = Article.find(:all) | |
articles.each do |article| | |
published_at = "#{published_at.year}-#{published_at.month}-#{published_at.day}" | |
author = article.user.login | |
permalink = article.permalink | |
title = article.title | |
excerpt = article.excerpt | |
body = article.body | |
fp = File.open("_posts/#{'draft-' if article.published_at.nil?}#{published_at}-#{permalink}.markdown", 'w') |
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
require 'rubygems' | |
require 'open-uri' | |
require 'hpricot' | |
links = [] | |
(1..12).each do |page| | |
offset = (page * 10) - 10 | |
url = "http://www.google.com/search?hl=en&client=safari&rls=en-us&q=site:blog.new-bamboo.co.uk&start=#{offset}&sa=N" | |
document = Hpricot(open(url)) |
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
set :user, "deploy" | |
set :deploy_to, "/usr/local/www/nb_blog_jekyll" | |
set :jekyll_command, "/usr/local/jekyll/bin/jekyll --lsi" | |
role :web, "blog.new-bamboo.co.uk" | |
task :deploy do | |
run "cd #{deploy_to}; git pull; #{jekyll_command}; exit 0" | |
end |
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
server { | |
listen 80; | |
server_name blog.new-bamboo.co.uk; | |
client_max_body_size 10M; | |
root /usr/local/www/nb_blog_jekyll/_site; | |
rewrite ^/archives/.* /archive permanent; | |
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
--- | |
layout: default | |
title: Ruby on Rails development | |
--- | |
{% for post in site.latest_posts %} | |
<div class="entry"> | |
<div class="entrytitle"> | |
<h2><a href="{{ post.url }}">{{ post.title }}</a> <span class="author">{{ post.author }}</span></h2> | |
<h3>{{ post.date | date_to_string }} | <a href="{{ post.url }}#disqus_thread" class="commentslink">View comments</a></h3> |
OlderNewer