<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>escapegoat.org - Home</title>
  <id>tag:escapegoat.org,2011:mephisto/</id>
  <generator uri="http://mephistoblog.com" version="0.7.3">Mephisto Noh-Varr</generator>
  <link href="http://escapegoat.org/feed/atom.xml" rel="self" type="application/atom+xml"/>
  <link href="http://escapegoat.org/" rel="alternate" type="text/html"/>
  <updated>2011-01-20T16:39:02Z</updated>
  <entry xml:base="http://escapegoat.org/">
    <author>
      <name>yossarian</name>
    </author>
    <id>tag:escapegoat.org,2010-12-14:102</id>
    <published>2010-12-14T01:00:00Z</published>
    <updated>2011-01-20T16:39:02Z</updated>
    <link href="http://escapegoat.org/2010/12/14/quick-video-test" rel="alternate" type="text/html"/>
    <title>Quick video test</title>
<content type="html">
            &lt;p&gt;Hyperactive now sports video embeds, thanks to JimDog.  Good work, boyo!&lt;/p&gt;


&amp;lt;object name=&quot;single1&quot; id=&quot;single1&quot; height=&quot;300&quot; classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot; width=&quot;450&quot;&gt;&amp;lt;param name=&quot;movie&quot; value=&quot;https://london.indymedia.org/flash/mediaplayer.swf&quot;&gt;&amp;lt;param name=&quot;allowfullscreen&quot; value=&quot;true&quot;&gt;&amp;lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&amp;lt;param name=&quot;wmode&quot; value=&quot;transparent&quot;&gt;&amp;lt;param name=&quot;flashvars&quot; value=&quot;https://london.indymedia.org/system/video/2011/01/19/6983/piccadilly4pm.ogv.flv&quot;&gt;&amp;lt;embed name=&quot;single2&quot; allowfullscreen=&quot;true&quot; src=&quot;https://london.indymedia.org/flash/mediaplayer.swf&quot; id=&quot;single2&quot; wmode=&quot;transparent&quot; allowscriptaccess=&quot;always&quot; type=&quot;application/x-shockwave-flash&quot; height=&quot;300&quot; flashvars=&quot;file=https://london.indymedia.org/system/video/2011/01/19/6983/piccadilly4pm.ogv.flv&#38;image=https://london.indymedia.org/system/video/2011/01/19/6983/piccadilly4pm.ogv.jpg&quot; bgcolor=&quot;undefined&quot; width=&quot;450&quot; /&gt;&amp;lt;/object&gt;&lt;p&gt;&lt;a href=&quot;https://london.indymedia.org&quot;&gt;See this video and more at Indymedia London&lt;/a&gt;&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://escapegoat.org/">
    <author>
      <name>mish</name>
    </author>
    <id>tag:escapegoat.org,2009-05-20:34</id>
    <published>2009-05-20T11:15:00Z</published>
    <updated>2010-12-14T01:00:21Z</updated>
    <link href="http://escapegoat.org/2009/5/20/git-gitweb-gitosis-and-git-daemon-in-harmony-on-debian" rel="alternate" type="text/html"/>
    <title>Git, gitweb, gitosis and git-daemon in harmony on Debian</title>
<content type="html">
            &lt;p&gt;After a bit of mucking around, we've got a shared git repository going on escapegoat.org with read only access over http and git, and commit access using git (without having to make shell accounts. Oh and there is a nice browsable version of the repository aswell.&lt;/p&gt;

&lt;h2&gt;Installing Packages&lt;/h2&gt;

&lt;p&gt;Debian provides most of the packages for you, so start off with:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo apt-get install git-core gitweb git-daemon-run gitosis
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;Debian Etch&lt;/h3&gt;

&lt;p&gt;Gitosis requires a version of git &gt;= 1.5, however the version in etch is 1.4.x. So we need to enable the backports repository. So add this line to your /etc/apt/sources.list (if it is not there already):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;deb http://www.backports.org/debian etch-backports main contrib non-free
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Then we need to update, remove a package that doesn't like to be upgraded, and install the required packages from backports:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo apt-get update
sudo apt-get remove python-setuptools
sudo apt-get install -t etch-backports python-setuptools git-core gitweb \
      gitosis git-daemon-run
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;gitosis - allowing commits without shell accounts&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;Note a lot of this is cribbed from &lt;a href=&quot;http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way&quot;&gt;this blog post about gitosis&lt;/a&gt; - see that for more detailed discussion.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;So let's start by adding a user account to hold the repositories.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo adduser \
    --system \
    --shell /bin/sh \
    --gecos 'git version control' \
    --group \
    --disabled-password \
    --home /home/git \
    git
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You may change the home path to suit your taste (the git-daemon-run package assumes a home of /var/cache/git, but I ended up changing the git-daemon-run params to fit with gitosis). A successful user creation will look similar to:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Adding system user 'git'...
Adding new group 'git' (211).
Adding new user 'git' (211) with group 'git'.
Creating home directory '/home/git'.
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Then you need to copy your ssh public key to your server to add yourself as the first user. (See the above blog post for some help if you don't know how to). So if you copy your ssh key to the /tmp/ directory, you can run the following command to set up gitosis:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo -H -u git gitosis-init &amp;lt; /tmp/id_rsa.pub
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Success looks like:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Initialized empty Git repository in ./
Initialized empty Git repository in ./
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;(Yes, two times)&lt;/p&gt;

&lt;p&gt;For good measure, let's make sure the post-update hook is set executable. It doesn't always get set (problem with older setuptools):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo chmod 755 /home/git/repositories/gitosis-admin.git/hooks/post-update
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Here some cool magic happens. Run this on your local machine:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;git clone git@YOUR_SERVER_HOSTNAME:gitosis-admin.git
cd gitosis-admin
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You will now have a gitosis.conf file and keydir/ directory:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;~/dev/gitosis-admin (master) $ ls -l
total 8
-rw-r--r--   1 garry  garry  104 Nov 13 05:43 gitosis.conf
drwxr-xr-x   3 garry  garry  102 Nov 13 05:43 keydir/
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This repository that you just cloned contains all the files (right now, only 2) needed to create repositories for your projects, add new users, and defined access rights. Edit the settings as you wish, commit, and push. Once pushed, gitosis will immediately make your changes take effect on the server. So we're using Git to host the configuration file and keys that in turn define how our Git hosting behaves. That's just plain cool.&lt;/p&gt;

&lt;p&gt;At this point you may aswell carry on reading the &lt;a href=&quot;http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way&quot;&gt;excellent blog post&lt;/a&gt; I've copied from a bit already. If you read &quot;Creating new repositories&quot; and &quot;Adding users&quot; there and then come back.&lt;/p&gt;

&lt;h3&gt;Final gitosis set up&lt;/h3&gt;

&lt;p&gt;Gitosis can help you work well with gitweb and git-daemon if you add the right bits to the gitosis.conf file. git-daemon can be helped by gitosis automaticaly adding the 'git-daemon-export-ok' file in the repositories. gitweb can also be helped, and you can add an owner and description (which gitweb will show) in the gitosis.conf file. So here is a sample file:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;[gitosis]
gitweb = yes
daemon = yes

[group gitosis-admin]
writable = gitosis-admin
members = user1@computer1 user2@computer2

[repo gitosis-admin]
gitweb = no
daemon = no

[group hyper-team]
writable = hyperactive
members = user1@computer1 user2@computer2

[repo hyperactive]
owner = escapegoat
description = A community news and reporting system
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;So this configuration allows gitweb and git daemon to access all repositories by default, though we have turned it off in the gitosis-admin repository. And we have a put a description and owner into the hyperactive section.&lt;/p&gt;

&lt;h2&gt;Allowing read only access using git-daemon&lt;/h2&gt;

&lt;p&gt;git-daemon is installed from the repositories and will run automatically, however it expects the repositories to be in /var/cache/git. I changed this by editing the file /etc/service/git-daemon/run to be&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;#!/bin/sh
exec 2&amp;gt;&amp;amp;1
echo 'git-daemon starting.'
#exec git-daemon --verbose --base-path=/var/cache /var/cache/git
exec git-daemon --base-path=/home/git/repositories/ --export-all
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;After this change, and a &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo /etc/init.d/git-daemon restart
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I was able to download the repository by doing:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;git clone git://git.escapegoat.org/hyperactive.git
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Allowing read only access over http&lt;/h2&gt;

&lt;p&gt;To allow access over the web, ie&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;git clone http://git.escapegoat.org/git/hyperactive.git
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;we did&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo mkdir /var/www/git.escapegoat.org/git/
sudo ln -s /home/git/repositories/hyperactive.git /var/www/git.escapegoat.org/git/
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now apache needs to be able to read the repository, and so we added the www-data user to the git group. To do this, you need to find out what groups www-data is in already and then update the list of groups. So the commands we used were:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;groups www-data
sudo usermod -G www-data,svnowner,git www-data
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Make sure you add any other groups www-data is already in to the list, and remove svnowner if you don't have that group. You may also need to do&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;cd /home/git/repositories/hyperactive.git
sudo git-update-server-info
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;after each checkin, but this should be done by /home/git/repositories/hyperactive.git/hooks/post-update. If not then make sure it is executable by&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo chmod 755 /home/git/repositories/hyperactive.git/hooks/post-update
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;A user should now be able to do&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;git clone http://git.escapegoat.org/git/hyperactive.git
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Browsing the repository using gitweb&lt;/h2&gt;

&lt;p&gt;gitweb is installed, and may work out of the box with a simple webserver set up, but we have several virtual hosts. So to put the gitweb.cgi file in the path we did&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo ln -s /usr/lib/cgi-bin /var/www/git.escapegoat.org/gitweb
sudo cp /usr/share/gitweb/* /var/www/git.escapegoat.org/
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;(The second line copies the css and images required to make gitweb look nice). We also need to link in the repository. (And do the second and third line below if gitosis has not done it for you already).&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo ln -s /home/git/repositories/hyperactive.git /var/cache/git/hyperactive
sudo touch /home/git/repositories/hyperactive.git/git-daemon-export-ok
sudo chown git:git /home/git/repositories/hyperactive.git/git-daemon-export-ok
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And then it all seemed to work like magic. Go see for yourself at &lt;a href=&quot;http://git.escapegoat.org/gitweb&quot;&gt;http://git.escapegoat.org/gitweb&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;Extra apache setup&lt;/h3&gt;

&lt;p&gt;For now I've done a little bit of extra stuff in the apache set up - specifically in /etc/apache2/sites-available/git.escapegoat.org&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# redirect the / to /gitweb/ 
    RedirectMatch ^/$ /gitweb/

ScriptAlias /gitweb /usr/lib/cgi-bin/gitweb.cgi
&amp;lt;Location /gitweb &amp;gt;
            Options +ExecCGI
&amp;lt;/Location&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;So if you go to &lt;a href=&quot;http://git.escapegoat.org/&quot;&gt;http://git.escapegoat.org/&lt;/a&gt; you will be redirected to &lt;a href=&quot;http://git.escapegoat.org/gitweb/&quot;&gt;http://git.escapegoat.org/gitweb/&lt;/a&gt; and be able to browse the repository in a nice way.&lt;/p&gt;

&lt;h2&gt;Sources&lt;/h2&gt;

&lt;p&gt;The two main articles I used were&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way&quot;&gt;http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way&lt;/a&gt; - this is a great guide to gitosis set up (for setting up a shared repository  that can be committed to over ssh without giving all committers shell accounts).&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.die-welt.net/index.php/blog/199/Notes_on_serving_Git_with_Debian&quot;&gt;http://www.die-welt.net/index.php/blog/199/Notes_on_serving_Git_with_Debian&lt;/a&gt; -  shows how to set up git, gitweb and git-daemon on Debian.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So I have taken those two guides and made them work together - standing on the shoulders of other bloggers ...&lt;/p&gt;

&lt;p&gt;Other useful articles include &lt;a href=&quot;https://we.riseup.net/debian/publishing-git-repositories&quot;&gt;this more DIY guide&lt;/a&gt; by the good folks at riseup.net.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://escapegoat.org/">
    <author>
      <name>yossarian</name>
    </author>
    <id>tag:escapegoat.org,2008-12-28:33</id>
    <published>2008-12-28T16:41:00Z</published>
    <updated>2008-12-28T16:56:41Z</updated>
    <category term="Ruby on Rails"/>
    <link href="http://escapegoat.org/2008/12/28/some-thoughts-on-software-design" rel="alternate" type="text/html"/>
    <title>Some thoughts on software design</title>
<content type="html">
            &lt;p&gt;We&#8217;re still hard at work on &lt;a href=&quot;http://projects.escapegoat.org/projects/show/hyperactive&quot;&gt;Hyperactive&lt;/a&gt;, a content management system for independent news production, and we&#8217;ve started to get a lot more people working on the software.  So, at this point it seems to make sense to lay out some software design guidelines. Since we&#8217;re building software with a non-corporate purpose, let&#8217;s think outside of the normal scope of corporate &#8220;agile&#8221; manifestos (&#8220;delivering more value to your client&#8221;) and take some design inspiration from a different sphere:  Soviet assault rifles.&lt;/p&gt;


	&lt;p&gt;Despite the rather poor reputation of Soviet technology these days, those guys had some stuff figured out when it came to design.  Consider the &lt;a href=&quot;http://en.wikipedia.org/wiki/AK-47&quot;&gt;AK-47&lt;/a&gt; assault rifle designed by Mikhail Kalashnikov.  It&#8217;s simple, and rugged.  It takes a beating, refusing to jam even when it&#8217;s been exposed to mud, dirt, or hasn&#8217;t been maintained properly.  The trigger guard is huge, so it can be fired even by gloved users in Arctic conditions.  It can be maintained, and even manufactured by, people with access to simple machine tools.&lt;/p&gt;


	&lt;p&gt;A news website and an assault rifle might seem like completely unrelated areas of systems design, but let&#8217;s think about users for a moment.  They&#8217;re trying to produce news, sometimes under stressful conditions.  Maybe they just got in off the street after getting tear-gassed.  Maybe they&#8217;re tired.  Maybe they&#8217;ve got 20 things to do and their boyfriend has just been arrested.  These people don&#8217;t want to screw around with anything too complicated.  They want something that works.&lt;/p&gt;


	&lt;p&gt;This also goes for another set of users: the people who install and maintain the software when it&#8217;s running on production servers.  The lower the number of software dependencies, and the less screwing around when it comes to installing, maintaining and upgrading the software, the better.&lt;/p&gt;


	&lt;p&gt;So, when you&#8217;re working on software, and you&#8217;re faced with a design choice, ask yourself the simple question:&lt;/p&gt;


	&lt;h2&gt;&#8220;What would &lt;a href=&quot;http://en.wikipedia.org/wiki/Mikhail_Kalashnikov&quot;&gt;Kalashnikov&lt;/a&gt; do?&#8221;&lt;/h2&gt;


	&lt;p&gt;&lt;img src=&quot;http://escapegoat.org/assets/2008/12/28/640px-AK-47.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://escapegoat.org/">
    <author>
      <name>yossarian</name>
    </author>
    <id>tag:escapegoat.org,2008-07-17:28</id>
    <published>2008-07-17T14:21:00Z</published>
    <updated>2010-08-31T09:40:10Z</updated>
    <link href="http://escapegoat.org/2008/7/17/installing-merb" rel="alternate" type="text/html"/>
    <title>Installing Merb</title>
<content type="html">
            &lt;p&gt;I took a crack at installing &lt;a href=&quot;http://merbivore.com&quot;&gt;Merb&lt;/a&gt; today, just to see how it works out.  It&#8217;s a very minimal Ruby framework which in my (admittedly not very scientific) testing appears to be a lot faster than Rails, especially under conditions of high concurrency.&lt;/p&gt;


	&lt;p&gt;To get it running, I followed the instructions at the &lt;a href=&quot;http://merb.4ninjas.org/&quot;&gt;Merb book&lt;/a&gt; which is currently a work in progress at http://4ninjas.org.  A quick tip:  due to a dependency on extlib 0.9.3, the sake edgy technique didn&#8217;t work for me at first.  I got it all running happily by doing the following.&lt;/p&gt;


	&lt;p&gt;First, install the Git source-code management tool and the Debian build tools if you don&#8217;t already have them:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;sudo apt-get install build-essential git-core&lt;/code&gt;&lt;/pre&gt;

&lt;pre&gt;&lt;code&gt;sudo gem install rack mongrel json erubis mime-types rspec hpricot mocha rubigen haml markaby mailfactory  english addressable templater&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Update: in the last few weeks gem dependencies have changed and you need to ensure you&#8217;ve got some specific versions available:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;sudo gem install ruby2ruby --version=1.1.8&lt;/code&gt;&lt;/pre&gt;

&lt;pre&gt;&lt;code&gt;sudo gem install ParseTree --version=2.1.1&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;You&#8217;ll also need to ensure that you&#8217;ve got the MySql headers available in order to build the datamapper MySql libraries.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;sudo apt-get install libmysqlclient15off libmysqlclient15-dev&lt;/code&gt;&lt;/pre&gt;

&lt;pre&gt;&lt;code&gt;git clone git://github.com/sam/extlib.git  
git clone git://github.com/sam/do.git

cd extlib
rake install ; cd ..
cd do
cd data_objects
rake install ; cd ..
cd do_mysql  # || do_postgres || do_sqlite3
rake install&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;For whatever reason, DataMapper 0.9.4 has a dependency on Merb-core 0.9.3, so you&#8217;ll need to install it and then proceed to build the newest DataMapper:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;sudo gem install merb-core

git clone git://github.com/sam/dm-core.git
git clone git://github.com/sam/dm-more.git

cd dm-core ; rake install ; cd ..
cd dm-more
rake install; cd ..&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;After that stuff, the&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;sudo gem install sake
sake -i 'http://edgy.4ninjas.org/edgy.sake'
sake edgy:install packages=&quot;merb-stack&quot;&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;commands worked just fine for me.&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;Bonus: install CouchDb, the wicked distributed database system which is currently an Apache incubator project.&lt;/strong&gt;&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;sudo apt-get install build-essential erlang libicu38 libicu-dev libmozjs-dev
wget http://www.apache.org/dist/incubator/couchdb/0.8.0-incubating/apache-couchdb-0.8.0-incubating.tar.gz
tar -xvzf apache-couchdb-0.8.0-incubating.tar.gz 
cd apache-couchdb-0.8.0-incubating/
./configure
make &#38;&#38; sudo make install
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;You can set up the CouchDb datastore as a service, with its own user, like this (thanks to &lt;a href=&quot;http://www.chetanmittal.com/2008/6/15/install-couchdb-on-ubuntu-hardy-heron-8-04&quot;&gt;these instructions&lt;/a&gt;, slightly modified to avoid the creation of a &#8220;couchdb&#8221; home directory):&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;sudo useradd couchdb
sudo mkdir -p /usr/local/var/lib/couchdb
sudo chown -R couchdb /usr/local/var/lib/couchdb
sudo mkdir -p /usr/local/var/log/couchdb
sudo chown -R couchdb /usr/local/var/log/couchdb
sudo mkdir -p /usr/local/var/run
sudo chown -R couchdb /usr/local/var/run

sudo cp /usr/local/etc/init.d/couchdb /etc/init.d/
sudo update-rc.d couchdb defaults
sudo /etc/init.d/couchdb start
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;After that, go to http://localhost:5984/_utils/index.html and you can administer your new distributed datastore. Of course, you could just ignore CouchDb and use Merb with a more &#8220;normal&#8221; database server like Mysql or Postgres.&lt;/p&gt;


	&lt;p&gt;If any of the version dependencies change again please leave a comment and I&#8217;ll update these instructions until Merb 0.9.4 is a little easier to get.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://escapegoat.org/">
    <author>
      <name>yossarian</name>
    </author>
    <id>tag:escapegoat.org,2008-07-13:27</id>
    <published>2008-07-13T12:25:00Z</published>
    <updated>2008-07-13T12:57:47Z</updated>
    <link href="http://escapegoat.org/2008/7/13/mod_rails-and-full-page-caching-with-a-custom-cache-location" rel="alternate" type="text/html"/>
    <title>Mod_rails and full page caching with a custom cache location</title>
<content type="html">
            &lt;p&gt;We&#8217;ve recently moved a couple of Hyperactive sites to run on &lt;a href=&quot;http://www.modrails.com/&quot;&gt;mod_rails&lt;/a&gt;, a recently released Apache module which allows much easier deployment of Rails sites which run on a single box.  Using it gives the nice happy glow that you get from using Apache&#8217;s &lt;span class=&quot;caps&quot;&gt;PHP&lt;/span&gt; module &#8211; dump your project code into a directory accessible by Apache and it executes.  This contrasts with the more complex process of setting up and maintaining a Mongrel cluster using mod_proxy_balancer (although that option still has a lot to recommend it, especially if you want to run a site across multiple servers in your data centre).&lt;/p&gt;


	&lt;p&gt;Everything works very well so far, but I did run into one problem.  If you&#8217;re using full page caching in Rails, mod_rails automatically finds your cache files and tells Apache to render them from disk instead of hitting the Rails stack if a cache for a given &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt;.  However, it only finds the cache files if they&#8217;re in the default location (RAILS_ROOT/public).  Personally I find the default location a bit messy, since the cache files get mixed in with all the other stuff in your /public directory &#8211; so I tend to put cache files at &lt;span class=&quot;caps&quot;&gt;RAILS&lt;/span&gt;_ROOT/public/system/cache to keep things clean.  &lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;&lt;code&gt;config.action_controller.page_cache_directory = RAILS_ROOT + &quot;/public/system/cache/&quot;&lt;/code&gt;&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;The trouble was that mod_rails didn&#8217;t pick up these cache files by default, so I went back to Apache rewrite rules.  I dumped in my old rewrite rules from my Mongrel configuration, and everything seemed to be working. Cached pages were served statically, due to this rewrite rule:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;# Rewrite to check for Rails cached page
RewriteRule ^([^.]+)$ /system/cache/$1.html [QSA]&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;I haven&#8217;t seen anyone else report this problem, but I had one bit of trouble.  My application obviously uses a &lt;span class=&quot;caps&quot;&gt;POST&lt;/span&gt; request rather than a &lt;span class=&quot;caps&quot;&gt;GET&lt;/span&gt; request to send an update to the server, but the route is otherwise the same. Attempting to edit a piece of content on the site resulted in Apache intercepting the call and just showing the content again, bypassing the &#8220;update&#8221; method call and making the site&#8217;s content impossible to edit.  I have no idea why this is the case with mod_rails but didn&#8217;t happen with Mongrel, but whatever &#8211; I&#8217;ve just added the following rewrite condition to my Apache configuration and it seems to work fine:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;# Rewrite to check for Rails cached page
RewriteCond %{THE_REQUEST} !^POST
RewriteRule ^([^.]+)$ /system/cache/$1.html [QSA]&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;This means that Apache won&#8217;t attempt to pull the file from the cache for any &lt;span class=&quot;caps&quot;&gt;POST&lt;/span&gt; requests (like updates), making it all work again.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://escapegoat.org/">
    <author>
      <name>yossarian</name>
    </author>
    <id>tag:escapegoat.org,2008-06-28:26</id>
    <published>2008-06-28T11:20:00Z</published>
    <updated>2008-06-28T11:27:03Z</updated>
    <category term="Ruby on Rails"/>
    <link href="http://escapegoat.org/2008/6/28/hyperactive-ssl-action-alerts" rel="alternate" type="text/html"/>
    <title>Hyperactive::SSL, Action Alerts</title>
<content type="html">
            &lt;p&gt;Things are moving along a bit more slowly than I&#8217;d like but still steadily.  The code is now nearly ready for a 0.1 release.  This week&#8217;s improvements include:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;The use of the &lt;span class=&quot;caps&quot;&gt;SSL&lt;/span&gt; Requirement plugin so that the login, admin area, and publishing functions of the site all require &lt;span class=&quot;caps&quot;&gt;SSL&lt;/span&gt;.  Attempts to use the site in a production situation without an &lt;span class=&quot;caps&quot;&gt;SSL&lt;/span&gt; cert will currently fail.  &lt;/li&gt;
		&lt;li&gt;There is now an &#8220;Action Alerts&#8221; content type which allows site administrators to publish short messages at the very top of the content on the front page (and exports a list of action alerts as &lt;span class=&quot;caps&quot;&gt;RSS&lt;/span&gt; too).  This can be used in a &#8220;breaking news&#8221; situation.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;There has been some talk of Twitter integration for the action alerts, I am still thinking about how to acheive that without making the site absolutely require Twitter or any other external commercial service.&lt;/p&gt;


	&lt;p&gt;When i&#8217;ve gone over the code somewhat in a cleanup session, improved the documentation a bit, and packaged a release, I&#8217;ll write up a blog post to let people know that a first release is available.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://escapegoat.org/">
    <author>
      <name>yossarian</name>
    </author>
    <id>tag:escapegoat.org,2008-06-10:25</id>
    <published>2008-06-10T23:50:00Z</published>
    <updated>2008-06-11T00:05:15Z</updated>
    <link href="http://escapegoat.org/2008/6/10/hyperactive-html-editing-facilities" rel="alternate" type="text/html"/>
    <title>Hyperactive :: HTML Editing Facilities</title>
<content type="html">
            &lt;p&gt;The latest round of development (a.k.a &#8220;weekend&#8221;) was focused mostly on providing &lt;a href=&quot;http://london.escapegoat.org/articles/new&quot;&gt;good &lt;span class=&quot;caps&quot;&gt;HTML&lt;/span&gt; editing features&lt;/a&gt;.  This is somewhat trickier than it seems, because it can potentially open up a load of security holes.  The site now uses the &lt;a href=&quot;http://tinymce.moxiecode.com/&quot;&gt;tiny mce&lt;/a&gt; editor, and some special Rails plugins ( &lt;a href=&quot;http://weblog.techno-weenie.net/2006/9/3/white-listing-plugin-for-rails&quot;&gt;white_list&lt;/a&gt; and &lt;a href=&quot;http://code.google.com/p/sanitizeparams/&quot;&gt;sanitize_params&lt;/a&gt; ) to make it safe.&lt;/p&gt;


	&lt;p&gt;If you know what an &lt;span class=&quot;caps&quot;&gt;XSS&lt;/span&gt; attack is, please take a crack at attacking the site and hassle us in #hyperactive on &lt;a href=&quot;irc://irc.indymedia.org&quot;&gt;irc.indymedia.org&lt;/a&gt; (or just leave a comment on the site) if any of your attacks make it through the filters. I&#8217;ve already tried all of the attacks on the &lt;a href=&quot;http://ha.ckers.org/xss.html&quot;&gt;&lt;span class=&quot;caps&quot;&gt;XSS&lt;/span&gt; Cheat Sheet&lt;/a&gt; and none of them succeeded.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://escapegoat.org/">
    <author>
      <name>yossarian</name>
    </author>
    <id>tag:escapegoat.org,2008-05-27:24</id>
    <published>2008-05-27T10:33:00Z</published>
    <updated>2008-05-27T10:37:25Z</updated>
    <link href="http://escapegoat.org/2008/5/27/hyperactive-better-torrent-features-and-minor-fixes" rel="alternate" type="text/html"/>
    <title>Hyperactive :: Torrent Features and Minor Fixes</title>
<content type="html">
            &lt;p&gt;Here&#8217;s a quick report on the latest code developments.  As always, the big need we have is for people who can help out with &lt;span class=&quot;caps&quot;&gt;CSS&lt;/span&gt;, as the site still needs somebody knowledgeable to make it look better.&lt;/p&gt;


	&lt;p&gt;Anway, on the weekend we managed to get the following tasks done:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;Set up the London site on a new server.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;Added a configuration directive allowing sites to use their own local stylesheets and images, so now London and Denmark can look different to each other.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;Comment editing for admins is now working, this was a request by Indy DK as they needed to remove some borderline stuff from a comment.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;Multiple event hiding is now working (bug fix), so all repeating events in a series can be hidden with one click.  This should help out with calendar spam in a big way.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;Started work on an integrated system for controlling Bittorrent video downloads from within the site.  Torrent creation and control functions work, I just need to make a user interface for it &#8211; basically the reason for this one is that torrents didn&#8217;t seem to stay running properly, so I added a new process to manage them.  Currently it doesn&#8217;t look like anything (and isn&#8217;t fully working) but when it&#8217;s done we should be able to turn torrents on and off for different videos right from within the admin interface, and the torrent downloads should be much more stable.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;Added more documentation on the installation page.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;Added more tickets to the wish-list of features so we don&#8217;t forget anybody&#8217;s ideas when they get contributed &#8211; especially the mobile ones.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;I am concentrating on making everything work super-solidly before adding lots of new features, so the next moves will be to get an integrated &lt;span class=&quot;caps&quot;&gt;HTML&lt;/span&gt; editor fully working within the site (it&#8217;s currently half-done), and probably do more server config (especially &lt;span class=&quot;caps&quot;&gt;SSL&lt;/span&gt; for publishing).  As far as I know, there are no major bugs currently affecting the site (somebody please let me know if I&#8217;ve got this wrong!).&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://escapegoat.org/">
    <author>
      <name>yossarian</name>
    </author>
    <id>tag:escapegoat.org,2008-05-10:23</id>
    <published>2008-05-10T00:18:00Z</published>
    <updated>2008-05-10T11:48:29Z</updated>
    <link href="http://escapegoat.org/2008/5/10/hyperactive-comment-love" rel="alternate" type="text/html"/>
    <title>Hyperactive :: Comment Love</title>
<content type="html">
            &lt;p&gt;The London indymedia collective recently came up with an interesting idea: &#8220;self-administration of comments&#8221; . The idea is now working on the &lt;a href=&quot;http://london.escapegoat.org&quot;&gt;development site&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;To summarize:&lt;/p&gt;


	&lt;p&gt;1) Non-admin users can hide comments on their own stuff:&lt;/p&gt;


	&lt;p&gt;The site allows people to register accounts if they want to (anonymous publishing still works like it always did).  If you publish  an article, event, or video while you&#8217;re logged in, and someone comments on it, you are allowed to hide the comments on your own article, event, or video.  If anybody can think of a nice way to encourage people to be responsible for hiding crap comments on their own content, in line with the editorial policy, that&#8217;d be cool.  If it becomes a problem for some reason I can probably think up some way to bar people from administering their own comments on an individual basis.&lt;/p&gt;


	&lt;p&gt;2) The site now allows users a choice regarding whether to allow comments:&lt;/p&gt;


	&lt;p&gt;If you take a look at the &lt;a href=&quot;http://london.escapegoat.org/articles/new&quot;&gt;publish form for an article&lt;/a&gt;, you will see that underneath the body text entry there&#8217;s a checkbox with the following explanation:&lt;/p&gt;


	&lt;p&gt;&#8220;You have the option of allowing comments. Untick this box to disable comments.&#8221;&lt;/p&gt;


	&lt;p&gt;So, users can now decide whether they want comments on their stuff (it&#8217;s ticked by default).&lt;/p&gt;


	&lt;p&gt;3) There&#8217;s a &#8220;latest comments&#8221; list in admin.&lt;/p&gt;


	&lt;p&gt;In other comment-related news, the admin system now allows admins to see a list of the latest comments on the site.  Clicking a
link on the comment allows the admin to go see the comment in context.&lt;/p&gt;


	&lt;p&gt;Thanks for the suggestions, keep the ideas coming,&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://escapegoat.org/">
    <author>
      <name>yossarian</name>
    </author>
    <id>tag:escapegoat.org,2008-04-10:21</id>
    <published>2008-04-10T11:13:00Z</published>
    <updated>2008-04-10T11:19:51Z</updated>
    <link href="http://escapegoat.org/2008/4/10/hyperactive-first-live-installation" rel="alternate" type="text/html"/>
    <title>Hyperactive :: First Live Installation</title>
<summary type="html">&lt;p&gt;My blood pressure shot through the roof today when I rolled into work to find out that the hep-cats at &lt;a href=&quot;http://indymedia.dk&quot;&gt;Indymedia Denmark&lt;/a&gt; had switched their Hyperactive installation out of testing and into production.  Congratulations to them on the launch of the site, and we can admire them for having the courage to run on such crazy, untested code!&lt;/p&gt;


	&lt;p&gt;London Indymedia will be going mental with jealousy in short order.&lt;/p&gt;</summary>  </entry>
  <entry xml:base="http://escapegoat.org/">
    <author>
      <name>yossarian</name>
    </author>
    <id>tag:escapegoat.org,2008-04-08:20</id>
    <published>2008-04-08T10:22:00Z</published>
    <updated>2008-04-08T11:05:49Z</updated>
    <category term="Ruby on Rails"/>
    <link href="http://escapegoat.org/2008/4/8/hyperactive-caching-localization-and-comments" rel="alternate" type="text/html"/>
    <title>Hyperactive :: Caching, Localization and Comments</title>
<summary type="html">&lt;p&gt;Another round of development on &lt;a href=&quot;http://escapegoat.org/projects/hyperactive&quot;&gt;Hyperactive&lt;/a&gt; is nearly complete.  In this round of features, we&#8217;ve concentrated on getting the code ready for production use.  This has consisted mostly of the following tasks:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;caching&lt;/li&gt;
		&lt;li&gt;localization&lt;/li&gt;
		&lt;li&gt;the ability to leave comments&lt;/li&gt;
	&lt;/ul&gt;</summary><content type="html">
            &lt;p&gt;Another round of development on &lt;a href=&quot;http://escapegoat.org/projects/hyperactive&quot;&gt;Hyperactive&lt;/a&gt; is nearly complete.  In this round of features, we&#8217;ve concentrated on getting the code ready for production use.  This has consisted mostly of the following tasks:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;caching&lt;/li&gt;
		&lt;li&gt;localization&lt;/li&gt;
		&lt;li&gt;the ability to leave comments&lt;/li&gt;
	&lt;/ul&gt;
&lt;p&gt;Another round of development on &lt;a href=&quot;http://escapegoat.org/projects/hyperactive&quot;&gt;Hyperactive&lt;/a&gt; is nearly complete.  In this round of features, we&#8217;ve concentrated on getting the code ready for production use.  This has consisted mostly of the following tasks:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;caching&lt;/li&gt;
		&lt;li&gt;localization&lt;/li&gt;
		&lt;li&gt;the ability to leave comments&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h2&gt;Caching&lt;/h2&gt;


	&lt;p&gt;Since Ruby is a slow language (it takes a long time to do stuff compared to most other languages) and Rails isn&#8217;t a particularly speedy framework, we don&#8217;t want to be pulling all the information to construct a page out of the database and building the page every time somebody requests it.  The site needs to be fast enough to not fold up under heavy load.&lt;/p&gt;


	&lt;p&gt;So, the code has been set up to use the fastest possible solution to this set of problems &#8211; the full-page caching mechanism in Rails.  For any content show page (i.e. show an article, show an event, or show a video), and for the front page of the site, the page is assembled from the database and rendered as &lt;span class=&quot;caps&quot;&gt;HTML&lt;/span&gt; the first time it&#8217;s requested.  This rendered page gets cached on disk.  The next time somebody requests the same page, instead of firing up Rails and hitting the database and doing all the calculations necessary to show the page, the Apache server looks in its cache and says &#8220;oh, yeah, I&#8217;ve got this one, here you go&#8221; &#8211; which is maybe 100 times faster than assembling the page dynamically.  This means that more people can be looking at the site at any given time without the server flipping out.&lt;/p&gt;


	&lt;p&gt;As with anything, there are a few trade-offs involved.  For one thing, the fact that we&#8217;re caching the &lt;strong&gt;full page&lt;/strong&gt; rather than just parts of it means that the page needs to be the same for everybody.  This might not seem like a big deal at first, but it means we can&#8217;t (easily) have stuff like &#8220;Now logged in as Noam&#8221;, or show different controls on the page based on whether a user is an admin or not. If we did, the user &#8220;Marcos&#8221; might log into the site, take a look at a page which Noam had previously viewed, see the message &#8220;Now logged in as Noam&#8221;, and suffer a major identity crisis (&#8220;Why am I up here in the mountains?  &lt;span class=&quot;caps&quot;&gt;MIT&lt;/span&gt; seems so much more comfortable at this time of year.&#8221;).  The repercussions could be too much to bear, especially if the situation was reversed and Chomsky tried to pick up an AK-47 and head for the mountains.  None of us wants to be responsible for this.&lt;/p&gt;


	&lt;p&gt;The way we&#8217;ve solved the problem is to put things like administrative controls into the page as &lt;span class=&quot;caps&quot;&gt;AJAX&lt;/span&gt; calls.  When &lt;a href=&quot;http://london.escapegoat.org/articles/19&quot;&gt;viewing an article&lt;/a&gt;, if you click on the &#8220;inappropriate article?&#8221; link, the page asks the server to grab the proper controls for your user role &#8211; if you  have the ability to hide content, you see the &#8220;hide content&#8221; controls, if you don&#8217;t have the ability to hide content, you see the &#8220;report this content&#8221; controls.  Since this part of the page comes back as the result of a fresh request to the server, we can check the user&#8217;s role when the request takes place, which gets around the problem of the cached page.&lt;/p&gt;


	&lt;p&gt;We still need to do caching for the list pages, and a few other pages, but the front page and the content pages seemed like the best place to start.&lt;/p&gt;


	&lt;h2&gt;Localization&lt;/h2&gt;


	&lt;p&gt;The site can now be fully localized into any &lt;span class=&quot;caps&quot;&gt;UTF&lt;/span&gt;-8 language.  We&#8217;ve used the &lt;a href=&quot;http://www.lucaguidi.com/pages/click-to-globalize&quot;&gt;click-to-globalize&lt;/a&gt; plugin together with the &lt;a href=&quot;http://www.globalize-rails.org/globalize/&quot;&gt;globalize&lt;/a&gt; plugin to provide translation services.  Basically, in order to translate the site&#8217;s user interface into your language, all you need to do is log in as a translator, and click directly on the piece of text you want to translate.  When you do this, an in-place editor appears on the page, you type in the translated text, and hit a &#8220;save&#8221; button.  This saves the translated text in the database.  You can see this in action in the &#8220;text area transformation&#8221; screencast video on the bottom of the click-to-globalize page.&lt;/p&gt;


	&lt;p&gt;Currently, any site should only be in one language, but this should make it really easy to translate the site&#8217;s user interface into multiple languages and have them all available (so a site could be in French and English, let&#8217;s say).  Another thing which would be relatively easy to implement would be a translation interface directly in the site, so that site content can also be translated and shown automatically if it exists for a given piece of content.  This should make it easy to build multilingual sites.&lt;/p&gt;


	&lt;h2&gt;Comments&lt;/h2&gt;


	&lt;p&gt;Up until now, the site hasn&#8217;t had the ability for users to leave comments.  Over the past two weeks we&#8217;ve built comment functionality into the site, so it&#8217;s now possible to leave comments on articles (and soon events and videos).&lt;/p&gt;


	&lt;p&gt;We&#8217;re thinking about having features like the person who created the content having control over comment administration, but we&#8217;ll have to ask around and see what people think of that.&lt;/p&gt;


	&lt;h2&gt;Summary&lt;/h2&gt;


	&lt;p&gt;The site is nearly ready for production deployment, there are a bunch of very small things which need to be fixed up so that it can go live at Indymedia Denmark &#8211; areas of the interface which still need translation, the ability to un-hide comments, and a short list of other stuff.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://escapegoat.org/">
    <author>
      <name>yossarian</name>
    </author>
    <id>tag:escapegoat.org,2008-03-26:19</id>
    <published>2008-03-26T13:57:00Z</published>
    <updated>2008-03-26T14:39:09Z</updated>
    <category term="Ruby on Rails"/>
    <link href="http://escapegoat.org/2008/3/26/hyperactive-video-improvements" rel="alternate" type="text/html"/>
    <title>Hyperactive :: Video Improvements</title>
<summary type="html">&lt;p&gt;We&#8217;ve been hard at work on the Hyperactive codebase for the last few months, it&#8217;s probably time to post an update here.  This release was code-named &#8220;Planet Male Madness&#8221; in tribute to one of the greats in the Indymedia movement.&lt;/p&gt;


	&lt;p&gt;Recent development effort has been spent mostly on video.  If you take a look at &lt;a href=&quot;http://london.escapegoat.org/videos/61&quot;&gt;a video page on the development site&lt;/a&gt; you&#8217;ll notice that there are lots of new features available.&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;We&#8217;ve been hard at work on the Hyperactive codebase for the last few months, it&#8217;s probably time to post an update here.  This release was code-named &#8220;Planet Male Madness&#8221; in tribute to one of the greats in the Indymedia movement.&lt;/p&gt;


	&lt;p&gt;Recent development effort has been spent mostly on video.  If you take a look at &lt;a href=&quot;http://london.escapegoat.org/videos/61&quot;&gt;a video page on the development site&lt;/a&gt; you&#8217;ll notice that there are lots of new features available.&lt;/p&gt;
&lt;p&gt;We&#8217;ve been hard at work on the Hyperactive codebase for the last few months, it&#8217;s probably time to post an update here.  This release was code-named &#8220;Planet Male Madness&#8221; in tribute to one of the greats in the Indymedia movement.&lt;/p&gt;


	&lt;p&gt;Recent development effort has been spent mostly on video.  If you take a look at &lt;a href=&quot;http://london.escapegoat.org/videos/61&quot;&gt;a video page on the development site&lt;/a&gt; you&#8217;ll notice that there are lots of new features available.&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;Related content is automatically shown on the right hand side. Related content could be other videos, articles, or events.  It&#8217;s generated automatically by the search engine software embedded in the site. You can see an example of a vid with related content &lt;a href=&quot;http://london.escapegoat.org/videos/42&quot;&gt;here&lt;/a&gt;.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt; featured videos are shown on the right hand side&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt; recent videos are shown on the right hand side&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;if the video was uploaded inside of an article or event, that article or event is displayed.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;the flash video player now does full-screen mode if the user&#8217;s flash player supports it&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;all uploaded video is currently retained in its original format, and transcoded to Ogg Theora standard as well. I know that some people have strong feelings about codec choices, this will require  more discussion.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;clicking on &#8220;How to download&#8221; reveals instructions regarding how to download the video via Bittorrent peer-to-peer software, and how to subscribe to the site&#8217;s video feeds. I would really appreciate it if people could read this text and offer suggestions on how to improve it.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;Incidentally, this is the way I&#8217;d like to handle help text throughout the site &#8211; we can put that little &#8221;?&#8221; icon on a page and have any necessary help text get revealed right where the user is. &lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;the hiding controls have now been improved so that the show up as &#8220;inappropriate video?&#8221;.  If you have permission to hide content, this reveals a &#8220;hide this&#8221; form when clicked.  If you don&#8217;t have permission to hide content, it reveals a &#8220;report this as inappropriate&#8221; form when clicked.  The contents of the form are automatically emailed to admins, and content is hidden immediately if the user has hiding permission.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;the site now implements the &lt;a href=&quot;http://transmission.cc/TXFeed&quot;&gt;Transmission metadata feed standard&lt;/a&gt;, which means that people can now subscribe to screening-quality video and the bandwidth is shared among site users (we don&#8217;t pay for most of it).&lt;/li&gt;
	&lt;/ul&gt;
          </content>  </entry>
  <entry xml:base="http://escapegoat.org/">
    <author>
      <name>yossarian</name>
    </author>
    <id>tag:escapegoat.org,2007-12-09:18</id>
    <published>2007-12-09T18:16:00Z</published>
    <updated>2007-12-09T18:25:58Z</updated>
    <link href="http://escapegoat.org/2007/12/9/users-vs-groups-smackdown" rel="alternate" type="text/html"/>
    <title>Users vs Groups Smackdown</title>
<summary type="html">&lt;p&gt;One of the things that people seem to want out of a new Indymedia &lt;span class=&quot;caps&quot;&gt;CMS&lt;/span&gt; is the ability to have an expanded user login system, with multiple levels of permissions and the ability to edit your own content.  I&#8217;ve been thinking all day about the fact that user logins can visibly tie people to content, and also do so at the database level.&lt;/p&gt;


	&lt;p&gt;The good things about an expanded login system are obvious &#8211; there is a lot more potential for many people to administer the site, less hassle for admins who always end up doing the &#8220;can you fix the typo in my article?&#8221; requests, etc.  However, there are a few problems as well.&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;One of the things that people seem to want out of a new Indymedia &lt;span class=&quot;caps&quot;&gt;CMS&lt;/span&gt; is the ability to have an expanded user login system, with multiple levels of permissions and the ability to edit your own content.  I&#8217;ve been thinking all day about the fact that user logins can visibly tie people to content, and also do so at the database level.&lt;/p&gt;


	&lt;p&gt;The good things about an expanded login system are obvious &#8211; there is a lot more potential for many people to administer the site, less hassle for admins who always end up doing the &#8220;can you fix the typo in my article?&#8221; requests, etc.  However, there are a few problems as well.&lt;/p&gt;
&lt;p&gt;One of the things that people seem to want out of a new Indymedia &lt;span class=&quot;caps&quot;&gt;CMS&lt;/span&gt; is the ability to have an expanded user login system, with multiple levels of permissions and the ability to edit your own content.  I&#8217;ve been thinking all day about the fact that user logins can visibly tie people to content, and also do so at the database level.&lt;/p&gt;


	&lt;p&gt;The good things about an expanded login system are obvious &#8211; there is a lot more potential for many people to administer the site, less hassle for admins who always end up doing the &#8220;can you fix the typo in my article?&#8221; requests, etc.  However, there are a few problems as well.&lt;/p&gt;


	&lt;p&gt;First, the act of publishing anonymously on the newswire arguably leads to a collective ethic rather than an individualist one (at least in theory, and on a good day). That is, the newswire is a space where a whole bunch of people can contribute, and it&#8217;s not about them as individuals, or even about their online personas.  This makes the newswire of a well-maintained and active Indymedia site qualitatively very different from a blog, even a blog contributed to by multiple users.  Whereas the Indy wire ideally showcases organized groups of people taking collective action, a blog usually ends up being a &#8220;me, me, me, look how great I am&#8221; showcase of a bunch of individuals.&lt;/p&gt;


	&lt;p&gt;Second, there are questions of security.  Tying published content (articles, videos, etc) to a user can be considered a good thing if we&#8217;re not interested in security &#8211; if someone publishes something that&#8217;s really of excellent quality, I&#8217;d like to be able to conveniently access all of their other stuff.  However, if the server gets seized, the foreign key between the content and the user is gonna be there.  Although we wouldn&#8217;t store email addresses or other identifying info in the system anyway (and there would always be the option of anonymous publishing), it could be a pretty easy job for the cops to figure out who a user is, given a sufficient sample set of articles and enough on-the-street surveillance.&lt;/p&gt;


	&lt;p&gt;So I was thinking to tie the content to a group instead.  Then if there is more than one person operating as part of the group, there is at least some legal deniability (which improves the bigger the group is). I would propose having individual logins, but all the functionality of the site would be keyed on groups rather than individuals. So instead of showing &#8220;all articles by UserX&#8221; the site would show things like &#8220;All articles by london noborders&#8221;. Group admins would i guess be in charge of accepting new people into a group.  It could be a good way to encourage organization and collaboration between media producers, and it could also help encourage media production by political groups.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://escapegoat.org/">
    <author>
      <name>yossarian</name>
    </author>
    <id>tag:escapegoat.org,2007-11-11:17</id>
    <published>2007-11-11T15:33:00Z</published>
    <updated>2007-11-11T15:50:31Z</updated>
    <link href="http://escapegoat.org/2007/11/11/installing-ffmpeg-php-on-ubuntu-7-10" rel="alternate" type="text/html"/>
    <title>Installing ffmpeg-php on ubuntu 7.10</title>
<summary type="html">&lt;p&gt;A bunch of us have begun working on a new codebase for Indymedia, based on CakePHP.  I&#8217;m not exactly Captain &lt;span class=&quot;caps&quot;&gt;PHP&lt;/span&gt;, so there&#8217;s going to be a bit of a learning curve for me, but we&#8217;ll see how it goes.&lt;/p&gt;


	&lt;p&gt;One of the things I am interested in setting up is some kind of &lt;span class=&quot;caps&quot;&gt;FLV&lt;/span&gt; video conversion system for the new &lt;span class=&quot;caps&quot;&gt;CMS&lt;/span&gt;.  There&#8217;s a nice pleasant-looking &lt;span class=&quot;caps&quot;&gt;PHP&lt;/span&gt; library to deal with the FFmpeg video conversion utility on the server side (is anybody in the Rails world noticing this?), so here&#8217;s my experience installing it on Ubuntu.&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;A bunch of us have begun working on a new codebase for Indymedia, based on CakePHP.  I&#8217;m not exactly Captain &lt;span class=&quot;caps&quot;&gt;PHP&lt;/span&gt;, so there&#8217;s going to be a bit of a learning curve for me, but we&#8217;ll see how it goes.&lt;/p&gt;


	&lt;p&gt;One of the things I am interested in setting up is some kind of &lt;span class=&quot;caps&quot;&gt;FLV&lt;/span&gt; video conversion system for the new &lt;span class=&quot;caps&quot;&gt;CMS&lt;/span&gt;.  There&#8217;s a nice pleasant-looking &lt;span class=&quot;caps&quot;&gt;PHP&lt;/span&gt; library to deal with the FFmpeg video conversion utility on the server side (is anybody in the Rails world noticing this?), so here&#8217;s my experience installing it on Ubuntu.&lt;/p&gt;
&lt;p&gt;A bunch of us have begun working on a new codebase for Indymedia, based on CakePHP.  I&#8217;m not exactly Captain &lt;span class=&quot;caps&quot;&gt;PHP&lt;/span&gt;, so there&#8217;s going to be a bit of a learning curve for me, but we&#8217;ll see how it goes.&lt;/p&gt;


	&lt;p&gt;One of the things I am interested in setting up is some kind of &lt;span class=&quot;caps&quot;&gt;FLV&lt;/span&gt; video conversion system for the new &lt;span class=&quot;caps&quot;&gt;CMS&lt;/span&gt;.  There&#8217;s a nice pleasant-looking &lt;span class=&quot;caps&quot;&gt;PHP&lt;/span&gt; library to deal with the FFmpeg video conversion utility on the server side (is anybody in the Rails world noticing this?), so here&#8217;s my experience installing it on Ubuntu.&lt;/p&gt;


	&lt;p&gt;First things first.  Enable the universe repositories, and then install ffmpeg.  Keep in mind that the ffmpeg binaries in Ubuntu are built without the necessary &lt;span class=&quot;caps&quot;&gt;MP3&lt;/span&gt; support (for patent reasons) to actually encode sound in &lt;span class=&quot;caps&quot;&gt;FLV&lt;/span&gt; files. In addition, if you install the &#8220;normal&#8221; FFMpeg binaries from the Ubuntu repositories, you won&#8217;t get the development headers necessary to compile the ffmpeg-php code.  So, let&#8217;s do things the hard way and compile FFMpeg from source, so we have everything working.&lt;/p&gt;


	&lt;p&gt;I&#8217;ll outline the basic steps here.  First, you need the mp3 libraries:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;apt-get install liblame-dev&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Next, you need to get ready to build FFMpeg from source:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;sudo apt-get install liblame-dev libfaad2-dev libfaac-dev libxvidcore4-dev liba52-0.7.4 \
liba52-0.7.4-dev libx264-dev libdts-dev libgsm1-dev libvorbis-dev libdc1394-13-dev \
checkinstall build-essential gcc&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Get the FFMpeg source:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;cd /usr/local/src
sudo apt-get source ffmpeg&lt;/code&gt;&lt;/pre&gt;

&lt;pre&gt;&lt;code&gt;cd ffmpeg-*
sudo ./configure --enable-gpl --enable-pp --enable-libvorbis --enable-libogg \
--enable-liba52 --enable-libdts --enable-dc1394 --enable-libgsm --disable-debug \
--enable-libmp3lame --enable-libfaad --enable-libfaac --enable-xvid --enable-pthreads \
--enable-x264 --enable-shared --prefix=/usr&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;The second-last option,&#8212;enable-shared, should allow the php5 script to find the FFMpeg shared libraries so that ffmpeg-php can compile properly.&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
sudo make
sudo checkinstall&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;When you do the checkinstall, it&#8217;ll ask you a bunch of questions so that it can build you a .deb package and install it.  For most of them you can just accept the defaults.  I set the package description to FFMpeg video conversion utility, and I set the version to 3:0.cvs20070308-5ubuntu4.  This makes the package you&#8217;re making slightly newer than the one in the regular Ubuntu repositories, so Ubuntu won&#8217;t hassle you all the time, taunting you with a newer version of the package when you log in.&lt;/p&gt;


	&lt;p&gt;Ok, that was a big hassle, I know. But it should get you video encoding capability.&lt;/p&gt;


	&lt;p&gt;The next thing I did was download the latest release of ffmpeg-php from http://ffmpeg-php.sourceforge.net/  and extracted it on my machine.  The first thing you need to do at that point is to run a utility called &#8220;phpize&#8221; in order to set up some configuration files for your machine.  However, Ubuntu doesn&#8217;t include phpize in the main php package, so you&#8217;ll need to do this first:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;apt-get install php5-dev&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Then cd into the ffmpeg-php-0.X.X directory (maybe you extracted it on your desktop?), and run the following command to generate a config script:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;phpize5&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;You can then do this to build the library:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;./configure &#38;&#38; make&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;And finally this to install it:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;sudo make install&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Now you&#8217;ve got ffmpeg support for &lt;span class=&quot;caps&quot;&gt;PHP&lt;/span&gt;, and an FFMpeg binary installed that will do its stuff with sound encoding capabilities.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://escapegoat.org/">
    <author>
      <name>yossarian</name>
    </author>
    <id>tag:escapegoat.org,2007-10-14:15</id>
    <published>2007-10-14T15:57:00Z</published>
    <updated>2007-10-14T16:02:49Z</updated>
    <link href="http://escapegoat.org/2007/10/14/your-own-live-tv-feed-on-the-interweb" rel="alternate" type="text/html"/>
    <title>Your own live tv feed on the interweb</title>
<summary type="html">&lt;p&gt;I did some testing earlier and I actually got a video stream out onto the net and was watching it within about 20 minutes.  My head exploded. It was really easy to do.&lt;/p&gt;


	&lt;p&gt;I was able to view the stream on Linux and Mac &lt;span class=&quot;caps&quot;&gt;OS X&lt;/span&gt; using &lt;span class=&quot;caps&quot;&gt;VLC&lt;/span&gt;.  I was streaming and viewing on the Linux box (a 2.8 Ghz laptop, 512 &lt;span class=&quot;caps&quot;&gt;MB RAM&lt;/span&gt;). The &lt;span class=&quot;caps&quot;&gt;CPU&lt;/span&gt; sat at about 70% and the machine didn&#8217;t look like anything bad was going to happen, I left it running for about 45 minutes and it all seemed cool.  The data rates were I think 70 kbps video and 60 kbps audio, which was about 1/4 of my 802.11b wireless card&#8217;s bandwidth.  So this should work in most wireless situations if you&#8217;ve got a decent wifi connection. It was not using very much &lt;span class=&quot;caps&quot;&gt;RAM&lt;/span&gt;, it didn&#8217;t seem.  Hardware requirements should be fairly modest, maybe a 1Ghz machine would do it.&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;I did some testing earlier and I actually got a video stream out onto the net and was watching it within about 20 minutes.  My head exploded. It was really easy to do.&lt;/p&gt;


	&lt;p&gt;I was able to view the stream on Linux and Mac &lt;span class=&quot;caps&quot;&gt;OS X&lt;/span&gt; using &lt;span class=&quot;caps&quot;&gt;VLC&lt;/span&gt;.  I was streaming and viewing on the Linux box (a 2.8 Ghz laptop, 512 &lt;span class=&quot;caps&quot;&gt;MB RAM&lt;/span&gt;). The &lt;span class=&quot;caps&quot;&gt;CPU&lt;/span&gt; sat at about 70% and the machine didn&#8217;t look like anything bad was going to happen, I left it running for about 45 minutes and it all seemed cool.  The data rates were I think 70 kbps video and 60 kbps audio, which was about 1/4 of my 802.11b wireless card&#8217;s bandwidth.  So this should work in most wireless situations if you&#8217;ve got a decent wifi connection. It was not using very much &lt;span class=&quot;caps&quot;&gt;RAM&lt;/span&gt;, it didn&#8217;t seem.  Hardware requirements should be fairly modest, maybe a 1Ghz machine would do it.&lt;/p&gt;
&lt;p&gt;I did some testing earlier and I actually got a video stream out onto the net and was watching it within about 20 minutes.  My head exploded. It was really easy to do.&lt;/p&gt;


	&lt;p&gt;I was able to view the stream on Linux and Mac &lt;span class=&quot;caps&quot;&gt;OS X&lt;/span&gt; using &lt;span class=&quot;caps&quot;&gt;VLC&lt;/span&gt;.  I was streaming and viewing on the Linux box (a 2.8 Ghz laptop, 512 &lt;span class=&quot;caps&quot;&gt;MB RAM&lt;/span&gt;). The &lt;span class=&quot;caps&quot;&gt;CPU&lt;/span&gt; sat at about 70% and the machine didn&#8217;t look like anything bad was going to happen, I left it running for about 45 minutes and it all seemed cool.  The data rates were I think 70 kbps video and 60 kbps audio, which was about 1/4 of my 802.11b wireless card&#8217;s bandwidth.  So this should work in most wireless situations if you&#8217;ve got a decent wifi connection. It was not using very much &lt;span class=&quot;caps&quot;&gt;RAM&lt;/span&gt;, it didn&#8217;t seem.  Hardware requirements should be fairly modest, maybe a 1Ghz machine would do it. We&#8217;ll have to do some tests.&lt;/p&gt;


	&lt;p&gt;At the same time as I was compressing and uploading the stream to http://radio.indymedia.org, I also tried watching it on a different computer.&lt;/p&gt;


	&lt;p&gt;I fired up &lt;span class=&quot;caps&quot;&gt;VLC&lt;/span&gt; (downloadable for Linux, Mac, and Windows from http://www.videolan.org ) and used the &#8220;Transcode Wizard&#8221; or something to record the video to disk on a G4 Mac.  I could view the stream as it was saved, and playback of the saved file worked perfectly as well, so in theory, we could use &lt;span class=&quot;caps&quot;&gt;VLC&lt;/span&gt; on a separate box to record the stream, and upload it to the UK newswire or to http://video.indymedia.org as soon as the streaming event is finished. I am not totally sure but I think this laptop would probably be able simultaneously compress the stream and record it to disk using &lt;span class=&quot;caps&quot;&gt;VLC&lt;/span&gt; (but if we can use a separate machine to do the recording it&#8217;s probably safer).&lt;/p&gt;


	&lt;p&gt;Below is what I did to set up the box, there are much more detailed instructions at:&lt;/p&gt;


	&lt;p&gt;http://24.72.34.35/cgi-bin/twiki/view/Main/LinuxVideoFirewire&lt;/p&gt;


	&lt;h2&gt;The Setup&lt;/h2&gt;


	&lt;p&gt;Basically, I just had to make sure the following packages were installed. I&#8217;m using Ubuntu, but this should work pretty much the same on Debian (keep in mind that on Ubuntu you would preface the commands below with &#8220;sudo&#8221;.  On Debian you&#8217;d need to run them as root).&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;apt-get install ffmpeg2theora dvgrab&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;(Note that I already had ffmpeg installed on my machine, I think that&#8217;s also necessary).&lt;/p&gt;


	&lt;p&gt;The next thing I did was download a program called oggfwd.  It&#8217;s available from http://www.v2v.cc/~j/ffmpeg2theora/oggfwd/oggfwd.linux.bin&lt;/p&gt;


	&lt;p&gt;Then I decided I trusted the people who made it, and typed this into the terminal to copy the file to a place where I could run it:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;mv oggfwd.linux.bin /usr/local/bin/oggfwd&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;chmod 755 /usr/local/bin/oggfwd&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Then, I plugged the camera in and made sure that the system could capture stuff from the firewire port.  To do this, I did:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;modprobe raw1394&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;This made sure the Linux kernel loaded up the proper modules to read Firewire input.  Then I did a:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;chmod 777 /dev/raw1394&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;This gives all users read/write/execute permissions on the Firewire port.  Not wickedly secure on a server machine but good enough for this situation I think, and it gets reset when the machine is restarted.&lt;/p&gt;


	&lt;p&gt;At that point, I issued the following command (as root) and it connected to the Indy radio server and I was serving a video stream from my house:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;dvgrab --format raw - | ffmpeg2theora -a 0 -v 5 -f dv -x 320 -y 240 -o /dev/stdout  - | oggfwd radio.indymedia.org 8000 thisisnotreallythepassword /rampART.ogg&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;I am not sure whether it is necessary to be root to do this, we can experiment with permissions a bit.&lt;/p&gt;


	&lt;p&gt;That&#8217;s it, you&#8217;ve got your own live video feed, accessible anywhere in the world!&lt;/p&gt;
          </content>  </entry>
</feed>

