<?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,2008: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>2008-12-28T16:56:41Z</updated>
  <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>2008-08-12T15:14:49Z</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>
  <entry xml:base="http://escapegoat.org/">
    <author>
      <name>yossarian</name>
    </author>
    <id>tag:escapegoat.org,2007-10-05:13</id>
    <published>2007-10-05T14:31:00Z</published>
    <updated>2008-05-26T15:40:35Z</updated>
    <link href="http://escapegoat.org/2007/10/5/installing-rmagick-with-ruby-on-debian" rel="alternate" type="text/html"/>
    <title>Installing Rmagick with Ruby on Debian</title>
<summary type="html">A lot of the time, your web apps need to chop up, resize, or otherwise mangle images.  One program that can do this on the server is ImageMagick.  Here's how to get ImageMagick to work with Ruby on Rails on a Debian or Ubuntu box.</summary><content type="html">
            A lot of the time, your web apps need to chop up, resize, or otherwise mangle images.  One program that can do this on the server is ImageMagick.  Here's how to get ImageMagick to work with Ruby on Rails on a Debian or Ubuntu box.
A lot of the time, your web apps need to chop up, resize, or otherwise mangle images.  One program that can do this on the server is ImageMagick.  Here's how to get ImageMagick to work with Ruby on Rails on a Debian or Ubuntu box.

If you haven't already done this when you installed Rails, make sure you install Debian's build-essential package so that you can compile code:

&lt;code&gt;&lt;pre&gt;sudo apt-get install build-essential&lt;/pre&gt;&lt;/code&gt;

Then:

&lt;code&gt;&lt;pre&gt;sudo apt-get install imagemagick&lt;/pre&gt;&lt;/code&gt;
&lt;code&gt;&lt;pre&gt;sudo apt-get install librmagick-ruby&lt;/pre&gt;&lt;/code&gt;
&lt;code&gt;&lt;pre&gt;sudo apt-get install libmagick9-dev&lt;/pre&gt;&lt;/code&gt;

&lt;strong&gt;Update: &lt;/strong&gt; I've had no success yet when trying to install the latest version of rmagick on Debian machines, although basically I just haven't looked into it very much as the older versions work just fine for me.  So, I just use rmagick 1.15.0 instead of the newest (2.3.0) gem.

&lt;code&gt;&lt;pre&gt;sudo gem install rmagick -v 1.15.0&lt;/pre&gt;&lt;/code&gt;

Note that libmagick9-dev may have a different version number depending on how old your
distribution is (that one is found on Ubuntu 7.04 Feisty).  Older version numbers might
include libmagick9-dev.  You should be able to do something like 
&lt;pre&gt;&lt;code&gt;apt-cache search libmagick&lt;/pre&gt;&lt;/code&gt; to find out which version is needed on your system.
          </content>  </entry>
  <entry xml:base="http://escapegoat.org/">
    <author>
      <name>yossarian</name>
    </author>
    <id>tag:escapegoat.org,2007-09-22:12</id>
    <published>2007-09-22T18:57:00Z</published>
    <updated>2007-09-22T18:59:26Z</updated>
    <link href="http://escapegoat.org/2007/9/22/noborders-indymedia-center-tech-review" rel="alternate" type="text/html"/>
    <title>Noborders indymedia center tech review</title>
<summary type="html">&lt;p&gt;From 16 &#8211; 24 September 2007 the &lt;a href=&quot;http://www.noborders.org.uk&quot;&gt;Noborders&lt;/a&gt; network set up a camp as a base from which to demonstrate against immigration detention centers in Sussex, England.  Throughout the camp, &lt;a href=&quot;http://www.indymedia.org.uk&quot;&gt;Indymedia UK&lt;/a&gt; ran a media centre including a dispatch system for news reporting and a public access point in the middle of a farmer&#8217;s field.  In case it&#8217;s useful to anybody doing something similar, here&#8217;s how we set it up.&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;From 16 &#8211; 24 September 2007 the &lt;a href=&quot;http://www.noborders.org.uk&quot;&gt;Noborders&lt;/a&gt; network set up a camp as a base from which to demonstrate against immigration detention centers in Sussex, England.  Throughout the camp, &lt;a href=&quot;http://www.indymedia.org.uk&quot;&gt;Indymedia UK&lt;/a&gt; ran a media centre including a dispatch system for news reporting and a public access point in the middle of a farmer&#8217;s field.  In case it&#8217;s useful to anybody doing something similar, here&#8217;s how we set it up.&lt;/p&gt;
&lt;p&gt;From 16 &#8211; 24 September 2007 the &lt;a href=&quot;http://www.noborders.org.uk&quot;&gt;Noborders&lt;/a&gt; network set up a camp as a base from which to demonstrate against immigration detention centers in Sussex, England.  Throughout the camp, &lt;a href=&quot;http://www.indymedia.org.uk&quot;&gt;Indymedia UK&lt;/a&gt; ran a media centre including a dispatch system for news reporting and a public access point in the middle of a farmer&#8217;s field.  In case it&#8217;s useful to anybody doing something similar, here&#8217;s how we set it up.&lt;/p&gt;


	&lt;h2&gt;Connectivity&lt;/h2&gt;


	&lt;p&gt;The biggest technical worry was the question of internet connectivity.  In previous camps in the UK, we&#8217;ve arranged to get the &lt;a href=&quot;http://psand.net&quot;&gt;Psand&lt;/a&gt; bunch to help us out with their satellite gear and solar-powered laptop setup, but for this one they weren&#8217;t available.&lt;/p&gt;


	&lt;p&gt;Our only realistic option was to use 3G mobile connectivity.  We had a T-Mobile web&#8217;n&#8217;walk card kicking around, and access to an account with a transfer limit of 10GB/month.  We were quite worried about 3G network coverage prior to the event, especially as the location wasn&#8217;t known until the last minute (police harassment meant that the location changed two days before the camp was due to start).&lt;/p&gt;


	&lt;p&gt;Initial tests at the site revealed that although &lt;span class=&quot;caps&quot;&gt;GPRS&lt;/span&gt; connectivity was great, the much faster &lt;span class=&quot;caps&quot;&gt;UMTS&lt;/span&gt; network signal was unstable when using the card with its internal antenna.  &lt;span class=&quot;caps&quot;&gt;GPRS&lt;/span&gt; is the normal mobile data network, and it&#8217;s quite slow, weighing in with about twice the speed of a 56K modem on average.  This wasn&#8217;t going to be particularly useful for the full-service media centre we envisioned, although we did do some experiments with &lt;a href=&quot;http://squid-cache.org&quot;&gt;Squid&lt;/a&gt; caching and probably could have made it work OK if we had to do so.  As a backup plan, we thought about coding up a website that would work on the local area network.  The idea was that people could use this local site to submit content, with submitted content being queued and uploaded to the &lt;a href=&quot;http://www.indymedia.org.uk&quot;&gt;Indymedia UK&lt;/a&gt; site as bandwidth became available.  This turned out to be not necessary as the &lt;span class=&quot;caps&quot;&gt;UMTS&lt;/span&gt; network worked extremely well once we picked up a &lt;span class=&quot;caps&quot;&gt;UMTS&lt;/span&gt; antenna from &lt;a href=&quot;http://www.panorama-antennas.com&quot;&gt;Panorama antennas&lt;/a&gt;.&lt;/p&gt;


	&lt;p&gt;The antenna plugged into a port on the side of a Novatel Merlin &lt;span class=&quot;caps&quot;&gt;XU870 3G&lt;/span&gt; mobile data card.  It was necessary to buy an adapter wire to make the Merlin connect to the 3m antenna cable, which then connected to a &lt;a href=&quot;http://www.panorama-antennas.com/pa/gb/sc/catalogue/GPRS%20&#38;%203G.htm&quot;&gt;Client Patch&lt;/a&gt; antenna.  Signal was still extremely weak and unstable, but by rotating the antenna slowly through 360 degrees and doing a big download, we could watch the transfer speed and figure out which way to point it.  We then duct-taped the antenna to a pole outside the media tent.  Once this was done, the signal was extremely stable and quite fast.   Average download speeds ranged from 50-100 KB / second, with bursts up to 130 KB / second.&lt;/p&gt;


	&lt;p&gt;We ran the uplink on a Windows XP laptop, using T-Mobile software that came with the data card to do the dial in (basically it&#8217;s just a really fancy &lt;span class=&quot;caps&quot;&gt;PPP&lt;/span&gt; modem setup).  A Linux project called &lt;a href=&quot;http://umtsmon.sf.net&quot;&gt;umtsmon&lt;/a&gt; provides the same functionality in Linux but we couldn&#8217;t figure out how to connect to &lt;span class=&quot;caps&quot;&gt;UMTS&lt;/span&gt; rather than &lt;span class=&quot;caps&quot;&gt;GPRS&lt;/span&gt;, and didn&#8217;t have time to fuck around forever.  In theory the Merlin will run perfectly under Linux, but the &lt;a href=&quot;http://www.novatelwireless.com/support/merlin-xu870-linux.html&quot;&gt;setup instructions&lt;/a&gt; for it aren&#8217;t particularly fantastic and we weren&#8217;t sure what parameters we needed to enter in order to get the card working with the T-Mobile account.&lt;/p&gt;


	&lt;h2&gt;Bandwidth considerations&lt;/h2&gt;


	&lt;p&gt;The account in question had a download cap of 10 GB, and we weren&#8217;t sure now much bandwidth a media center in full operation actually used.  As it turned out, the first day&#8217;s data transfer total, which was the result of people doing editorial work on the imc-uk site, was only about 45 MB.  This made us much more confident that we weren&#8217;t going to run the account out of its bandwidth allocation, and over the next few days it was pretty much open season on tcp/ip packets, with people downloading software, uploading video, doing system updates, etc.&lt;/p&gt;


	&lt;p&gt;Eight computers in heavy use, without any caching system at all, resulted in an average of 500MB / day.  This could have been massively reduced if necessary through the use of squid caches, a full set of software installation CDs, apt-caches for software packages that weren&#8217;t available locally, etc.  However, it was interesting to see what the maximum transfer was, prior to worrying about all the rest of it.  Upload speeds were in the 50 KB / second range, which was perfectly acceptable for doing large video uploads.&lt;/p&gt;


	&lt;h2&gt; The network&lt;/h2&gt;


	&lt;p&gt;We had a total of 8 computers available, mostly laptops running Ubuntu 7.04 with a Mac G4 for video editing.  Also some nice Dutch people gave us an old laptop running Debian which came in handy.  There was nothing too special about most of the network setup, which included a 16-port hub and a 5-port hub as well as two wireless stations (one for each of our media centre tents).  The only major trouble came when trying to do the initial network setup.  Windows networking setup, with its endless dialog boxes, opaque instructions based on outdated screenshots, and almost total lack of native networking applications in XP Pro, was a nightmare.  Hours of screwing around with the Internet Connection Sharing shit in XP resulted in the realization that this great OS doesn&#8217;t actually give out IP addresses in any comprehensible way.  We finally got pissed off and downloaded a copy of &lt;a href=&quot;http://perso.orange.fr/philippe.jounin/tftpd32.html&quot;&gt;Tftpd&lt;/a&gt;, a simple &lt;span class=&quot;caps&quot;&gt;GPL&lt;/span&gt; dhcp server for Windows, and set up the network as follows:&lt;/p&gt;


	&lt;p&gt;a) we disabled the &lt;span class=&quot;caps&quot;&gt;FTP&lt;/span&gt; and &lt;span class=&quot;caps&quot;&gt;SNMP&lt;/span&gt; servers that run by default.&lt;/p&gt;


	&lt;p&gt;b) we set up a subnet on the 192.168.0.x IP range, and configured &lt;span class=&quot;caps&quot;&gt;DHCP&lt;/span&gt; to start giving out addresses on 192.168.0.2, with 100 addresses in the pool (maybe a bit optimistic considering there were only ever about 500 people on the camp at the most).  The router address was 192.168.0.1, and after initially having some problems we smoothed things out by also setting the gateway address and &lt;span class=&quot;caps&quot;&gt;DNS&lt;/span&gt; address to 192.168.0.1&lt;/p&gt;


	&lt;p&gt;c) once the &lt;span class=&quot;caps&quot;&gt;PPP&lt;/span&gt; tunnel to T-Mobile was running we had to right-click on the Merlin&#8217;s connection in the Network control panel, go to the &#8220;advanced&#8221; tab, and tick the &#8220;share this computer&#8217;s internet connection&#8221; box.  This gets unticked every time the Merlin connects, but luckily the signal was really stable and this didn&#8217;t turn into a major hassle.&lt;/p&gt;


	&lt;h2&gt;Closing thoughts&lt;/h2&gt;


	&lt;p&gt;Things worked out incredibly well, and given an appropriate power source (in this case, a 5000w generator) we should be able to use a similar setup to run mobile public access points at any time or place of our choosing as long as a 3G network account is available.  The antenna setup cost 60 quid and should work with pretty much any data card as long as the appropriate card adapter lead is available.  The opportunities for mobile video and audio streaming are also quite interesting.&lt;/p&gt;


	&lt;p&gt;T-Mobile accounts come in two packages, either a 3 GB/month account with the stipulation that users don&#8217;t stream stuff (29 quid per month) or a 10 GB/month account allowing streaming (44 quid per month).  There is also the option of buying pay as you go cards with a transfer limit of 45 MB within a 24-hour time period.  This would be enough to run a really lean media centre with text reports, and it might be possible to do video stuff by burning through a bunch of SIMs, changing each one when it hits its 45 MB limit.&lt;/p&gt;
          </content>  </entry>
</feed>
