<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Brightlight Weblog</title>
	<atom:link href="http://weblog.brightlight-ict.nl/feed/" rel="self" type="application/rss+xml" />
	<link>http://weblog.brightlight-ict.nl</link>
	<description>Woah! I know ruby-fu!</description>
	<lastBuildDate>Mon, 24 Aug 2009 19:07:37 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>We are not trying to be flickr or picassa</title>
		<link>http://weblog.brightlight-ict.nl/2009/08/we-are-not-trying-to-be-flickr-or-picassa/</link>
		<comments>http://weblog.brightlight-ict.nl/2009/08/we-are-not-trying-to-be-flickr-or-picassa/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 19:03:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://weblog.brightlight-ict.nl/?p=72</guid>
		<description><![CDATA[RailsRumble 2009 was this weekend and what a weekend it was. I never drank this much coffee, energydrink and coke in my life before but neither did I code so much in one weekend.
I&#8217;m posting this entry because I felt like I didn&#8217;t give enough love to the frontpage and because of that a lot [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://railsrumble.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/railsrumble.com');">RailsRumble 2009</a> was this weekend and what a weekend it was. I never drank this much coffee, energydrink and coke in my life before but neither did I code so much in one weekend.</p>
<p>I&#8217;m posting this entry because I felt like I didn&#8217;t give enough love to the frontpage and because of that a lot of people are probably unclear about the use of <a href="http://snapshare.brightlight-ict.nl" onclick="">Snapshare</a>. I&#8217;m gonna tell you a story of a problem I have faced many times before and what I hope Snapshare might be able to do to fix that problem.</p>
<p>I went to Italy on vacation this year with my girlfriend her family. And not just her parents were there but also here aunts and uncles. Everybody had a camera with them and we calculated that at the end of the vacation had about 1200 photo&#8217;s spread over 6 camera&#8217;s.<br />
It&#8217;s been a few months already and I still only saw a handful of photo&#8217;s that people uploaded to various sites and because I&#8217;m too lazy to download the photo&#8217;s that <strong>are</strong> available I don&#8217;t own the photo&#8217;s myself. </p>
<p>With Snapshare I can upload my photo&#8217;s of the vacation (and so can everybody else who was there) and give me and the other family members access. My friends/family can then &#8220;Snap&#8221; photo&#8217;s of the vacation to their own album(s) or if they like all my photo&#8217;s snap the complete album to their own account. This way everybody has all the photo&#8217;s all the time. </p>
<p>From Snapshare it should be possible to export photo&#8217;s and albums to social websites like Flickr / Facebook or the dutch variant Hyves. </p>
<p>Snapshare is all about <strong>exchanging photo&#8217;s</strong> and building an complete photo archive. We will be upgrading this prototype after the competition is over so stay tuned.</p>
<p>All that rests is a small demo of the snapping functionality. In the demo I am snapping some vacation pictures my sister uploaded to my own account. I couldn&#8217;t get my sound working on Screenr so you must imagine my sexy voice narrating yourself.</p>
<p><object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0' width='560' height='345'><param name='movie' value='http://screenr.com/Content/assets/screenr_0817090731.swf' ></param><param name='flashvars' value='i=6107' ></param><param name='allowFullScreen' value='true' ></param><embed src='http://screenr.com/Content/assets/screenr_0817090731.swf' flashvars='i=6107' allowFullScreen='true' width='560' height='345' pluginspage='http://www.macromedia.com/go/getflashplayer' ></embed></object></p>
<p>Keep Snapping!</p>
]]></content:encoded>
			<wfw:commentRss>http://weblog.brightlight-ict.nl/2009/08/we-are-not-trying-to-be-flickr-or-picassa/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iPhonefriendcodes &#8211; new Microproject</title>
		<link>http://weblog.brightlight-ict.nl/2009/04/iphonefriendcodes-new-microproject/</link>
		<comments>http://weblog.brightlight-ict.nl/2009/04/iphonefriendcodes-new-microproject/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 07:30:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://weblog.brightlight-ict.nl/?p=70</guid>
		<description><![CDATA[To test the power of rails (yet again). I worked up this little friendcode-sharing project in less than 8 hours. So if you got an iPhone and play one of those &#8220;mmo&#8221; games like iMob, iVampires or Mafia Wars take a look at iPhonefriendcodes.com
]]></description>
			<content:encoded><![CDATA[<p>To test the power of rails (yet again). I worked up this little friendcode-sharing project in less than 8 hours. So if you got an iPhone and play one of those &#8220;mmo&#8221; games like iMob, iVampires or Mafia Wars take a look at <a href="http://www.iphonefriendcodes.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.iphonefriendcodes.com');">iPhonefriendcodes.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://weblog.brightlight-ict.nl/2009/04/iphonefriendcodes-new-microproject/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Suspended, Twitter out</title>
		<link>http://weblog.brightlight-ict.nl/2009/01/suspended-twitter-out/</link>
		<comments>http://weblog.brightlight-ict.nl/2009/01/suspended-twitter-out/#comments</comments>
		<pubDate>Thu, 22 Jan 2009 07:30:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://weblog.brightlight-ict.nl/?p=62</guid>
		<description><![CDATA[After finally understanding the deal about twitter I was greeted with a suspended message when I tried to log in this morning. As far as I know I&#8217;ve done nothing wrong! It did make me realize that I&#8217;ve become a little twitter-holic, my hands are shaking I need my Twit-fix!
Anyway, anybody else with a similar [...]]]></description>
			<content:encoded><![CDATA[<p>After finally understanding the deal about twitter I was greeted with a suspended message when I tried to log in this morning. As far as I know I&#8217;ve done nothing wrong! It did make me realize that I&#8217;ve become a little twitter-holic, my hands are shaking I need my Twit-fix!<br />
Anyway, anybody else with a similar story?</p>
]]></content:encoded>
			<wfw:commentRss>http://weblog.brightlight-ict.nl/2009/01/suspended-twitter-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Giving your staging database some love</title>
		<link>http://weblog.brightlight-ict.nl/2009/01/50/</link>
		<comments>http://weblog.brightlight-ict.nl/2009/01/50/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 20:16:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://weblog.brightlight-ict.nl/?p=50</guid>
		<description><![CDATA[We over at NoXa like to begin every day with a fresh database on our staging enviroment. Problem is it&#8217;s a lot of work to do it manually everytime. So altough we like the daily update we often end up with a staging database that gets refreshed once a year. So today I decided the old-database [...]]]></description>
			<content:encoded><![CDATA[<p>We over at <a href="http://www.noxa.nl" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.noxa.nl');">NoXa</a> like to begin every day with a fresh database on our staging enviroment. Problem is it&#8217;s a lot of work to do it manually everytime. So altough we like the daily update we often end up with a staging database that gets refreshed once a year. So today I decided the old-database days were over, something had to be done, I whipped up Textmate and made a nifty little ruby script, which unfortunaly hasn&#8217;t got a groovy name just yet. This script isn&#8217;t a copy + paste solution but it might give you idea&#8217;s to tackle your own database issues. (if you even have any).<br />
First off we make backups of all our databases nightly and rsync those to various locations. One of these locations is shared through smb. What this script does is copy the latest backup to the database server drop all the existing tables and import everything. It isn&#8217;t the best solution I could think of but it works pretty well.</p>
<p>As always this script can be found on <a href="http://gist.github.com/47045" onclick="javascript:pageTracker._trackPageview('/outbound/article/gist.github.com');"> Gist</a> too.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"> <span style="color:#008000; font-style:italic;"># 0) Setup</span>
<span style="color:#ff6633; font-weight:bold;">$DATE_FORMAT</span> = <span style="color:#996600;">&quot;%Y%m%d&quot;</span>
<span style="color:#ff6633; font-weight:bold;">$BACKUP_FILENAME</span> = <span style="color:#996600;">&quot;mysecret-database-daily-#{Time.now.strftime($DATE_FORMAT)}.sql.gz&quot;</span>
<span style="color:#ff6633; font-weight:bold;">$BACKUP_LOCATION</span> = <span style="color:#996600;">&quot;/mnt/backups/&quot;</span>
<span style="color:#ff6633; font-weight:bold;">$USERNAME</span> = <span style="color:#996600;">&quot;ninja&quot;</span>
<span style="color:#ff6633; font-weight:bold;">$PASSWORD</span> = <span style="color:#996600;">&quot;pirate&quot;</span>
<span style="color:#ff6633; font-weight:bold;">$DATABASE</span> = <span style="color:#996600;">&quot;japanese_boat&quot;</span>
<span style="color:#ff6633; font-weight:bold;">$MAIL_FROM</span> = <span style="color:#996600;">&quot;aaarrrgh@brightlight-ict.nl&quot;</span>
<span style="color:#ff6633; font-weight:bold;">$MAIL_TO</span> = <span style="color:#996600;">&quot;maran@brightlight-ict.nl&quot;</span>
&nbsp;
mailer = SimpleMailer.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span>$MAIL_FROM, <span style="color:#ff6633; font-weight:bold;">$MAIL_TO</span><span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
<span style="color:#008000; font-style:italic;"># 1) Get backup from somewhere</span>
<span style="color:#9966CC; font-weight:bold;">unless</span> <span style="color:#CC0066; font-weight:bold;">system</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;cp #{$BACKUP_LOCATION}#{$BACKUP_FILENAME} ./ &quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
 mailer.<span style="color:#9900CC;">sad_mail</span>  <span style="color:#996600;">&quot;Something went wrong while copying the backup, exiting...&quot;</span>
 <span style="color:#CC0066; font-weight:bold;">exit</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
<span style="color:#008000; font-style:italic;"># 2) Dump old tables</span>
<span style="color:#9966CC; font-weight:bold;">unless</span> <span style="color:#CC0066; font-weight:bold;">system</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;mysql --silent --skip-column-names -u #{$USERNAME} --password=<span style="color:#000099;">\&quot;</span>#{$PASSWORD}<span style="color:#000099;">\&quot;</span> #{$DATABASE} -e <span style="color:#000099;">\&quot;</span>show tables<span style="color:#000099;">\&quot;</span> | gawk '{print <span style="color:#000099;">\&quot;</span>drop table <span style="color:#000099;">\&quot;</span> $1 <span style="color:#000099;">\&quot;</span>;<span style="color:#000099;">\&quot;</span>}' | mysql -u #{$USERNAME} --password=<span style="color:#000099;">\&quot;</span>#{$PASSWORD}<span style="color:#000099;">\&quot;</span> #{$DATABASE}&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  mailer.<span style="color:#9900CC;">sad_mail</span> <span style="color:#996600;">&quot;Couldn't drop tables, exitings..&quot;</span>  
  <span style="color:#CC0066; font-weight:bold;">exit</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
<span style="color:#008000; font-style:italic;"># 3) Import new database</span>
<span style="color:#9966CC; font-weight:bold;">unless</span> <span style="color:#CC0066; font-weight:bold;">system</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;zcat #{$BACKUP_FILENAME} | mysql -u #{$USERNAME} --password=#{$PASSWORD} #{$DATABASE}&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  mailer.<span style="color:#9900CC;">sad_mail</span> <span style="color:#996600;">&quot;Couldn't import tables, exiting..&quot;</span>
  <span style="color:#CC0066; font-weight:bold;">exit</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
<span style="color:#008000; font-style:italic;"># 4) Everything went a-ok!</span>
mailer.<span style="color:#9900CC;">happy_mail</span></pre></div></div>

<p>I wrote a tiny mail script to go with the syncer so I know of everything is working or not.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">class</span> SimpleMailer
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'net/smtp'</span>
  attr_accessor <span style="color:#ff3333; font-weight:bold;">:email_from</span>, <span style="color:#ff3333; font-weight:bold;">:email_to</span>
&nbsp;
  <span style="color:#9966CC; font-weight:bold;">def</span> initialize<span style="color:#006600; font-weight:bold;">&#40;</span>email_from, email_to<span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#0066ff; font-weight:bold;">@email_from</span>, <span style="color:#0066ff; font-weight:bold;">@email_to</span> = email_from, email_to
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  <span style="color:#9966CC; font-weight:bold;">def</span> happy_mail
    message = <span style="color:#006600; font-weight:bold;">&lt;&lt;</span>MSG
From: <span style="color:#008000; font-style:italic;">#{@email_from}</span>
To: <span style="color:#008000; font-style:italic;">#{@email_to}</span>
Subject: Succesfully synced database
On <span style="color:#008000; font-style:italic;">#{Time.now.strftime(&quot;%d-%m-%Y %H:%M&quot;)} the staging database was successfully synced.</span>
MSG
    mail<span style="color:#006600; font-weight:bold;">&#40;</span>message<span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  <span style="color:#9966CC; font-weight:bold;">def</span> sad_mail<span style="color:#006600; font-weight:bold;">&#40;</span>problem<span style="color:#006600; font-weight:bold;">&#41;</span>
    message = <span style="color:#006600; font-weight:bold;">&lt;&lt;</span>MSG
From: <span style="color:#008000; font-style:italic;">#{@email_from}</span>
To: <span style="color:#008000; font-style:italic;">#{@email_to}</span>
Subject: Problem syncing database
On <span style="color:#008000; font-style:italic;">#{Time.now.strftime(&quot;%d-%m-%Y %H:%M&quot;)} the staging database was NOT synced!</span>
Problem: <span style="color:#008000; font-style:italic;">#{problem}</span>
MSG
    mail<span style="color:#006600; font-weight:bold;">&#40;</span>message<span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  <span style="color:#9966CC; font-weight:bold;">def</span> mail<span style="color:#006600; font-weight:bold;">&#40;</span>message<span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#6666ff; font-weight:bold;">Net::SMTP</span>.<span style="color:#9900CC;">start</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'crunch1.c1.noxa.nl'</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>smtp<span style="color:#006600; font-weight:bold;">|</span>
        smtp.<span style="color:#9900CC;">send_message</span> message, <span style="color:#0066ff; font-weight:bold;">@email_from</span>, <span style="color:#0066ff; font-weight:bold;">@email_to</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://weblog.brightlight-ict.nl/2009/01/50/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unattended Passenger / Ruby Enterprise Installation on Ubuntu 8</title>
		<link>http://weblog.brightlight-ict.nl/2008/12/unattended-passenger-ruby-enterprise-installation-on-ubuntu-8/</link>
		<comments>http://weblog.brightlight-ict.nl/2008/12/unattended-passenger-ruby-enterprise-installation-on-ubuntu-8/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 20:31:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://weblog.brightlight-ict.nl/?p=47</guid>
		<description><![CDATA[[update @ 15-03-09]
Updated the script to use the latest passenger 2.1.2 and the lastest version of Ruby Enterprise. Also made a few changes as suggested in the comments, thanks guys!
I needed a small project that I could use to learn some basic bash scripting. Since I like automating things a unattended passenger installation seemed like [...]]]></description>
			<content:encoded><![CDATA[<p><strong>[update @ 15-03-09]</strong><br />
Updated the script to use the latest passenger 2.1.2 and the lastest version of Ruby Enterprise. Also made a few changes as suggested in the comments, thanks guys!</p>
<p>I needed a small project that I could use to learn some basic bash scripting. Since I like automating things a unattended passenger installation seemed like a cool thing. It&#8217;s far from perfect but it gets the job done. (on Ubuntu 8.04/8.10 at least). </p>
<p>Feel free to post any improvements you may have.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #666666; font-style: italic;">#!/bin/bash</span>
<span style="color: #666666; font-style: italic;"># Unattended REE/Passenger installation</span>
<span style="color: #666666; font-style: italic;"># Source: http://weblog.brightlight-ict.nl/2008/12/unattended-passenger-ruby-enterprise-installation-on-ubuntu-8/</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$(whoami)</span>&quot;</span> <span style="color: #000000; font-weight: bold;">!</span>= <span style="color: #ff0000;">&quot;root&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;You need to be root to run this!&quot;</span>
  <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">2</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #007800;">VERSION</span>=<span style="color: #ff0000;">&quot;1.2&quot;</span>
<span style="color: #007800;">REEV</span>=<span style="color: #ff0000;">&quot;http://rubyforge.org/frs/download.php/51100/ruby-enterprise-1.8.6-20090201.tar.gz&quot;</span>
<span style="color: #007800;">REEF</span>=<span style="color: #ff0000;">&quot;ruby-enterprise-1.8.6-20090201.tar.gz&quot;</span>
<span style="color: #007800;">REEFF</span>=<span style="color: #800000;">${REEF%&quot;.tar.gz&quot;}</span>
<span style="color: #007800;">PASSENGER</span>=<span style="color: #ff0000;">&quot;2.1.2&quot;</span>
<span style="color: #7a0874; font-weight: bold;">export</span> PASSENGER
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;#####################################&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Welcome, let's get this party rollin'&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;#####################################&quot;</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Updating Aptitude&quot;</span>
<span style="color: #c20cb9; font-weight: bold;">apt-get</span> update
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Installing build essentials&quot;</span>
<span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> build-essential zlib1g-dev libssl-dev <span style="color: #c20cb9; font-weight: bold;">wget</span> libreadline5-dev <span style="color: #660033;">-y</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Installing GIT&quot;</span>
<span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #660033;">-y</span> git-core
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Installing apache&quot;</span>
<span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #660033;">-y</span> apache2
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Installing apache headers&quot;</span>
<span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #660033;">-y</span> apache2-prefork-dev
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Installing Ruby Enterprise from following url&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$REEV</span>
<span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #007800;">$REEV</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-e</span> <span style="color: #007800;">$REEF</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #000000; font-weight: bold;">then</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;File downloaded succesful&quot;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">else</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Error, file wasn't downloaded!&quot;</span>
  <span style="color: #7a0874; font-weight: bold;">exit</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-zxvf</span> <span style="color: #007800;">$REEF</span>
<span style="color: #666666; font-style: italic;"># possible options perhaps for checker</span>
<span style="color: #666666; font-style: italic;"># --extra rails --no-tcmalloc</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-d</span> .<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$REEFF</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #000000; font-weight: bold;">then</span>
   .<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$REEFF</span><span style="color: #000000; font-weight: bold;">/</span>installer <span style="color: #660033;">--auto</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>ruby
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Dir test&quot;</span>
<span style="color: #000000; font-weight: bold;">else</span>
  <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Dir not found, exiting..&quot;</span>
  <span style="color: #7a0874; font-weight: bold;">exit</span>
<span style="color: #000000; font-weight: bold;">fi</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Creating ruby symlinks&quot;</span>
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>ruby<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>ruby <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>ruby
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>ruby<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>gem <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>gem
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>ruby<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>rake <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>rake
<span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>ruby<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>rails <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>rails
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Installing other gems&quot;</span>
gem <span style="color: #c20cb9; font-weight: bold;">install</span> rails
gem <span style="color: #c20cb9; font-weight: bold;">install</span> will_paginate
gem <span style="color: #c20cb9; font-weight: bold;">install</span> shoulda
gem <span style="color: #c20cb9; font-weight: bold;">install</span> mysql
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Installing passenger&quot;</span>
gem <span style="color: #c20cb9; font-weight: bold;">install</span> passenger <span style="color: #660033;">-v</span>=<span style="color: #007800;">$PASSENGER</span>
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Config passenger&quot;</span>
<span style="color: #c20cb9; font-weight: bold;">yes</span> <span style="color: #ff0000;">''</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>ruby<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>passenger-install-apache2-module
&nbsp;
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Copying passenger files&quot;</span>
<span style="color: #c20cb9; font-weight: bold;">touch</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>mods-available<span style="color: #000000; font-weight: bold;">/</span>passenger.load
<span style="color: #c20cb9; font-weight: bold;">touch</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>mods-available<span style="color: #000000; font-weight: bold;">/</span>passenger.conf
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;LoadModule passenger_module /opt/ruby/lib/ruby/gems/1.8/gems/passenger-<span style="color: #007800;">$PASSENGER</span>/ext/apache2/mod_passenger.so&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>mods-available<span style="color: #000000; font-weight: bold;">/</span>passenger.load
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;PassengerRoot /opt/ruby/lib/ruby/gems/1.8/gems/passenger-<span style="color: #007800;">$PASSENGER</span> 
PassengerRuby /opt/ruby/bin/ruby&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>mods-available<span style="color: #000000; font-weight: bold;">/</span>passenger.conf
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Enabling passenger module&quot;</span>
a2enmod passenger
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Reloading apache&quot;</span>
<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 reload
&nbsp;
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;##########################&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;# Installation Complete&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;##########################&quot;</span>
<span style="color: #c20cb9; font-weight: bold;">sleep</span> <span style="color: #000000;">2</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;##########################&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;# Installed Ruby Version #&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;##########################&quot;</span>
ruby <span style="color: #660033;">-v</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;##########################&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;# Installed Gems Version #&quot;</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;##########################&quot;</span>
gem <span style="color: #660033;">-v</span>
<span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span>ruby<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>passenger-status</pre></div></div>

<p>You can find the <a href="http://gist.github.com/37213" onclick="javascript:pageTracker._trackPageview('/outbound/article/gist.github.com');">gist</a> here</p>
]]></content:encoded>
			<wfw:commentRss>http://weblog.brightlight-ict.nl/2008/12/unattended-passenger-ruby-enterprise-installation-on-ubuntu-8/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Some small updates</title>
		<link>http://weblog.brightlight-ict.nl/2008/08/some-small-updates/</link>
		<comments>http://weblog.brightlight-ict.nl/2008/08/some-small-updates/#comments</comments>
		<pubDate>Sat, 30 Aug 2008 10:24:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://weblog.brightlight-ict.nl/?p=37</guid>
		<description><![CDATA[My mother used to say &#8220;He who doesn&#8217;t appreciate the little things, isn&#8217;t worth the big things&#8221;. So be happy and perhaps bigger things lay ahead. That being said I&#8217;ve rolled out a few small changes today.
- You can now see which users uploaded a project as long as that person had an account during [...]]]></description>
			<content:encoded><![CDATA[<p>My mother used to say &#8220;He who doesn&#8217;t appreciate the little things, isn&#8217;t worth the big things&#8221;. So be happy and perhaps bigger things lay ahead. That being said I&#8217;ve rolled out a few small changes today.</p>
<p>- You can now see which users uploaded a project as long as that person had an account during the time he uploaded.<br />
- It now shows how many times a project has been downloaded.<br />
- There is a new tab on the frontpage with the &#8220;Top Users&#8221;. &#8220;Top Uploaders&#8221; could have been a better name but the tab is too small. It shows the top 5 users who uploaded the most projects.</p>
<p>That&#8217;s all folks!</p>
]]></content:encoded>
			<wfw:commentRss>http://weblog.brightlight-ict.nl/2008/08/some-small-updates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Screenshots gives me headaches</title>
		<link>http://weblog.brightlight-ict.nl/2008/08/screenshots-gives-me-headaches/</link>
		<comments>http://weblog.brightlight-ict.nl/2008/08/screenshots-gives-me-headaches/#comments</comments>
		<pubDate>Thu, 28 Aug 2008 17:14:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[DStillery]]></category>
		<category><![CDATA[Layout]]></category>

		<guid isPermaLink="false">http://weblog.brightlight-ict.nl/?p=31</guid>
		<description><![CDATA[I&#8217;m fighting a war against the evil that is screenshots, and I am losing&#8230;
I&#8217;m having some major problems with the screenshots in The DStillery&#8217;s gallery. That&#8217;s why today I made the decision that all project screenshots on the front page will be stretched (if they do not meet the requirements) to a resolution of 256&#215;384 [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m fighting a war against the evil that is screenshots, and I am losing&#8230;</p>
<p>I&#8217;m having some major problems with the screenshots in <a href="http://dstillery.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/dstillery.com');">The DStillery&#8217;s</a> gallery. That&#8217;s why today I made the decision that all project screenshots on the front page will be stretched (if they do not meet the requirements) to a resolution of 256&#215;384 (a standard ds screenshot resolution). So no more distorted screenshots on the frontpage as long as you upload a normal ds screenshot.<br />
If anyone out there can make it so that no matter what resolution the screenshots are in, the boxes containing them will still be the same size, please do! Because I just can&#8217;t seem to make it work.</p>
<p>Thanks to James I discovered my site looks totally bullocks in Internet Explorer 7 (and 6 for that matter but I think only my grandma uses that ancient thing), I&#8217;ve made some changes that should <del datetime="2008-08-28T18:25:25+00:00">make it somewhat better</del> but for The Full DStillery experience(™) please turn to Firefox.<br />
<strong>Edit</strong>: Nevermind, still not working correctly in IE7&#8230;it will probably look messed up till the weekend, so little time, so much too do!</p>
]]></content:encoded>
			<wfw:commentRss>http://weblog.brightlight-ict.nl/2008/08/screenshots-gives-me-headaches/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Capistrano and Glassfish</title>
		<link>http://weblog.brightlight-ict.nl/2008/08/capistrano-and-glassfish/</link>
		<comments>http://weblog.brightlight-ict.nl/2008/08/capistrano-and-glassfish/#comments</comments>
		<pubDate>Tue, 26 Aug 2008 11:51:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Capistrano]]></category>
		<category><![CDATA[Glassfish]]></category>
		<category><![CDATA[JRuby]]></category>

		<guid isPermaLink="false">http://weblog.brightlight-ict.nl/?p=28</guid>
		<description><![CDATA[There is enough documentation when it comes to installing JRuby and Glassfish. What was lacking was a simple capistrano recipe to get you started, let&#8217;s get cracking.

1
2
3
4
5
6
7
namespace :app do
  desc &#34;Warble and Deploy&#34;
  task :warble_and_deploy , :roles =&#62; &#91;:app&#93; do
    run &#34;cd #{release_path}/ &#38;&#38; warble&#34;
    run &#34;/bin/asadmin [...]]]></description>
			<content:encoded><![CDATA[<p>There is enough documentation when it comes to installing JRuby and Glassfish. What was lacking was a simple capistrano recipe to get you started, let&#8217;s get cracking.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="ruby" style="font-family:monospace;">namespace <span style="color:#ff3333; font-weight:bold;">:app</span> <span style="color:#9966CC; font-weight:bold;">do</span>
  desc <span style="color:#996600;">&quot;Warble and Deploy&quot;</span>
  task <span style="color:#ff3333; font-weight:bold;">:warble_and_deploy</span> , <span style="color:#ff3333; font-weight:bold;">:roles</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:app</span><span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
    run <span style="color:#996600;">&quot;cd #{release_path}/ &amp;&amp; warble&quot;</span>
    run <span style="color:#996600;">&quot;/bin/asadmin deploy --user admin --virtualservers #{virtual_server} --passwordfile /home/rails/passwordfile --contextroot / #{release_path}/#{warfile_name}&quot;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></td></tr></table></div>

<p>Now, that doesn&#8217;t look so hard does it? The recipe makes a few assumptions. First you will need to create a asadmin password file. To do so make a simple textfile with a simple string: &#8220;AS_ADMIN_PASSWORD=ieathashbrowniesonce&#8221;. The second thing is that we assume that your capistrano user has rights to access the warble gem.<br />
Now all that is left is to define two extra capistrano variables. virtual_server is the virtualserver that your application is attached to and warfile_name the name of the warfile you are trying to deploy (as configured in your warble.rb file).<br />
I&#8217;m not sure if this is actually the best way to deploy on glassfish using capistrano so if you know a better way please let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://weblog.brightlight-ict.nl/2008/08/capistrano-and-glassfish/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The DStillery is open!</title>
		<link>http://weblog.brightlight-ict.nl/2008/08/the-dstillery-is-open/</link>
		<comments>http://weblog.brightlight-ict.nl/2008/08/the-dstillery-is-open/#comments</comments>
		<pubDate>Mon, 25 Aug 2008 11:40:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[DStillery]]></category>

		<guid isPermaLink="false">http://weblog.brightlight-ict.nl/?p=15</guid>
		<description><![CDATA[When you&#8217;re reading this that must mean The DStillery has officially opened, welcome!
I got my shiny black Nintendo DS a few weeks back. Before that I always hijacked my girlfriend&#8217;s DS but sitting on the public transport with a pink DS just go a bit weird when I received Guitar Hero. A pink DS is [...]]]></description>
			<content:encoded><![CDATA[<p>When you&#8217;re reading this that must mean <a href="http://dstillery.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/dstillery.com');">The DStillery</a> has officially opened, welcome!</p>
<p>I got my shiny black Nintendo DS a few weeks back. Before that I always hijacked my girlfriend&#8217;s DS but sitting on the public transport with a pink DS just go a bit weird when I received Guitar Hero. A pink DS is one thing, hitting your DS like a madman while ranting lyrics become really awkward so that&#8217;s why I finally bought one for myself. With my DS came a DSTT and since a DSTT is not so fun empty I decided to look around for some good homebrew. But the homebrew out there was like my heart after my first ex-girlfriend was done with it, scattered all over the place.</p>
<p>Around the same time I came across a great piece of open source software by <a href="http://railsjedi.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/railsjedi.com');">RailsJedi</a> called <a href="http://www.opensourcerails.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.opensourcerails.com');">opensourcerails</a>. The software powers a software gallery by the same name filled with Ruby on Rails projects. This would be perfect for a DS homebrew site! I made some minor modifications to the code, registered myself a fancy webdomain and filled it up so it wouldn&#8217;t be completely empty and this is where you come in. Every users/developer of DS homebrew is welcome to upload the games / applications they enjoy and host them here on The DStillery. Let&#8217;s take a look at some of the feautures.</p>
<ul>
<li>You can create projects</li>
<li>Upload multiple screenshots for a project</li>
<li>Upload multiple versions for a project</li>
<li>Tag a project</li>
<li>Leave comments</li>
<li>See the number of downloads for a project</li>
<li>Rate projects</li>
<li>Bookmark projects</li>
</ul>
<p>And the best thing is you don&#8217;t even need to create an account to do all these things! So show me you guys can handle that responsibility. The adjustments I made to the code are open source too so if you want to help out coding new features or just use it for your own projects please do.</p>
<p>My heart is all in one place again, let&#8217;s try to do the same for all that great homebrew out there.</p>
<p>Maran</p>
<p>ps. If you are the author of one of the projects listed on The DStillery and want admin access over your project, register a user and then email us here  and we&#8217;ll grant you project ownership access.</p>
]]></content:encoded>
			<wfw:commentRss>http://weblog.brightlight-ict.nl/2008/08/the-dstillery-is-open/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Hello world!</title>
		<link>http://weblog.brightlight-ict.nl/2008/08/hello-world/</link>
		<comments>http://weblog.brightlight-ict.nl/2008/08/hello-world/#comments</comments>
		<pubDate>Mon, 18 Aug 2008 12:29:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Public Service Announcement]]></category>

		<guid isPermaLink="false">http://weblog.brightlight-ict.nl/?p=1</guid>
		<description><![CDATA[Hand me some cake it&#8217;s time to celebrate; an other incarnation of my weblog is live. This time it will be a bit more work related and fully english.





]]></description>
			<content:encoded><![CDATA[<p>Hand me some cake it&#8217;s time to celebrate; an other incarnation of my weblog is live. This time it will be a bit more work related and fully english.</p>
<div class="mceTemp">
<dl class="wp-caption alignnone" style="width: 376px;">
<dt class="wp-caption-dt"><img title="Yes, this is a portal reference." src="http://www.farlops.com/images/cake.jpg" alt="Yes, this is a portal reference." width="366" height="372" /></dt>
</dl>
</div>
]]></content:encoded>
			<wfw:commentRss>http://weblog.brightlight-ict.nl/2008/08/hello-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
