<?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>FamousPhil.com Admin Blog and More &#187; My Site</title>
	<atom:link href="http://famousphil.com/blog/category/my-site/feed/" rel="self" type="application/rss+xml" />
	<link>http://famousphil.com</link>
	<description>My Personal Blog</description>
	<lastBuildDate>Mon, 06 Feb 2012 01:40:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Happy New Year &#8211; 2011 Best/Worst Videos/Moments</title>
		<link>http://famousphil.com/blog/2011/12/happy-new-year-2011-bestworst-videosmoments/</link>
		<comments>http://famousphil.com/blog/2011/12/happy-new-year-2011-bestworst-videosmoments/#comments</comments>
		<pubDate>Sat, 31 Dec 2011 22:15:47 +0000</pubDate>
		<dc:creator>Famous Phil</dc:creator>
				<category><![CDATA[My Site]]></category>
		<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://famousphil.com/?p=1619</guid>
		<description><![CDATA[Phil releases his third? annual blog detailing accomplishments in 2011 and posts some of the more memorable videos of the year from YouTube.]]></description>
			<content:encoded><![CDATA[<p>It’s now time for the third(?) annual best/worst moments that I’ve made note of over the past year of my life.  Unlike previous years where I threw things together at the last minute, this year, some (limited) advanced planning was made for this blog.  Hopefully in future years, additional planning will make this traditional post actually worth reading.  For this year, nonetheless, you’re going to have to suffer with the traditional thrown together at the last minute effect… <img src='http://famousphil.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>This year started like many others that I’ve had, a new season of learning (at college) and a bunch of side projects that never seemed to take off the ground where they were conceived.  As the year progressed, I started looking into my future and applied to several top technology companies, got several callbacks, and turned down several offers.  I finally found an offer that I could live with in New York City in July and I quickly relocated, but not before I got my two college degrees in Computer Science (both an MS, and a BS).  If there is one major thing I learned about the job market, Computer Science is a very valuable degree to have, but you still have to be persistent to land the job that you want!</p>
<p>Over the past year in my current job, I’ve been working on two major projects, one which is a social clothing site, <a href="http://www.wearingsocial.com/">www.wearingsocial.com</a> which was finished back in August with about 2 weeks of effort.  The other more potent project is <a href="http://www.unroll.me/">www.unroll.me</a>, which is currently in a limited beta testing stage, it has gotten press on life hacker among other sites.  Unroll.me is an email scanning engine that finds subscriptions in your email inbox and automatically clicks the unsubscribe link (or numerous other methods that can be used to unsubscribe).  At this point in time, as its primary algorithm developer, I’d say that it is very accurate(90%+) in detecting unsubscribe emails and links, and it is fairly good (70%+) at actually unsubscribing from those emails.  For the abilities of computers, and how many exceptions that I’ve written into the application, I’m personally very impressed at its abilities to find and unsubscribe from those nasty subscription emails!  Of course, this application is constantly being improved by myself and others to ensure that it becomes much better than it currently is!</p>
<p>Now for something that I’ve been very quiet about over the past 6 months: On my own, I’ve been working on a new application that basically wakes me up in the morning.  I find that my view of the outside world isn’t very good in the morning, and I always end up forgetting my umbrella, etc when leaving for work.  So I’ve been developing an application in my spare time that can call my phone (landline, cellphone, etc) and tell me what time it is and give me a quick overview of today’s weather so that I can realize I need to bring an umbrella, dress up, etc.  Once the initial version is released, I will consider adding abilities to connect to an email todo list, calendar, etc and read appointments off, similar to Apple’s Siri for iPhone.  Of course, other ideas will also be welcome to those who want to use this application.  The application is complete functionally, but is still waiting on its design which should be done within the next month, once it’s done; I will be releasing it here on FamousPhil.com and Matthouse.us.  Of course, you can always check the project’s website to see if it is released: <a href="http://www.personalwakeup.com/">http://www.personalwakeup.com</a>.</p>
<p>Finally, unless it is raining after 8pm EST, I will be attending the NYC Times Square New Years celebration with friends.</p>
<p>So with not much more to say, now for my traditional videos highlighting the best/worst YouTube videos of the year 2011!  As always, thanks for reading, and here is to a very good new year!  Welcome to 2012!</p>
<p><strong>Here is a list of memorable videos</strong> (unfortunately, embedding is disabled on most videos now so I&#8217;ve provided links):</p>
<p>Oh the places you&#8217;ll (Actually) go: <a href="http://www.youtube.com/watch?v=wIP8lFWa_mg">http://www.youtube.com/watch?v=wIP8lFWa_mg<br />
</a>Rescue Japan: <a href="http://www.youtube.com/watch?v=pk7fBLuLj5I&amp;NR=1&amp;feature=fvwp">http://www.youtube.com/watch?v=pk7fBLuLj5I&amp;NR=1&amp;feature=fvwp<br />
</a>High School Sucks &#8211; The Musical: <a href="http://www.youtube.com/watch?v=GWy_uauR-6k&amp;hd=1">http://www.youtube.com/watch?v=GWy_uauR-6k&amp;hd=1<br />
</a>Homecoming Rally: <a href="http://www.youtube.com/watch?v=_GiaEs8Myfc&amp;hd=1">http://www.youtube.com/watch?v=_GiaEs8Myfc&amp;hd=1<br />
</a>The Stereotypes Song: <a href="http://www.youtube.com/watch?v=wCgx8zM3woQ&amp;feature=relmfu">http://www.youtube.com/watch?v=wCgx8zM3woQ&amp;feature=relmfu<br />
</a>Gabriel Iglaeseas- Krispy Kreme Doughnuts: <a href="http://www.youtube.com/watch?v=a77Dw3tNv8o">http://www.youtube.com/watch?v=a77Dw3tNv8o<br />
</a>Adele &#8211; Someone Like You &#8211; Piano By Ear: <a href="http://www.youtube.com/watch?v=y8b4_kGuj7k&amp;feature=related">http://www.youtube.com/watch?v=y8b4_kGuj7k&amp;feature=related<br />
</a>I can&#8217;t remember if I posted this last year, but I really like it: Stand by Me | Playing for Change &#8211; Song around the world: <a href="http://www.youtube.com/watch?v=Us-TVg40ExM&amp;feature=relmfu">http://www.youtube.com/watch?v=Us-TVg40ExM&amp;feature=relmfu</a></p>
<p>And who can forget the worst video of the year, it originally had millions of dislikes until it was taken down and moved to another account to soften the dislikes:<br />
Rebecca Black &#8211; Friday: <a href="http://www.youtube.com/watch?v=kfVsfOSbJY0">http://www.youtube.com/watch?v=kfVsfOSbJY0</a></p>
<p>Jibjab&#8217;s video this year was mediocre, but I&#8217;ll post the link anyways: <a href="http://www.youtube.com/watch?v=2zls4Ao3GyM">http://www.youtube.com/watch?v=2zls4Ao3GyM</a></p>
]]></content:encoded>
			<wfw:commentRss>http://famousphil.com/blog/2011/12/happy-new-year-2011-bestworst-videosmoments/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Degree is Real!</title>
		<link>http://famousphil.com/blog/2011/09/my-degree-is-real/</link>
		<comments>http://famousphil.com/blog/2011/09/my-degree-is-real/#comments</comments>
		<pubDate>Sat, 01 Oct 2011 03:16:16 +0000</pubDate>
		<dc:creator>Famous Phil</dc:creator>
				<category><![CDATA[My Site]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Student Life]]></category>
		<category><![CDATA[Bachelors]]></category>
		<category><![CDATA[computer science]]></category>
		<category><![CDATA[degree]]></category>
		<category><![CDATA[Masters]]></category>
		<category><![CDATA[Phiip Matuskiewicz]]></category>
		<category><![CDATA[science]]></category>

		<guid isPermaLink="false">http://famousphil.com/?p=1389</guid>
		<description><![CDATA[Phil shares photos of his college degree.]]></description>
			<content:encoded><![CDATA[<p>I typically don&#8217;t post more personal things on my website, but my college degree is one of the few exceptions that I was considering posting (depending on what information it gives away).  Surprisingly, my degree doesn&#8217;t reveal much of anything that you couldn&#8217;t find out about me by looking at my resume or just my website&#8217;s WHOIS information, so I decided that I&#8217;d post a picture of the two sheets of paper that cost oh so much money to buy. A lot of hard work went into these two sheets of paper, so I&#8217;m very proud of them and my accomplishments and pain that they represent <img src='http://famousphil.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I felt that they deserved their own blog post <img src='http://famousphil.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  If you&#8217;re curious, my major is Computer Science, with a concentration in High Throughput Computing for my Masters.</p>

<a href='http://famousphil.com/blog/2011/09/my-degree-is-real/imag1131/' title='IMAG1131'><img width="150" height="150" src="http://famousphil.com/wp-content/uploads/2011/09/IMAG1131-150x150.jpg" class="attachment-thumbnail" alt="IMAG1131" title="IMAG1131" /></a>
<a href='http://famousphil.com/blog/2011/09/my-degree-is-real/imag1132/' title='IMAG1132'><img width="150" height="150" src="http://famousphil.com/wp-content/uploads/2011/09/IMAG1132-150x150.jpg" class="attachment-thumbnail" alt="IMAG1132" title="IMAG1132" /></a>

]]></content:encoded>
			<wfw:commentRss>http://famousphil.com/blog/2011/09/my-degree-is-real/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Installing Gitorious on CentOS 5.6 x64</title>
		<link>http://famousphil.com/blog/2011/06/installing-gitorious-on-centos-5-6-x64/</link>
		<comments>http://famousphil.com/blog/2011/06/installing-gitorious-on-centos-5-6-x64/#comments</comments>
		<pubDate>Fri, 03 Jun 2011 22:07:53 +0000</pubDate>
		<dc:creator>Famous Phil</dc:creator>
				<category><![CDATA[Hosting / Server Administration]]></category>
		<category><![CDATA[My Site]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[gitorious]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[openvz]]></category>
		<category><![CDATA[vps]]></category>
		<category><![CDATA[Xen]]></category>

		<guid isPermaLink="false">http://famousphil.com/?p=801</guid>
		<description><![CDATA[Phil provides a tutorial for installing Gitorious on CentOS 5.6 X64 (under OpenVZ).  He explains the difficulty of installing and maintaining this software.]]></description>
			<content:encoded><![CDATA[<p>There are many reasons why you might be reading this post, but likely, you’re trying to figure out how to install this complex heap of code (that has its root node removed, no doubt, ha ha).  If you didn’t get my last joke, I feel sorry for you, but the show must go on.</p>
<p>Gitorious is an open source repository management system similar to Trac on SVN.  The software looks really nice (gitorious.org), and it has a lot of built in features for managing git repositories.  For those of you who are not familiar with coding, code repositories are often set up to enable many coders to work on the same project simultaneously (different portions of course).  Repositories also enable versioning so that you can easily revert to an older copy of your code base if something breaks along the way.  Repositories are often centralized so that only a single location has to be backed up, in this case Gitorious centralizes git repositories.</p>
<p>Truthfully, there are three memorable software programs that have been notoriously difficult to install and configure in my experience, these are as follows:</p>
<ul>
<li>Shibboleth- I never did successfully install this myself, this was because I was asked to help a friend install it over the phone.  I don’t work well when I can’t see the problem and play with stuff, I test hunches, and doing it with this method would have taken way too long.  From what I’ve seen of Shibboleth, I would rate this as worst of the worst programs to install.</li>
<li>Gitorious – This is probably the second worst application I’ve ever installed.  It required a lot of research and resources since it is poorly documented and requires a lot of Ruby Gems to operate successfully.  Of course, I will hopefully document it a little more today!</li>
<li>Exchange – I wish I would have documented the install of my Exchange server internally so I could have shared it here.  Exchange isn’t awful to install, but the configuration of Exchange is very tricky and there are many gotchas.  This is why I place it as the best of the worst software programs to install.</li>
</ul>
<p>With all of the above said, the installation process of gitorious isn’t for the leisure system administrator to install.  This took me approximately 3 days of research to successfully install and understand.  I installed it on a separate system only because I didn’t want it hurting any of my existing production systems.  In the end, I’m glad I did this because I learned that Ruby isn’t very memory efficient and this application easily eats up most of the 1GB of ram allocated to it in a VPS (Virtual Private Server).  And with this said, I invite you to continue reading if you really want to know how to install this software.</p>
<p>Update 6/14: After a few requests, I&#8217;ve decided that I will provide a Gitorious installation service on your CentOS server.  I will be happy to install Gitorious and make it work (as described below) for a one time paypal payment of $100.  For details, contact me directly (see my contact page).</p>
<p><strong>LAST UPDATE: 6/8/2011 &#8211; Suggestions from<a href="http://groups.google.com/group/gitorious/browse_thread/thread/5bb8b2a6f0a2d645"> Gitorious Discussion Group</a></strong></p>
<p><span id="more-801"></span></p>
<p>Before I begin, I’d like to note that although I used OpenVZ for my deployment of Gitorious, it should work on Xen and other platforms  (even dedicated servers).  I say should because I originally deployed this on Amazon Web Services, and the installation process had a few changes here and there (due to errors with package dependencies, etc) when I finally moved it over to OpenVZ.  The procedure below was used for an OpenVZ machine as detailed below.  Finally, my last note is that you can expect this installation process to take roughly an hour or two to complete as a lower bound (provided everything goes well).</p>
<p>I decided to use a VPS from <a href="http://chicagovps.net/">chicagovps</a> to host this software program because of a good past experience with them.  Although<strong> </strong>I normally bash OpenVZ virtualization (with really good reasons because Xen is better), I chose to use OpenVZ since it is typically faster and I wanted performance.  OpenVZ doesn’t have swap space, and its memory management isn’t that great, so in the end, applications can use almost 3x the amount of memory on OpenVZ VPS containers compared to running on equivalent Xen containers.  I can easily see Xen requiring less than 384MB of dedicated Ram for Gitorious.  On OpenVZ, I strongly suggest not getting less than 1GB of dedicated memory.  With ChicagoVPS, I got the professional package, and my memory usage hovers around 800MB for this install.  For the Operating System, I chose the CentOS 5.5 x64 template and using yum update, the operating system became CentOS 5.6.  Everything below is performed as root unless otherwise noted.</p>
<p>The first thing that I did was set my DNS to have 2 A-records pointing to the hostname of my server (string.matthouse.us), and another that points to the future Gitorious website URL (git.matthouse.us).  After that was done, I logged into the VPS and set up public keys for the root account to make logging into the machine easier in the future.  I’ve written two blogs about public key authentication, so I won’t detail this portion of the process (that’s optional anyways).  I’d also recommend setting up a secure root password (also mentioned sometime in the past).</p>
<p>Next, I’d recommend disabling SELinux if it is enabled, thankfully, on VPS nodes, its typically disabled out of the box.  If you’re on Xen, you might want to make and enable a swap file (which I detailed on my AWS install of Tomcat blog).  The next step is to execute the following commands, which remove common packages that you won’t need and turn off common services which you won’t use.  In this stack of commands, you will also need to edit the SSH configuration to disable DNS lookups, which in my experience speeds up the login process to SSH by a lot!</p>
<pre class="brush: bash; title: ; notranslate">
yum remove -y samba-common bind-libs dnsmasq portmap postgresql-libs nscd
service atd stop
chkconfig atd off
service nfslock stop
chkconfig nfslock off
service rpcidmapd stop
chkconfig rpcidmapd off
service bluetooth stop
chkconfig bluetooth off
service anacron stop
chkconfig anacron off
service gpm stop
chkconfig gpm off
service hidd stop
chkconfig hidd off
service pcscd stop
chkconfig pcscd off
service portmap stop
chkconfig portmap off
service avahi-daemon stop
chkconfig avahi-daemon off
service pcscd stop
chkconfig pcscd off
service sendmail start
chkconfig sendmail on
vim /etc/ssh/sshd_config
#uncomment UseDNS and change to no
UseDNS no

service sshd restart
</pre>
<p>Next, we need to enable the RPMForge repository.  I enable the EPEL and REMI repositories later on, but at this point, if those are enabled, you will hit a certain known bug with MySQL that has yet to be fixed by CentOS.</p>
<pre class="brush: bash; title: ; notranslate">

http://rpmrepo.org/RPMforge/Using

wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm
rpm -ivh rpmforge-release-0.5.2-2.el5.rf.i386.rpm
</pre>
<p>Now lets update the system and install some required packages.  This should take roughly 10 or 15 minutes.</p>
<pre class="brush: bash; title: ; notranslate">
yum update -y
yum groupinstall -y &quot;Development tools&quot; &quot;Development Libraries&quot;
yum install -y git-core git-svn java-1.6.0-openjdk vim-* apg pcre pcre-devel zlib zlib-devel libyaml-devel GeoIP-devel sphinx mysql-devel mysql-server mysql
</pre>
<p>&nbsp;</p>
<p>At this point, I configure MySQL before adding other software that triggers bugs with its initial setup phase.</p>
<pre class="brush: bash; title: ; notranslate">
service mysqld start
/usr/bin/mysql_secure_installation
</pre>
<p>&nbsp;</p>
<p>In the secure installation, I set the root password of MySQL to something tricky and I answer yes to all of the prompts.</p>
<p>The next step is to add some configuration to the my.cnf file to minimize the footprint of MySQL (which will still use a lot of memory on OpenVZ).</p>
<pre class="brush: bash; title: ; notranslate">
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
old_passwords=1
max_connections = 5
key_buffer = 1K
read_buffer_size = 1K
max_allowed_packet = 512K
thread_stack = 16K
table_cache = 32
sort_buffer = 16K
net_buffer_length = 1K
thread_stack = 4K
query_cache_type = 1
query_cache_limit = 1K
query_cache_size = 1K
innodb_buffer_pool_size = 1K
innodb_additional_mem_pool = 1K
# Disabling symbolic-links is recommended to prevent assorted security risks;
# to do so, uncomment this line:
# symbolic-links=0
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
</pre>
<p>&nbsp;</p>
<p>At this point, lets restart mysql.</p>
<pre class="brush: bash; title: ; notranslate">
service mysqld restart
</pre>
<p>&nbsp;</p>
<p>Now let’s install Ruby Enterprise Edition.  The enterprise version of Ruby is still free, but it uses older, more stable components of Ruby, it’s also focused towards memory conservation (although it still compares to Java’s memory appetite).  I would strongly recommend not using any other version/distribution of Ruby since I found many compatibility errors that caused me to have to start all over again many times!  Remember that # is a comment and the command line will NOT process the command.</p>
<pre class="brush: bash; title: ; notranslate">
#- get latest stable ruby enterprise (the rubylang 1.9 branch will not work properly)
#-http://www.rubyenterpriseedition.com/download.html
wget http://rubyenterpriseedition.googlecode.com/files/ruby-enterprise-1.8.7-2011.03.tar.gz
tar xzf ruby-enterprise-1.8.7-2011.03.tar.gz
cd ruby-enterprise-1.8.7-2011.03
./installer
#(accept the defaults, 2 prompts will come up)
</pre>
<p>&nbsp;</p>
<p>Next, we need to configure ruby and path variables.  Follow the comments in my notes.</p>
<pre class="brush: bash; title: ; notranslate">
cd /opt
ln -s ruby-enterprise-1.8.7-2011.03 ruby
vim /etc/profile

#add the following to /etc/profile [ &quot;$EUID&quot; = &quot;0&quot; ]
pathmunge /opt/ruby/bin
export RAILS_ENV=production
export PATH=/usr/local/sphinx/bin:/usr/local/bin:$PATH
export _JAVA_OPTIONS=-Xmx64m
export MAGICK_HOME=/usr/local
export DYLD_LIBRARY_PATH=/usr/local/lib
</pre>
<p>&nbsp;</p>
<p>Strange enough, later on, another bug will surface where the profile isn’t read to setup these paths and options.  Therefore, I also added the following to my internal documentation install script.</p>
<pre class="brush: bash; title: ; notranslate">
vim /etc/bashrc
#add to the very bottom

pathmungea () {
                if ! echo $PATH | /bin/egrep -q &quot;(^|:)$1($|:)&quot; ; then
                        if [ &quot;$2&quot; = &quot;after&quot; ] ; then
                                PATH=$PATH:$1
                        else
                                PATH=$1:$PATH
                        fi
                fi
        }
pathmungea /opt/ruby/bin
export RAILS_ENV=production
export PATH=/usr/local/sphinx/bin:/usr/local/bin:$PATH
export _JAVA_OPTIONS=-Xmx64m
export MAGICK_HOME=/usr/local
export DYLD_LIBRARY_PATH=/usr/local/lib
unset pathmungea
</pre>
<p>&nbsp;</p>
<p>At this point, restart the shell that you’re in to pick up the new path information.  You might want to reboot, but that isn’t necessary at this point.  After the restart, we need to install ImageMagick.</p>
<pre class="brush: bash; title: ; notranslate">
#Imagemagick on yum is outdated, so a bug will show up if we don’t do this for now.
cd ~
yum install -y tcl-devel libpng-devel libjpeg-devel ghostscript-devel bzip2-devel freetype-devel libtiff-devel
#wget url to ImageMagick download
wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-6.7.0-2.tar.gz
tar xzf ImageMagick-6.7.0-2.tar.gz
cd ImageMagick-6.7.0-2
./configure --prefix=/usr/local --with-bzlib=yes --with-fontconfig=yes --with-freetype=yes --with-gslib=yes --with-gvc=yes --with-jpeg=yes --with-jp2=yes --with-png=yes --with-tiff=yes
make
make install
</pre>
<p>&nbsp;</p>
<p>Up next, we need to install some ruby gems.  This list isn’t comprehensive (there will be more to come later), but it will get us started.  I omitted mongrel as a webserver (which would come at this step according to other guides) because I intend on using Apache.  I also know that echoe, textpow, and oniguruma are either included or incompatible with this version of Ruby, so they were omitted.  I didn’t find any problems at the end without them, so I’m assuming they were extras.</p>
<p><strong>UPDATE 6/8: You probably don&#8217;t need to do this since bundle exec (below) will cover this for you.  You will need to run &#8220;gem install bundle&#8221; instead at this step.</strong></p>
<pre class="brush: bash; title: ; notranslate">
gem install sphinx rmagick ultrasphinx mime-types chronic ruby-hmac daemons mime-types BlueCloth ruby-yadis ruby-openid rspec rspec-rails RedCloth stompserver --no-ri --no-rdoc
</pre>
<p>&nbsp;</p>
<p>Now let’s add the extra repositories and fix some centos bugs.  Don’t worry if the packages aren’t found.</p>
<pre class="brush: bash; title: ; notranslate">
#fix some centos bugs:
yum remove perl-Net-SSLeay perl-IO-Socket-SSL

#install some repositories
wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm
</pre>
<p>&nbsp;</p>
<p>Finally, its time to move onto the installation of gitorious.  The su command will drop you into a shell owned by git (cool huh?).</p>
<pre class="brush: bash; title: ; notranslate">
useradd -d /home/git git

su git
cd ~
mkdir log
mkdir conf
git clone git://gitorious.org/gitorious/mainline.git gitorious
cd gitorious/
mkdir -p tmp/pids
exit
#(exit here will return to root)

ln -s /home/git/gitorious/script/gitorious /usr/local/bin/gitorious
cd /home/git/gitorious/
chmod ug+x script/*
chmod -R g+w config/ log/ public/ tmp/
</pre>
<p>&nbsp;</p>
<p>Next, we need to modify several files and begin preparing Gitorious to run.</p>
<p><strong>Update 6/8/11: When getting to the gem install portions, you probably only need to run the bundle commands, skipping the gem commands all together.</strong></p>
<pre class="brush: bash; title: ; notranslate">
su git

#modify each vim'd file appropriately

vim /home/git/gitorious/doc/templates/centos/git-daemon
RUBY_HOME=&quot;/opt/ruby&quot;
GITORIOUS_HOME=&quot;/home/git/gitorious&quot;

vim /home/git/gitorious/doc/templates/centos/git-ultrasphinx
GITORIOUS_HOME=&quot;/home/git/gitorious&quot;

vim /home/git/gitorious/doc/templates/centos/git-poller
RUBY_HOME=&quot;/opt/ruby&quot;
GITORIOUS_HOME=&quot;/home/git/gitorious&quot;
export _JAVA_OPTIONS=-Xmx64m

vim /home/git/gitorious/doc/templates/centos/stomp
RUBY_HOME=&quot;/opt/ruby&quot;
GEMS_HOME=&quot;/opt/ruby&quot;
GITORIOUS_HOME=&quot;/home/git/gitorious&quot;

exit  #return to root

#next as root:

gem install --no-ri --no-rdoc -v 1.5.0 json
gem install --no-ri --no-rdoc -v 1.3.1.1 rdiscount

cd /home/git/gitorious
bundle install
bundle exec rake gems:install

gem install --no-ri --no-rdoc -v 0.8.7 rake
gem install --no-ri --no-rdoc -v 1.1.0 daemons

gem uninstall rake -v 0.9.1
gem uninstall daemons -v 1.1.3

gem uninstall geoip
#select all

gem install --no-ri --no-rdoc -v 0.8.9 geoip
gem install --no-ri --no-rdoc -v 1.0 raspell

cp config/database.sample.yml config/database.yml
cp config/gitorious.sample.yml config/gitorious.yml
cp config/broker.yml.example config/broker.yml

su git
mkdir /home/git/data
mkdir /home/git/data/repositories
mkdir /home/git/data/tarballs
mkdir /home/git/data/tarball-work
chown -R git:git /home/git/data
#enable key management
mkdir /home/git/.ssh
chmod -R 700 /home/git/.ssh
touch /home/git/.ssh/authorized_keys
chmod 600 /home/git/.ssh/authorized_keys
chmod -R 700 /home/git/data
exit #back to root

#permissions fix:
chown -R git:git /home/git
chmod 711 /home/git
</pre>
<p>At this point, we need to make a secret cookie for a configuration file, make note of the output from this command.</p>
<pre class="brush: bash; title: ; notranslate">
apg -m 64
#sample output below, DON’T use it!
[root@string ~]# apg -m 64
SwouncievNivJucivrevnisfookEcnasiarHamgogdipmopyicbyctyikBagArim
gronugAmIsUkDifpoyftEggobviuzIpArgecHewElsOcubnuejEtDecerlyooHib
smivyecivfalakMarfAvikokip^ojyorwahonkIrEdeibZepbivsaftIdmapmic)
frivetcetEceivepJuxNeipnidzaroyffAgVevfuIvDesemAfyacAppAtdeavays
wenEjUcoofnafryefGewboshkyersufcawJontIavZenFeifWoitGejEajnoiWry
sawidHewofOkheTwiOjFigWigbobinCushBurnErnodedLuenAtTeyznoynoryop
</pre>
<p>There are several ruby environments for different modes of Ruby, these are Test, Development, and Production.  Although we have to set up the Development and Test environments (mostly to avoid errors and warnings), I will only use the Production Environment in the end.  Also, don’t use the key above, or below, I just inserted it to give you an idea of how it should look.</p>
<pre class="brush: bash; title: ; notranslate">
vim /home/git/gitorious/config/gitorious.yml

#For production, development, and test sections:
#copy paste exactly (new lines count), if you get an error below, this file will be where to look.
development:
  cookie_secret: SwouncievNivJucivrevnisfookEcnasiarHamgogdipmopyicbyctyikBagArimgronugAmIsUkDifpoyftEggobviuzIpArgecHewElsOcubnuejEtDecerlyooHibsmivyecivfalakMarfAvikokip^ojyorwahonkIrEdeibZepbivsaftIdmapmic)frivetcetEceivepJuxNeipnidzaroyffAgVevfuIvDesemAfyacAppAtdeavayswenEjUcoofnafryefGewboshkyersufcawJontIavZenFeifWoitGejEajnoiWrysawidHewofOkheTwiOjFigWigbobinCushBurnErnodedLuenAtTeyznoynoryop
  repository_base_path: &quot;/home/git/data/repositories&quot;
  extra_html_head_data:
  system_message:
  gitorious_client_port: 80
  gitorious_client_host: git.matthouse.us
  gitorious_host: git.matthouse.us
  gitorious_user: git
  exception_notification_emails: admin@matthouse.us
  mangle_email_addresses: true
  public_mode: true
  locale: en
  archive_cache_dir: &quot;/home/git/data/tarballs&quot;
  archive_work_dir: &quot;/home/git/data/tarball-work&quot;
  only_site_admins_can_create_projects: true
  hide_http_clone_urls: false
  is_gitorious_dot_org: false

test:
  cookie_secret: SwouncievNivJucivrevnisfookEcnasiarHamgogdipmopyicbyctyikBagArimgronugAmIsUkDifpoyftEggobviuzIpArgecHewElsOcubnuejEtDecerlyooHibsmivyecivfalakMarfAvikokip^ojyorwahonkIrEdeibZepbivsaftIdmapmic)frivetcetEceivepJuxNeipnidzaroyffAgVevfuIvDesemAfyacAppAtdeavayswenEjUcoofnafryefGewboshkyersufcawJontIavZenFeifWoitGejEajnoiWrysawidHewofOkheTwiOjFigWigbobinCushBurnErnodedLuenAtTeyznoynoryop
  repository_base_path: &quot;/home/git/data/repositories&quot;
  extra_html_head_data:
  system_message:
  gitorious_client_port: 80
  gitorious_client_host: git.matthouse.us
  gitorious_host: git.matthouse.us
  gitorious_user: git
  exception_notification_emails: admin@matthouse.us
  mangle_email_addresses: true
  public_mode: true
  locale: en
  archive_cache_dir: &quot;/home/git/data/tarballs&quot;
  archive_work_dir: &quot;/home/git/data/tarball-work&quot;
  only_site_admins_can_create_projects: true
  hide_http_clone_urls: false
  is_gitorious_dot_org: false

production:
  cookie_secret: SwouncievNivJucivrevnisfookEcnasiarHamgogdipmopyicbyctyikBagArimgronugAmIsUkDifpoyftEggobviuzIpArgecHewElsOcubnuejEtDecerlyooHibsmivyecivfalakMarfAvikokip^ojyorwahonkIrEdeibZepbivsaftIdmapmic)frivetcetEceivepJuxNeipnidzaroyffAgVevfuIvDesemAfyacAppAtdeavayswenEjUcoofnafryefGewboshkyersufcawJontIavZenFeifWoitGejEajnoiWrysawidHewofOkheTwiOjFigWigbobinCushBurnErnodedLuenAtTeyznoynoryop
  repository_base_path: &quot;/home/git/data/repositories&quot;
  extra_html_head_data:
  system_message:
  gitorious_client_port: 80
  gitorious_client_host: git.matthouse.us
  gitorious_host: git.matthouse.us
  gitorious_user: git
  exception_notification_emails: admin@matthouse.us
  mangle_email_addresses: true
  public_mode: true
  locale: en
  archive_cache_dir: &quot;/home/git/data/tarballs&quot;
  archive_work_dir: &quot;/home/git/data/tarball-work&quot;
  only_site_admins_can_create_projects: true
  hide_http_clone_urls: false
  is_gitorious_dot_org: false
</pre>
<p>Now let’s configure the broker.  For a while, I was confused about why other guides had me install both stomp and activemq.  It turns out that you only need one or the other.  For me, stomp was more memory friendly, so I choose that.  Towards the end of this blow, I also provide the procedure for installing ActiveMQ (which doesn’t pertain to what I’m installing).  If you want ActiveMQ, you simply have to replace “stomp” below with “activemq” to get this to work I believe (although I didn’t test that) and install ActiveMQ around this point (as detailed at the end).</p>
<pre class="brush: bash; title: ; notranslate">
vim /home/git/gitorious/config/broker.yml

production:
    adapter: stomp
development:
    adapter: stomp
test:
    adapter: stomp
</pre>
<p>Now let’s go through some more commands, including database configuration.  Replace the <PASSWORD> prompts with your own.</p>
<p>f
<pre class="brush: bash; title: ; notranslate">
#permissions fix:
chown -R git:git /home/git

mysql -uroot –p’&lt;ROOT’S MYSQL PASSWORD&gt;'

create database gitorious;
create database gitorious_test;
create database gitorious_dev;
CREATE user 'git'@'localhost' IDENTIFIED BY '&lt;PASWORD&gt;';
GRANT ALL ON gitorious.* TO 'git'@'localhost';
GRANT ALL ON gitorious_test.* TO 'git'@'localhost';
GRANT ALL ON gitorious_dev.* TO 'git'@'localhost';
FLUSH privileges;
exit;
</pre>
<p>One more major edit to a file to go!  Once again, replace <PASSWORD> with the one you used above.</p>
<pre class="brush: bash; title: ; notranslate">
vim /home/git/gitorious/config/database.yml

development:
  adapter: mysql
  database: gitorious_dev
  username: git
  password: &lt;PASWORD&gt;
  host: localhost
  encoding: utf8

test:
  adapter: mysql
  database: gitorious_test
  username: git
  password: &lt;PASWORD&gt;
  host: localhost
  encoding: utf8

production:
  adapter: mysql
  database: gitorious
  username: git
  password: &lt;PASWORD&gt;
  host: localhost
  encoding: utf8
</pre>
<p>Now some more commands to configure gitorious.  I was a little obsessive with fixing permissions (since I did a lot as root), but I wanted to make sure that I wouldn’t hit unknown errors and bugs.</p>
<pre class="brush: bash; title: ; notranslate">
#fix permissions
cd /home
chown -R git:git /home/git
cd /home/git
chmod -R 755 data
chmod 755 gitorious

cd /home/git/gitorious
bundle exec rake db:create:all
bundle exec rake db:setup
bundle exec rake db:migrate

#fix permissions
cd /home
chown -R git:git /home/git
cd /home/git
chmod -R 755 data
chmod 755 gitorious
</pre>
<p>It’s now time to start some services related to Gitorious.  Make sure that there are no errors in this section.  I recommend executing line by line.</p>
<pre class="brush: bash; title: ; notranslate">
ln -s /home/git/gitorious/doc/templates/centos/git-daemon /etc/init.d/git-daemon
chmod +x /etc/init.d/git-daemon
chkconfig --add git-daemon
service git-daemon start

ln -s /home/git/gitorious/doc/templates/centos/stomp /etc/init.d/stomp
chmod +x /etc/init.d/stomp
chkconfig --add stomp
service stomp start

ln -s /home/git/gitorious/doc/templates/centos/git-poller /etc/init.d/git-poller
chmod +x /etc/init.d/git-poller
chkconfig --add git-poller
service git-poller start
</pre>
<p>At this point, we can get into the Apache configuration.  To download from gitorious, we need mod_xsendfile.  To the best of my knowledge, Gitorious drops the executable bit off from the tar archives it creates, so the files cannot be accessed traditionally.  This presents a problem and this modification makes the files downloadable without the executable bit being set.</p>
<pre class="brush: bash; title: ; notranslate">
yum install -y httpd httpd-devel mod_xsendfile
#mod qos for sloworis attack control and DOS attack control
cd ~
mkdir apachemod
cd apachemod
wget http://sourceforge.net/projects/mod-qos/files/mod_qos-9.57.tar.gz/download
tar xzf mod_qos-9.57.tar.gz
cd mod_qos-9.57/apache2
apxs -i -c mod_qos.c
chmod 755 /usr/lib64/httpd/modules/mod_qos.so
#configure xsendfile

vim /etc/httpd/conf.d/xsendfile.conf
#add below LoadModule line
XSendFile on
XSendFilePath /home/git/data/tarballs
#UPDATE 6/8/11: Add a path to the repositories folder for git to work over http.
XSendFilePath /home/git/data/repositories

#install ruby Passenger to make Ruby applications work on Apache.

/opt/ruby-enterprise-1.8.7-2011.03/bin/passenger-install-apache2-module
#accept the defaults
</pre>
<p>At this point, we now need to configure Apache.  I do this with a two file approach separating the website configuration from the server configuration.  If you copy paste my httpd.conf file, it will serve you well, provided you change the “ServerAdmin” and “ServerName” directives (options).  The same isn’t true of my host.conf file, you’re going to have to modify that for your particular installation.</p>
<pre class="brush: bash; title: ; notranslate">
cd /etc/httpd/conf
vim httpd.conf

### Section 1: Global Environment
ServerTokens OS
ServerRoot &quot;/etc/httpd&quot;
PidFile run/httpd.pid
Timeout 120
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 15
Listen 80

LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_alias_module modules/mod_authn_alias.so
LoadModule authn_anon_module modules/mod_authn_anon.so
LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authz_owner_module modules/mod_authz_owner.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule ldap_module modules/mod_ldap.so
LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule logio_module modules/mod_logio.so
LoadModule env_module modules/mod_env.so
LoadModule ext_filter_module modules/mod_ext_filter.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule expires_module modules/mod_expires.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule info_module modules/mod_info.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule actions_module modules/mod_actions.so
LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule cache_module modules/mod_cache.so
LoadModule suexec_module modules/mod_suexec.so
LoadModule disk_cache_module modules/mod_disk_cache.so
LoadModule file_cache_module modules/mod_file_cache.so
#LoadModule mem_cache_module modules/mod_mem_cache.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule version_module modules/mod_version.so
#LoadModule cern_meta_module modules/mod_cern_meta.so
#LoadModule asis_module modules/mod_asis.so

LoadModule unique_id_module modules/mod_unique_id.so
LoadModule qos_module /usr/lib64/httpd/modules/mod_qos.so

LoadModule passenger_module /opt/ruby/lib/ruby/gems/1.8/gems/passenger-3.0.7/ext/apache2/mod_passenger.so
   PassengerRoot /opt/ruby/lib/ruby/gems/1.8/gems/passenger-3.0.7
   PassengerRuby /opt/ruby/bin/ruby

Include conf.d/*.conf
#ExtendedStatus On
User apache
Group apache

### Section 2: 'Main' server configuration

ServerAdmin admin@matthouse.us
ServerName string.matthouse.us:80
UseCanonicalName Off
DocumentRoot &quot;/var/www/html&quot;

&lt;Directory /&gt;
    Options FollowSymLinks
    AllowOverride All
&lt;/Directory&gt;

&lt;IfModule mod_userdir.c&gt;
    UserDir public_html
&lt;/IfModule&gt;

DirectoryIndex index.html index.html.var index.htm
AccessFileName .htaccess

&lt;Files ~ &quot;^.ht&quot;&gt; #deny serving ht files
    Order allow,deny
    Deny from all
&lt;/Files&gt;

TypesConfig /etc/mime.types
DefaultType text/plain
&lt;IfModule mod_mime_magic.c&gt;
#   MIMEMagicFile /usr/share/magic.mime
    MIMEMagicFile conf/magic
&lt;/IfModule&gt;

HostnameLookups Off
#EnableMMAP off
#EnableSendfile off
ErrorLog logs/error_log
LogLevel warn

LogFormat &quot;%h %l %u %t &quot;%r&quot; %&gt;s %b &quot;%{Referer}i&quot; &quot;%{User-Agent}i&quot;&quot; combined
LogFormat &quot;%h %l %u %t &quot;%r&quot; %&gt;s %b&quot; common
LogFormat &quot;%{Referer}i -&gt; %U&quot; referer
LogFormat &quot;%{User-agent}i&quot; agent
#LogFormat &quot;%h %l %u %t &quot;%r&quot; %&gt;s %b &quot;%{Referer}i&quot; &quot;%{User-Agent}i&quot; %I %O&quot; combinedio

#CustomLog logs/access_log common
#CustomLog logs/referer_log referer
#CustomLog logs/agent_log agent
CustomLog logs/access_log combined

ServerSignature On

Alias /icons/ &quot;/var/www/icons/&quot;
&lt;Directory &quot;/var/www/icons&quot;&gt;
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
&lt;/Directory&gt;

#
# WebDAV module configuration section.
#
&lt;IfModule mod_dav_fs.c&gt;
    # Location of the WebDAV lock database.
    DAVLockDB /var/lib/dav/lockdb
&lt;/IfModule&gt;
ScriptAlias /cgi-bin/ &quot;/var/www/cgi-bin/&quot;
&lt;Directory &quot;/var/www/cgi-bin&quot;&gt;
    AllowOverride All
    Options None
    Order allow,deny
    Allow from all
&lt;/Directory&gt;

# Redirect permanent /foo http://www.example.com/bar

# Directives controlling the display of server-generated directory listings.
IndexOptions FancyIndexing VersionSort NameWidth=* HTMLTable
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*
AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core
AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^
DefaultIcon /icons/unknown.gif
#AddDescription &quot;GZIP compressed document&quot; .gz
#AddDescription &quot;tar archive&quot; .tar
#AddDescription &quot;GZIP compressed tar archive&quot; .tgz
ReadmeName README.html
HeaderName HEADER.html
IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t

AddLanguage ca .ca
AddLanguage cs .cz .cs
AddLanguage da .dk
AddLanguage de .de
AddLanguage el .el
AddLanguage en .en
AddLanguage eo .eo
AddLanguage es .es
AddLanguage et .et
AddLanguage fr .fr
AddLanguage he .he
AddLanguage hr .hr
AddLanguage it .it
AddLanguage ja .ja
AddLanguage ko .ko
AddLanguage ltz .ltz
AddLanguage nl .nl
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pl .po
AddLanguage pt .pt
AddLanguage pt-BR .pt-br
AddLanguage ru .ru
AddLanguage sv .sv
AddLanguage zh-CN .zh-cn
AddLanguage zh-TW .zh-tw
LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW
ForceLanguagePriority Prefer Fallback
AddDefaultCharset UTF-8
#AddType application/x-tar .tgz
#AddEncoding x-compress .Z
#AddEncoding x-gzip .gz .tgz
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz

AddHandler cgi-script .cgi .pl
#AddHandler send-as-is asis
AddHandler type-map var
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml

# 1) plain text 2) local redirects 3) external redirects
#ErrorDocument 500 &quot;The server made a boo boo.&quot;
#ErrorDocument 404 /missing.html
#ErrorDocument 404 &quot;/cgi-bin/missing_handler.pl&quot;
#ErrorDocument 402 http://www.example.com/subscription_info.html

Alias /error/ &quot;/var/www/error/&quot;

&lt;IfModule mod_negotiation.c&gt;
&lt;IfModule mod_include.c&gt;
    &lt;Directory &quot;/var/www/error&quot;&gt;
        AllowOverride None
        Options IncludesNoExec
        AddOutputFilter Includes html
        AddHandler type-map var
        Order allow,deny
        Allow from all
        LanguagePriority en es de fr
        ForceLanguagePriority Prefer Fallback
    &lt;/Directory&gt;

#    ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
#    ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
#    ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
#    ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
#    ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
#    ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
#    ErrorDocument 410 /error/HTTP_GONE.html.var
#    ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
#    ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
#    ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
#    ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
#    ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
#    ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
#    ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
#    ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
#    ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
#    ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var

&lt;/IfModule&gt;
&lt;/IfModule&gt;

BrowserMatch &quot;Mozilla/2&quot; nokeepalive
BrowserMatch &quot;MSIE 4.0b2;&quot; nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch &quot;RealPlayer 4.0&quot; force-response-1.0
BrowserMatch &quot;Java/1.0&quot; force-response-1.0
BrowserMatch &quot;JDK/1.0&quot; force-response-1.0
BrowserMatch &quot;Microsoft Data Access Internet Publishing Provider&quot; redirect-carefully
BrowserMatch &quot;MS FrontPage&quot; redirect-carefully
BrowserMatch &quot;^WebDrive&quot; redirect-carefully
BrowserMatch &quot;^WebDAVFS/1.[0123]&quot; redirect-carefully
BrowserMatch &quot;^gnome-vfs/1.0&quot; redirect-carefully
BrowserMatch &quot;^XML Spy&quot; redirect-carefully
BrowserMatch &quot;^Dreamweaver-WebDAV-SCM1&quot; redirect-carefully

&lt;IfModule prefork.c&gt;
StartServers       1
MinSpareServers    1
MaxSpareServers  1
ServerLimit      128
MaxClients       128
MaxRequestsPerChild  1000
&lt;/IfModule&gt;

### Section 3: CONF STUFF
Include conf/host.conf
</pre>
<p>Next is the virtual host configuration.  I chose to use https / ssl with a self-signed certificate, so that procedure is below.  The following probably won’t be a perfect cut / paste for you, but it will be close enough provided you fill in the blanks.  If you wish to not use https, simply copy the basic host.conf file and remove the SSL elements (including the port 443 stuff).</p>
<pre class="brush: bash; title: ; notranslate">
cd ~
yum install –y mod_ssl openssl
openssl genrsa -out ca.key 2048
openssl req -new -key ca.key -out ca.csr
#Enter in the information

#sample information
#Country Name (2 letter code) [GB]:US
#State or Province Name (full name) [Berkshire]:NEW YORK
#Locality Name (eg, city) [Newbury]:GREAT VALLEY
#Organization Name (eg, company) [My Company Ltd]:MATTHOUSE
#Organizational Unit Name (eg, section) []:
#Common Name (eg, your name or your server's hostname) []:string.matthouse.us
#Email Address []:admin@matthouse.us
#
#Please enter the following 'extra' attributes to be sent with your certificate request
#A challenge password []:
#An optional company name []:

openssl x509 -req -days 365 -in ca.csr -signkey ca.key -out ca.crt
cp ca.crt /etc/pki/tls/certs
cp ca.key /etc/pki/tls/private/ca.key
cp ca.csr /etc/pki/tls/private/ca.csr
mv /etc/httpd/conf.d/ssl.conf /etc/httpd/conf.d/ssl.conf.disabled
</pre>
<p>Now we make the virtualhost include file.</p>
<pre class="brush: bash; title: ; notranslate">
vim /etc/httpd/conf/host.conf

#enable ~user home directories.
&lt;Directory /home/*/public_html&gt;
    Options MultiViews Indexes SymLinksIfOwnerMatch Includes ExecCGI
    AllowOverride All
    Order allow,deny
    Allow from all
&lt;/Directory&gt;

NameVirtualHost *:80

&lt;VirtualHost *:80&gt;
        ServerName  string.matthouse.us
        ServerAlias www.string.matthouse.us
        ServerAdmin admin@matthouse.us
        DocumentRoot /var/www
        ErrorLog  /var/www/error.log
        CustomLog /var/www/access.log combined
&lt;/VirtualHost&gt;

&lt;VirtualHost *:80&gt;
        ServerName  git.matthouse.us
        ServerAdmin admin@matthouse.us
        DocumentRoot /home/git/gitorious/public
        ErrorLog  /var/www/errorgit.log
        CustomLog /var/www/accessgit.log combined
#customlog is good for awstats software
        &lt;Directory /home/git/gitorious/public&gt;
          AllowOverride all
          Options -MultiViews
        &lt;/Directory&gt;
&lt;/VirtualHost&gt;

LoadModule ssl_module modules/mod_ssl.so
Listen 443
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl    .crl
SSLPassPhraseDialog  builtin
SSLSessionCache         shmcb:/var/cache/mod_ssl/scache(512000)
SSLSessionCacheTimeout  300
SSLMutex default
SSLRandomSeed startup file:/dev/urandom  256
SSLRandomSeed connect builtin
SSLCryptoDevice builtin

NameVirtualHost *:443

&lt;VirtualHost *:443&gt;
        SSLEngine on
        SSLCertificateFile /etc/pki/tls/certs/ca.crt
        SSLCertificateKeyFile /etc/pki/tls/private/ca.key
        SSLProtocol all -SSLv2
        SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
        ServerName  git.matthouse.us
        ServerAdmin admin@matthouse.us
        DocumentRoot /home/git/gitorious/public
        ErrorLog  /var/www/errorgit.log
        CustomLog /var/www/accessgit.log combined
        &lt;Directory /home/git/gitorious/public&gt;
          AllowOverride all
          Options -MultiViews
        &lt;/Directory&gt;
&lt;/VirtualHost&gt;
</pre>
<p>At this point, test the Apache server configuration and start it.  Then we will fix permissions once more.</p>
<pre class="brush: bash; title: ; notranslate">
service httpd configtest
service httpd start
#fix permissions again
cd /home
chmod 711 git
chown -R git:git git
</pre>
<p>It’s now time to add a Gitorious user!</p>
<pre class="brush: bash; title: ; notranslate">
su git
cd ~/gitorious
env RAILS_ENV=production script/create_admin

#sample
Type in Administrator's e-mail:
admin@matthouse.us
Type in Administrator's password:
&lt;APASSWORD&gt;
Admin user created successfully.

exit
#exit back to root
</pre>
<p>Next, if you wish to disable most of the SSL links on your Gitorious install, do the following (I did this).  In the install that I did, I enabled SSL so that for the few links that went to https sites, Gitorious would continue to work (with a few warnings of course because self-signed certificates aren’t trusted and I’m not paying for a trusted rapidssl certificate for how little I am going to use Gitorious myself).</p>
<p><strong>UPDATE 6/8/11: The SSLRequirement directive is no longer required in production.rb (below).  Instead, add &#8220;disable_ssl&#8221; OR &#8220;enable_ssl&#8221; as a line to the file /home/git/gitorious/config/gitorious.yml (as the git user).</strong></p>
<pre class="brush: bash; title: ; notranslate">
#disable SSL links (for the most part
su git
vim ~/gitorious/config/environments/production.rb
#add the following line somewhere in the file at the top:
SslRequirement.disable_ssl_check = true
exit
#exit back to root
</pre>
<p>It’s now time to configure ultrasphinx.  I believe that this is used mostly for indexing and searching the Gitorious site, but it could be used for other functionality too.</p>
<pre class="brush: bash; title: ; notranslate">
cd /home/git/gitorious 

export RAILS_ENV=production
export PATH=/usr/local/sphinx/bin:$PATH

bundle exec rake ultrasphinx:configure RAILS_ENV=production
bundle exec rake ultrasphinx:index RAILS_ENV=production
bundle exec rake ultrasphinx:daemon:start RAILS_ENV=production

#the following command builds the sphinx dictionary.  For me it seg faults, but gets rid of a pesky dictionary error.
cd /home/git/gitorious
aspell config dict-dir
   /usr/lib64/aspell-0.60
cp vendor/plugins/ultrasphinx/examples/ap.multi /usr/lib64/aspell-0.60/
#the next command segfaults, but it makes an annoying error go away in a log
bundle exec rake ultrasphinx:spelling:build

#due to some deprecation in code, the following two changes need to happen:
vim /home/git/gitorious/config/ultrasphinx/production.conf

#change &quot;address&quot; to &quot;listen&quot; due to deprecation
  listen = 0.0.0.0
#change memlimit from 256 to 64 to conserve memory
indexer {
  mem_limit = 64M

#Finally, we need to make git-ultrasphinx a daemon.
ln -s /home/git/gitorious/doc/templates/centos/git-ultrasphinx /etc/init.d/git-ultrasphinx
chmod +x /etc/init.d/git-ultrasphinx

#make mysqld and httpd start automatically
chkconfig mysqld on
chkconfig httpd on

#a few bug fixes
ln -s /usr/local/bin/gitorious /usr/bin

#install imagemagick via yum
#yes, we compiled from source to get rid of an error… but gitorious will have other errors if we don’t
yum –y install ImageMagick

#One last time, I will fix the permissions
cd /home
chown -R git:git /home/git
cd /home/git
chmod -R 755 data
chmod 755 gitorious
</pre>
<p>We now need to install memcached for Gitorious.  I originally thought this was strictly for performance, but Gitorious expects it to be installed.  I use the remi repository for this since the other repositories have broken dependencies.</p>
<pre class="brush: bash; title: ; notranslate">
yum install -y --enablerepo=remi memcached
service memcached start
chkconfig memcached on
</pre>
<p>At this point, everything is almost configured fully.  I don’t start the git daemons / services automatically with chkconfig because they won’t run at system startup (I don’t know why).  Therefore, I created a special script and made that start automatically upon reboot using the cron daemon (using the @reboot option).</p>
<pre class="brush: bash; title: ; notranslate">
vim /root/startup.sh

#!/bin/sh
/etc/init.d/stomp start
/etc/init.d/git-daemon start
/etc/init.d/git-poller start
/etc/init.d/git-ultrasphinx start
</pre>
<pre class="brush: bash; title: ; notranslate">
crontab –e
#add the following to root’s crontab
MAILTO=&quot;&quot;
@reboot /root/startup.sh
</pre>
<p>Next, we need to index the Gitorious site every hour.</p>
<pre class="brush: bash; title: ; notranslate">
su git
crontab –e
#add the following to git’s cron, which indexes the site every hour
MAILTO=&quot;&quot;
* */1 * * * cd /home/git/gitorious &amp;amp;&amp;amp; /opt/ruby/bin/rake ultrasphinx:index RAILS_ENV=production
exit
#exit to root
</pre>
<p>Finally, reboot the VPS.  With any luck, everything will work once its rebooted.  I went to the site and tested the following functionality:</p>
<ul>
<li>Adding an ssh key</li>
<li>Adding a new repository</li>
<li>Adding a wiki page</li>
<li>Deleting the above stuff</li>
<li>Committing to the repository from a local repository</li>
</ul>
<p>The above is all I required of Gitorious.  Unfortunately, the included tests did not successfully complete for me due to the memory restrictions, but I saw several errors.  I don’t think the tests would fully pass, but the basic functionality that I need is present and that is what matters.  Below is what you can do (as root) to run the tests for yourself.</p>
<pre class="brush: bash; title: ; notranslate">
cd /home/git/gitorious
bundle exec rake test
</pre>
<p>With the above said, I then went ahead and configured a simple firewall to protect the Gitorious machine.  Below was the procedure for that.</p>
<pre class="brush: bash; title: ; notranslate">
vim /etc/firewall.sh

#!/bin/bash
# My system IP/set ip address of server
SERVER_IP=&quot;205.234.203.115&quot;
# Flushing all rules
iptables -F
iptables -X

# Setting default filter policy
service iptables restart
iptables -F
iptables -P INPUT DROP
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT

#allowed inbound
#ssh
iptables -A INPUT -p tcp -s 0/0 -d $SERVER_IP --dport 22 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A INPUT -p tcp -s 0/0 -d $SERVER_IP --dport 80 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A INPUT -p tcp -s 0/0 -d $SERVER_IP --dport 443 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A INPUT -p tcp -s 0/0 -d $SERVER_IP --dport 9418 -m state --state NEW,ESTABLISHED -j ACCEPT

iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
#allow ping
iptables -A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT
iptables  -A INPUT -j DROP
</pre>
<p>Next, we need to add the firewall to system startup.</p>
<pre class="brush: bash; title: ; notranslate">
chmod +x /etc/firewall.sh

crontab –e
#add the following at the bottom
@reboot /etc/firewall.sh
</pre>
<p>The (relatively simple) firewall is now configured to allow incoming pings to the server, SSH access, HTTP access, and GIT access using the git protocol.  If you have issues like I did with an unknown error, your VPS provider will have to enable the connection tracking feature of IPTables for you, otherwise committing to a gitorious repository will not work.</p>
<p>I also configured sendmail to send mail from this machine appropriately.  Below is a simple procedure for this.  You could get a lot more in depth, but it isn’t necessary.  Note that using this method, all mail will be sent from <a href="mailto:user@string.matthouse.us">user@string.matthouse.us</a> in my case (since this is the machine hostname).</p>
<pre class="brush: bash; title: ; notranslate">
vim /etc/mail/local-host-names
#add local hosts as appropriate
localhost
string.matthouse.us
git.matthouse.us

vim /root/.forward
#add your email address to the first line
admin@matthouse.us

service sendmail restart
</pre>
<p><strong>With that, the Gitorious install is officially Installed</strong>.  I will not continue onto the ActiveMQ installation as mentioned above, this is only required if you chose to use ActiveMQ as a broker instead of Stomp.</p>
<p>Below is the ActiveMQ installation procedure (as written in my internal documentation) for your enjoyment.  I will not explain this, but I thought it would be appropriate to include it since I originally followed it to a dead end!  This is strictly not required for the above installation and will do nothing to help you if you’re getting errors above (while using stomp as I did).</p>
<pre class="brush: bash; title: ; notranslate">
wget http://apache.spd.co.il/activemq/apache-activemq/5.5.0/apache-activemq-5.5.0-bin.tar.gz
tar xzvf apache-activemq-5.5.0-bin.tar.gz
mv apache-activemq-5.5.0 /usr/local/apache-activemq5.50
cd /usr/local
ln -s apache-activemq5.50 apache-activemq
cd ~
adduser activemq
chown -R activemq /usr/local/apache-activemq/data

cd /usr/local/apache-activemq5.50/

vim bin/activemq

#change comments to:

 ACTIVEMQ_SUNJMX_START=&quot;$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.ssl=false&quot;
#ACTIVEMQ_SUNJMX_START=&quot;$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote&quot;

vim /usr/local/apache-activemq/bin/activemq-admin
find: ACTIVEMQ_OPTS=&quot;-Xmx512M -Dorg.apache.activemq.UseDedicatedTaskRunner=true -Djava.util.logging.config.file=logging.properties&quot;
replace: ACTIVEMQ_OPTS=&quot;-Xmx64M -Dorg.apache.activemq.UseDedicatedTaskRunner=true -Djava.util.logging.config.file=logging.properties&quot;

vim activemqstart.sh

#!/bin/bash
export JAVA_HOME=/usr/lib/jvm/jre
export _JAVA_OPTIONS=-Xmx64m
/usr/local/apache-activemq/bin/activemq-admin start &amp;amp;

vim activemqstop.sh

#!/bin/bash
export JAVA_HOME=/usr/lib/jvm/jre
export _JAVA_OPTIONS=-Xmx64m
/usr/local/apache-activemq/bin/activemq-admin stop

chmod +x activemqstart.sh
chmod +x activemqstop.sh

cd /etc/init.d
vim activemq

#!/bin/bash
#
# activemq       Starts ActiveMQ.
#
#
# chkconfig: 345 88 12
# description: ActiveMQ is a JMS Messaging Queue Server.
### BEGIN INIT INFO
# Provides: $activemq
### END INIT INFO

# Source function library.
. /etc/init.d/functions

export _JAVA_OPTIONS=-Xmx64m

[ -f /usr/local/apache-activemq/activemqstart.sh ] || exit 0
[ -f /usr/local/apache-activemq/activemqstop.sh ] || exit 0

RETVAL=0

umask 077

start() {
       echo -n $&quot;Starting ActiveMQ: &quot;
       daemon /usr/local/apache-activemq/activemqstart.sh
       echo
       return $RETVAL
}
stop() {
       echo -n $&quot;Shutting down ActiveMQ: &quot;
       daemon su -c /usr/local/apache-activemq/activemqstop.sh activemq
       echo
       return $RETVAL
}
restart() {
       stop
       start
}
case &quot;$1&quot; in
 start)
       start
       ;;
 stop)
       stop
       ;;
 restart|reload)
       restart
       ;;
 *)
       echo $&quot;Usage: $0 {start|stop|restart}&quot;
       exit 1
esac

exit $?

#run these commands
chmod +x activemq
chkconfig activemq on
</pre>
<p>Whew, this is the longest blog I’ve ever written!  That just goes to show the complexity of Gitorious, not to mention the administrative overhead of maintaining Ruby and Imagemagick, possible even ActiveMQ (since they were installed from source).  This blog post is in no way shape or form a complete guide to getting Gitorious installed and functional, but it will help get you most of the way there.  Because of the complexity of this software, I will likely not be of much help for any problems that I might be asked to help resolve.  As a disclaimer, use the information in this blog post at your own risk, I’m not responsible for the loss of any data, time or profits that you might incur from following this guide.</p>
<p>As always, thanks for reading!</p>
<p><strong>Special thanks to Marius Mathiesen for comments about inaccuracies in this tutorial.  Information is up to date as of 6/8/2011.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://famousphil.com/blog/2011/06/installing-gitorious-on-centos-5-6-x64/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
		<item>
		<title>Revisiting my light control system</title>
		<link>http://famousphil.com/blog/2011/05/revisiting-my-light-control-system/</link>
		<comments>http://famousphil.com/blog/2011/05/revisiting-my-light-control-system/#comments</comments>
		<pubDate>Thu, 26 May 2011 18:07:24 +0000</pubDate>
		<dc:creator>Famous Phil</dc:creator>
				<category><![CDATA[Hosting / Server Administration]]></category>
		<category><![CDATA[Mobile Technology]]></category>
		<category><![CDATA[My Site]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Student Life]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[home automation]]></category>
		<category><![CDATA[light control]]></category>
		<category><![CDATA[linksys]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[smartbutler]]></category>
		<category><![CDATA[usb-uirt]]></category>
		<category><![CDATA[Voice Control]]></category>
		<category><![CDATA[voip]]></category>
		<category><![CDATA[wamp]]></category>
		<category><![CDATA[x10]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://famousphil.com/?p=783</guid>
		<description><![CDATA[Phil discusses high light control system (x10) in a lot of detail.  He also talks about VoIP a little bit.]]></description>
			<content:encoded><![CDATA[<p>On August 30, 2009, I made a blog post about my x10 home automation system, but I didn&#8217;t really cover it in depth enough to satisfy myself.  Therefore, I decided to revisit the topic from that blog (<a href="http://famousphil.com/blog/2009/08/how-many-engineers-does-it-take-to-turn-on-a-light-bulb/">which is here</a>).  This blog contains a video detailing the system that I ended up with during my University experience.  I expect that my future home will be much more automated than this video shows.  In order to appreciate the video, I decided to write some content to supplement what I talk about in the video, which is below.</p>
<p>In 2009, I came up with the first version of my light control system.  This consisted of a clapper, a set of cheap computer speakers, and an audio recording of my clapping.  My original system used a web interface to have the speakers (connected to the web server / site) clap when I wanted the lights to come on.  This quickly became unmanageable since I couldn&#8217;t monitor the states of the lights without a webcam monitoring my room (and I wasn&#8217;t thrilled about securing a webcam in my room that could be hacked into).  This lead into X10 which has done wonders for me over the course of the past two years.</p>
<p>Its funny remembering back to when I first got an x10 system, because the x10 website doesn&#8217;t look like your average store, it looks more like an adult site with lots of flashy banners (ha ha).  I do have to admit, with x10, the initial impression was very deceiving for me, since their products are really good!  Anyways, moving on, My x10 system consists of a USB transceiver module (<a href="http://www.thehomeautomationstore.com/sw31a-cm15a.html">CM15A located here</a>) which connects to my windows server that runs a WAMP (Windows, Apache, MySQL, PHP).  In addition, I have several lamp modules, appliance modules, and remote control wall switches (which wirelessly communicate to the CM15A).</p>
<p>As for the software, I installed the ActiveHome software onto my server (that came with the CM15A).  This software installs a few application libraries (dlls) which enabled programmatic access to the CM15A to send and receive x10 commands over the power lines ran in my apartment.  Using this api, I wrote a quick program that makes a command line based program that can run certain commands.  I have to note that ActiveHome includes a default command line executable, but this didn&#8217;t have all the functionality that I wanted, most notably output in HTML for my web interface.  With the executable I wrote, I simply have the apache web server run the command as a local user which sends the x10 signals over the power lines ran in my apartment.  I should note that I considered using ASP.net which could interface with the API directly, but at the time I wasn&#8217;t very familiar with ASP.net and I wanted to use PHP.  I didn&#8217;t use IIS because I didn&#8217;t have the time to go permissions hunting to figure out why PHP wasn&#8217;t allowed to run programs as a local user on the web server through IIS.  Luckily a standard WAMP install that included Apache and PHP worked out of the box with little configuration.  The WAMP that I used was <a href="http://vertrigo.sourceforge.net/">Vertrigo</a>.</p>
<p>For the IR receiver that controls my projector, I use a <a href="http://www.usbuirt.com/">USB-UIRT</a> that I found on Ebay (I didn&#8217;t feel like waiting the estimated 6 weeks at the time for a new one).  Fortunately, the executable program that was included could send and receive signals from the USB-UIRT that I required, so I wrote some PHP that invokes it for the commands I used.</p>
<p>In 2009, I mentioned that voice control would make its way into my system.  I have to admit that it did!  Unfortunately, it didn&#8217;t last long because of all the bugs that I ran into.  I used the Microsoft speech libraries with a program called <a href="http://smart-butler.com/">SmartButler</a>, which could listen for speech commands and run commands on my server.  I initially used a cheap computer microphone, but quickly found that the interference in the audio made commands very inaccurate, and furthermore, if I held a conversation in the room, my lights would act up!  I figured that a USB professional Condenser Microphone would fix the problem, so I quickly ordered one and integrated it into my system.  This did significantly improve the quality of my system, but normal conversations would still occasionally trigger some of my web control panel controls inaccurately.  The final straw that broke the camel&#8217;s back (and caused this system to get removed) was when my RA (resident advisor), Stephanie came into the room, said hello to me and my lights went out of control (since I didn&#8217;t train it for a higher pitched, female voice, I&#8217;d assume).  I&#8217;d like to approach this problem in the future when I get the time to do it properly, but until then, I&#8217;ve been satisfied with web control panels that both my smartphone and computer can access.</p>
<p>Finally, at the very end of my video, I took a moment to show my<a href="http://www.amazon.com/Cisco-PAP2T-Internet-Adapter-Voice-over-IP/dp/B000HCX7UG"> Linksys PAP Adapter</a> (VoIP, Voice over IP).  This works through a service from <a href="http://voip.ms">voip.ms</a>.  Voip.ms is a prepaid service for VoIP adapters that allows you to buy a phone number for a very reasonable price (even 800 numbers).  They also have really reasonable rates and really good control for those phone numbers.  I thought I&#8217;d provide a plug for them since they are really good.</p>
<p>I would like to add that the Linksys adapter required an unfirewalled IP address to work properly (for incoming calls) in my experience.  It does have a NAT mode for this situation, but the university firewall constantly crushed this mode.  To get around this problem (and allow my web server for x10 to work properly), I implemented OpenVPN on my network and pulled in several public IP addresses and left them unfirewalled.  This solution worked well for me at UB, and I documented it fairly well in my <a href="http://famousphil.com/blog/2010/11/breaking-through-a-restrictive-firewall-with-openvpn/">OpenVPN </a>post.</p>
<p><strong>With nothing more to mention on the topic, here is the video that details my light control system and some other stuff. </strong><br />
<object type="application/x-shockwave-flash" style="width:450px; height:366px;" data="http://www.youtube.com/v/HptR9aZxEZ0"><param name="movie" value="http://www.youtube.com/v/HptR9aZxEZ0" /></object></p>
<p>Of course, I made many bloopers in this video (I improvised a lot!), so I thought the bloopers video would be appropriate.  <strong>Warning, there is a little language in it and the audio isn&#8217;t exactly balanced.<br />
</strong> <object type="application/x-shockwave-flash" style="width:450px; height:366px;" data="http://www.youtube.com/v/kLY3kYRvg4c"><param name="movie" value="http://www.youtube.com/v/kLY3kYRvg4c" /></object></p>
<p>Disclaimer: I was not paid to endorse any of the products above (and I&#8217;m never paid to do that!).  I like to think that when I make a recommendation, it carries a lot of weight with it, which it should!</p>
]]></content:encoded>
			<wfw:commentRss>http://famousphil.com/blog/2011/05/revisiting-my-light-control-system/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Web Lecture Series &#8211; Week 4</title>
		<link>http://famousphil.com/blog/2011/04/web-lecture-series-week-4/</link>
		<comments>http://famousphil.com/blog/2011/04/web-lecture-series-week-4/#comments</comments>
		<pubDate>Wed, 06 Apr 2011 03:30:46 +0000</pubDate>
		<dc:creator>Famous Phil</dc:creator>
				<category><![CDATA[Hosting / Server Administration]]></category>
		<category><![CDATA[My Site]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Student Life]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://famousphil.com/?p=745</guid>
		<description><![CDATA[Phil is doing an Introduction Website Development Lecture Series for the IEEE Student Club at UB.  This is the recap / recorded video from week 4, the final week.]]></description>
			<content:encoded><![CDATA[<p>This is a video blog continuation of week 3 (see 2 posts ago).  Its the final video in my 4 lecture series.  The site this corresponds to is <a href="http://famousphil.com/websp11/">http://famousphil.com/websp11/</a></p>
<p>This video covers a lot of demos including how to make a crude content management system work on your site, as well as an introduction to wordpress as a content management system.</p>
<p>Background: I was asked by the IEEE student club at UB (<a href="http://wings.buffalo.edu/sa/ieee">http://wings.buffalo.edu/sa/ieee</a>) to redo my lecture series on developing websites.  I know that my website isn&#8217;t the best visually designed website in the world (and I&#8217;m actively looking for talent that can help me fix this in exchange for my programming skills), but I do know a lot about how to code websites well.  Anyways, here are the videos from Lecture 4.  There will be a fourth and final lecture next week.  As always, thanks for reading!</p>
<object type="application/x-shockwave-flash" style="width:450px; height:366px;" data="http://www.youtube.com/v/wNi8Vr-pIPs"><param name="movie" value="http://www.youtube.com/v/wNi8Vr-pIPs" /></object>
]]></content:encoded>
			<wfw:commentRss>http://famousphil.com/blog/2011/04/web-lecture-series-week-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Lecture Series &#8211; Week 3</title>
		<link>http://famousphil.com/blog/2011/03/web-lecture-series-week-3/</link>
		<comments>http://famousphil.com/blog/2011/03/web-lecture-series-week-3/#comments</comments>
		<pubDate>Wed, 30 Mar 2011 14:32:07 +0000</pubDate>
		<dc:creator>Famous Phil</dc:creator>
				<category><![CDATA[Hosting / Server Administration]]></category>
		<category><![CDATA[My Site]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Student Life]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[club]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[content management system]]></category>
		<category><![CDATA[educational]]></category>
		<category><![CDATA[educational web developmhtml]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[ieee]]></category>
		<category><![CDATA[ieee student club]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[phpdesigner]]></category>
		<category><![CDATA[putty]]></category>
		<category><![CDATA[rewrite]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[student]]></category>
		<category><![CDATA[university at buffalo]]></category>
		<category><![CDATA[vim]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[website]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://famousphil.com/?p=727</guid>
		<description><![CDATA[Phil is doing an Introduction Website Development Lecture Series for the IEEE Student Club at UB.  This is the recap / recorded video from week 3.]]></description>
			<content:encoded><![CDATA[<p>This is a video blog continuation of week 2 (see the previous post).</p>
<p>Background: I was asked by the IEEE student club at UB (<a href="http://wings.buffalo.edu/sa/ieee">http://wings.buffalo.edu/sa/ieee</a>) to redo my lecture series on developing websites.  I know that my website isn&#8217;t the best visually designed website in the world (and I&#8217;m actively looking for talent that can help me fix this in exchange for my programming skills), but I do know a lot about how to code websites well.  Anyways, here are the videos from Lecture 3.  There will be a fourth and final lecture next week.  As always, thanks for reading!</p>
<p>Part 1:<br />
<object type="application/x-shockwave-flash" style="width:450px; height:366px;" data="http://www.youtube.com/v/7LBkCWVo1GQ"><param name="movie" value="http://www.youtube.com/v/7LBkCWVo1GQ" /></object></p>
<p>Part 2:<br />
<object type="application/x-shockwave-flash" style="width:450px; height:366px;" data="http://www.youtube.com/v/jQBIWPl6Y7I"><param name="movie" value="http://www.youtube.com/v/jQBIWPl6Y7I" /></object></p>
<p>Part 3:<br />
<object type="application/x-shockwave-flash" style="width:450px; height:366px;" data="http://www.youtube.com/v/AmH4cpEUNVw"><param name="movie" value="http://www.youtube.com/v/AmH4cpEUNVw" /></object></p>
<p>Part 4:<br />
<object type="application/x-shockwave-flash" style="width:450px; height:366px;" data="http://www.youtube.com/v/6EIz27ylYew"><param name="movie" value="http://www.youtube.com/v/6EIz27ylYew" /></object></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://famousphil.com/blog/2011/03/web-lecture-series-week-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Lecture Series &#8211; Week 2</title>
		<link>http://famousphil.com/blog/2011/03/web-lecture-series-week-2/</link>
		<comments>http://famousphil.com/blog/2011/03/web-lecture-series-week-2/#comments</comments>
		<pubDate>Thu, 24 Mar 2011 03:26:57 +0000</pubDate>
		<dc:creator>Famous Phil</dc:creator>
				<category><![CDATA[Hosting / Server Administration]]></category>
		<category><![CDATA[My Site]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Student Life]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[educational]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[ieee student club]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[photoshop]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[putty]]></category>
		<category><![CDATA[university at buffalo]]></category>
		<category><![CDATA[vim]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://famousphil.com/?p=716</guid>
		<description><![CDATA[Phil is doing an Introduction Website Development Lecture Series for the IEEE Student Club at UB.  This is the recap / recorded video from week 2.]]></description>
			<content:encoded><![CDATA[<p>This is a video blog continuation of week 1 (see the previous post).</p>
<p>Background: I was asked by the IEEE student club at UB (<a href="http://wings.buffalo.edu/sa/ieee">http://wings.buffalo.edu/sa/ieee</a>) to redo my lecture series on developing websites.  I know that my website isn&#8217;t the best visually designed website in the world (and I&#8217;m actively looking for talent that can help me fix this in exchange for my programming skills), but I do know a lot about how to code websites well.  Anyways, here are the videos from Lecture 2.  As always, thanks for reading!</p>
<p>Part 1:<br />
<object type="application/x-shockwave-flash" style="width:450px; height:366px;" data="http://www.youtube.com/v/9mN4qegK4lE"><param name="movie" value="http://www.youtube.com/v/9mN4qegK4lE" /></object></p>
<p>Part 2:<br />
<object type="application/x-shockwave-flash" style="width:450px; height:366px;" data="http://www.youtube.com/v/aZcgpRlIWSA"><param name="movie" value="http://www.youtube.com/v/aZcgpRlIWSA" /></object></p>
<p>Part 3:<br />
<object type="application/x-shockwave-flash" style="width:450px; height:366px;" data="http://www.youtube.com/v/ih1_Dlz3AXY"><param name="movie" value="http://www.youtube.com/v/ih1_Dlz3AXY" /></object></p>
<p>Part 4:<br />
<object type="application/x-shockwave-flash" style="width:450px; height:366px;" data="http://www.youtube.com/v/4i24FeAwm2M"><param name="movie" value="http://www.youtube.com/v/4i24FeAwm2M" /></object></p>
<p>Part 5:<br />
<object type="application/x-shockwave-flash" style="width:450px; height:366px;" data="http://www.youtube.com/v/Ebhz0iKGlOc"><param name="movie" value="http://www.youtube.com/v/Ebhz0iKGlOc" /></object></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://famousphil.com/blog/2011/03/web-lecture-series-week-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Lecture Series &#8211; Week 1</title>
		<link>http://famousphil.com/blog/2011/03/web-lecture-series-week-1/</link>
		<comments>http://famousphil.com/blog/2011/03/web-lecture-series-week-1/#comments</comments>
		<pubDate>Thu, 10 Mar 2011 20:00:07 +0000</pubDate>
		<dc:creator>Famous Phil</dc:creator>
				<category><![CDATA[Hosting / Server Administration]]></category>
		<category><![CDATA[My Site]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Student Life]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[education]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[ieee]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[putty]]></category>
		<category><![CDATA[student club]]></category>
		<category><![CDATA[university at buffalo]]></category>
		<category><![CDATA[vim]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://famousphil.com/?p=697</guid>
		<description><![CDATA[Phil is doing an Introduction Website Development Lecture Series for the IEEE Student Club at UB.  This is the recap / recorded video from week 1.]]></description>
			<content:encoded><![CDATA[<p>It seems like its been a while since I last posted to my blog.  As usual, the mid semester grind is hitting my time hard, so I don&#8217;t have the resources to write here as often.  Thankfully this is my last semester as a Masters student, *yay*.   So coming up soon, I will be writing a blog on regular expressions, I&#8217;m still in the process of making it, so it might take a while.  I&#8217;ve also got a great blog for April fools day, so stay tuned for that!</p>
<p>Now onto the topic of this blog.  This is a video blog (go figure, right?).  Actually, I was asked by the IEEE student club at UB (<a href="http://wings.buffalo.edu/sa/ieee">http://wings.buffalo.edu/sa/ieee</a>) to redo my lecture series on developing websites.  I know that my website isn&#8217;t the best visually designed website in the world (and I&#8217;m actively looking for talent that can help me fix this in exchange for my programming skills), but I do know a lot about how to code websites well.</p>
<p>Being the kind of person who likes to share knowledge, I agreed to give the lecture series with updated information.  <a href="http://www.johnciacia.com">John</a> suggested that I video tape the lectures and post them to my blog, which I thought was a great suggestion.  So in the next 5 to 6 weeks, I will be posting youtube 720p HD recordings of the lecture series to here.  Feel free to watch it and make comments about my presentation skills.  I know that I&#8217;m not perfect, so I&#8217;m always open to suggestions!</p>
<p>As always, thanks for reading!</p>
<p>Part 1:<br />
<object type="application/x-shockwave-flash" style="width:450px; height:366px;" data="http://www.youtube.com/v/YV3rL2AGVEw"><param name="movie" value="http://www.youtube.com/v/YV3rL2AGVEw" /></object></p>
<p>Part 2:<br />
<object type="application/x-shockwave-flash" style="width:450px; height:366px;" data="http://www.youtube.com/v/Z-tdiHBPD9s"><param name="movie" value="http://www.youtube.com/v/Z-tdiHBPD9s" /></object></p>
<p>Part 3:<br />
<object type="application/x-shockwave-flash" style="width:450px; height:366px;" data="http://www.youtube.com/v/hyDu5Lr2Uzo"><param name="movie" value="http://www.youtube.com/v/hyDu5Lr2Uzo" /></object></p>
]]></content:encoded>
			<wfw:commentRss>http://famousphil.com/blog/2011/03/web-lecture-series-week-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exchange 2010 Calendar to ICalendar using ASP.net / C# &#8211; Coding Blog 2/2</title>
		<link>http://famousphil.com/blog/2010/08/exchange-2010-calendar-to-icalendar-using-asp-net-c-coding-blog-22/</link>
		<comments>http://famousphil.com/blog/2010/08/exchange-2010-calendar-to-icalendar-using-asp-net-c-coding-blog-22/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 04:02:23 +0000</pubDate>
		<dc:creator>Famous Phil</dc:creator>
				<category><![CDATA[My Site]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[ASP.net]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[exchange 2010]]></category>
		<category><![CDATA[extract]]></category>
		<category><![CDATA[ical]]></category>
		<category><![CDATA[icalendar]]></category>
		<category><![CDATA[ics]]></category>
		<category><![CDATA[VCAL]]></category>
		<category><![CDATA[vcalendar]]></category>
		<category><![CDATA[visual studio]]></category>

		<guid isPermaLink="false">http://famousphil.com/?p=539</guid>
		<description><![CDATA[Phil releases a fairly step by step guide on how to convert an Exchange 2010 Calendar into VCalendar / ICalendar format using ASP.NET in Visual Studio 2010.]]></description>
			<content:encoded><![CDATA[<p><strong>Reminders</strong>: As with anything I post, I ask that you provide a backlink to my code if you use it (if you don’t, its considered plagiarism).  Also, the code below is the outcome of 2 days in ASP.net as an excursion, I’m sure that my code could be improved vastly.  I’m also not going to baby step through this, so you’re going to have to be a somewhat experienced programmer to follow along with the rest of my blog.  One last thing: If you feel the urge to donate to me for my time (provided this solution helped you), please use the NEW donate button in the footer, I appreciate it.<span id="more-539"></span></p>
<p>In Visual Studio 2010, create a new empty website in C#.  I’d recommend giving this website a logical name, mine is named VCalendarGenerator.  Once you’re settled, right click the actual website and goto “add service reference”.  In the address box, you want to enter the service reference Address, which is the path to exchange.asmx.  This will be something like <a href="https://%3cfqdn%3e/ews/exchange.asmx">https://<fqdn>/ews/exchange.asmx</a>.  At this point, click go and let it find the service information.  You will be prompted to login, you MUST use an administrator’s account on the exchange server, your regular OWA login will not work.  After this step, you will not need to be an administrator on the exchange server.  In the namespace box, enter Exchange (or whatever you wish).  Click the Advanced button, then click the add web reference button.  In the URL, enter the same address and hit enter.  You will probably have to allow some prompts and ok allowing only the secure content through (which is fine).  Once that is all set, change the web reference name to “ewsclass” without the quotes and click ok.</p>
<p>Now we’re all set up to program in Visual Studio.  Since I want the Default page of the website to load a VCalendar (I don’t want this website to do anything else), I’m going to right click the project and add a new item.  The item that I want to add is a web form.  This should be bring up a new page in the list called Default.aspx.  Now we want to right click on Default.aspx and select view code.    Within the partial class scope, you want to insert the following function:</p>
<pre class="brush: csharp; title: GenerateVCalendar Function in C#; notranslate">
/**
     * Description: Prints a VCalendar Complaint File for web distribution from an Exchange 2010 Account - TESTED
     * This file accompanies the FamousPhil.com Blog Post regarding ASP.net and Exchange -&gt; VCalendar (August 2010)
     * NOTE: Written on ASP.NET Framework 4.0
     * NOTE: Here are the proper imports for your class file (usually placed above the class name)
     using System;
     using ewsclass;
     using System.Net;

     * NOTE: Page that this function prints to MUST contain no additional content
     Recommended Display Page code:
     &lt;%@ Language=&quot;C#&quot; CodeFile=&quot;VCalendar.aspx.cs&quot; Inherits=&quot;VCalendar&quot; %&gt;
     &lt;% GenerateVCalendar(); %&gt;

     *
     * Accepts the following parameters:
     *
     * User - Exchange OWA Username (without the domain)
     * Password - Exchange OWA Password for Username Specified
     * fqdn - Fully Qualified Domain Name (OWA Access Top Level Domain like yahoo.com)
     * esburl - Exchange Web Services URL - Normally https://&lt;fqdn&gt;/ews/exchange.asmx
     * datestart - Integer for how many days from today to start outputing calendar events (-30 would mean from 30 days ago)
     * dateend - Integer for how many days from today to end output calendar events (30 would mean 30 days from today into the future)
     *
     * To minimize Exchange load and time outs (and slow load speeds), keep the date range under 360 days (a full year)
     */

    public void GenerateVCalendar(String user, String password, String fqdn, String esburl, int datestart, int dateend)
    {

        Response.ContentType = &quot;text/calendar&quot;;
        Response.AddHeader(&quot;Content-disposition&quot;, &quot;attachment; filename=calendar.ics&quot;);
        Response.Write(&quot;BEGIN:VCALENDAR&quot;);
        Response.Write(System.Environment.NewLine);
        Response.Write(&quot;PRODID:-//Matthouse.us//Matthouse.us / Famousphil.com Exchange to VCAL v1.00//EN&quot;);
        Response.Write(System.Environment.NewLine);
        Response.Write(&quot;VERSION:2.0&quot;);
        Response.Write(System.Environment.NewLine);
        Response.Write(&quot;CALSCALE:GREGORIAN&quot;);
        Response.Write(System.Environment.NewLine);
        Response.Write(&quot;METHOD:PUBLISH&quot;);
        Response.Write(System.Environment.NewLine);
        Response.Write(&quot;X-WR-CALNAME:Exported Exchange Calendar For user:&quot;+user);
        Response.Write(System.Environment.NewLine);

        ExchangeServiceBinding esb = new ExchangeServiceBinding();
        esb.Credentials = new NetworkCredential(user, password, fqdn);
        esb.Url = esburl;
        esb.RequestServerVersionValue = new RequestServerVersion();
        esb.RequestServerVersionValue.Version = ExchangeVersionType.Exchange2010;

        //Calendar extraction code partially found from
        //http://weblogs.asp.net/psperanza/archive/2008/03/18/getting-calendar-items-using-exchange-web-services.aspx

        FindItemType findItemRequest = new FindItemType();
        CalendarViewType calendarView = new CalendarViewType();
        calendarView.StartDate = DateTime.Now.AddDays(datestart);
        calendarView.EndDate = DateTime.Now.AddDays(dateend);
        calendarView.MaxEntriesReturned = 5000;
        calendarView.MaxEntriesReturnedSpecified = true;
        findItemRequest.Item = calendarView;
        ItemResponseShapeType itemProperties = new ItemResponseShapeType();
        itemProperties.BaseShape = DefaultShapeNamesType.AllProperties;
        findItemRequest.ItemShape = itemProperties;
        DistinguishedFolderIdType[] folderIDArray = new DistinguishedFolderIdType[1];
        folderIDArray[0] = new DistinguishedFolderIdType();
        folderIDArray[0].Id = DistinguishedFolderIdNameType.calendar;
        findItemRequest.ParentFolderIds = folderIDArray;
        findItemRequest.Traversal = ItemQueryTraversalType.Shallow;
        try
        {
            FindItemResponseType findItemResponse =
                esb.FindItem(findItemRequest);
            ArrayOfResponseMessagesType responseMessages =
                findItemResponse.ResponseMessages;
            ResponseMessageType[] rmta = responseMessages.Items;
            int folderNumber = 0;
            foreach (ResponseMessageType rmt in rmta)
            {
                FindItemResponseMessageType firmt =
                    rmt as FindItemResponseMessageType;
                if (firmt.RootFolder == null)
                    continue;
                FindItemParentType fipt = firmt.RootFolder;
                object obj = fipt.Item;
                if (obj is ArrayOfRealItemsType)
                {
                    ArrayOfRealItemsType items =
                        (obj as ArrayOfRealItemsType);
                    if (items.Items == null)
                    {
                        folderNumber++;
                    }
                    else
                    {
                        foreach (ItemType it in items.Items)
                        {
                            if (it is CalendarItemType)
                            {
                                CalendarItemType cal = (CalendarItemType)it;

                                Response.Write(&quot;BEGIN:VEVENT&quot;);
                                Response.Write(System.Environment.NewLine);
                                Response.Write(&quot;UID:&quot; + DateTime.Now.ToUniversalTime().ToString(&quot;yyyyMMddTHHmmssZ&quot;) + &quot;@&quot;+fqdn);
                                Response.Write(System.Environment.NewLine);
                                Response.Write(&quot;DTSTAMP:&quot; + DateTime.Now.ToUniversalTime().ToString(&quot;yyyyMMddTHHmmssZ&quot;));
                                Response.Write(System.Environment.NewLine);
                                Response.Write(&quot;DTSTART:&quot; + cal.Start.ToUniversalTime().ToString(&quot;yyyyMMddTHHmmssZ&quot;));
                                Response.Write(System.Environment.NewLine);
                                Response.Write(&quot;DTEND:&quot; + cal.End.ToUniversalTime().ToString(&quot;yyyyMMddTHHmmssZ&quot;));
                                Response.Write(System.Environment.NewLine);
                                Response.Write(&quot;SUMMARY:&quot; + cal.Subject);
                                Response.Write(System.Environment.NewLine);
                                Response.Write(&quot;LOCATION:&quot; + cal.Location);
                                Response.Write(System.Environment.NewLine);
                                Response.Write(&quot;DESCRIPTION:&quot; + cal.Body);
                                Response.Write(System.Environment.NewLine);
                                Response.Write(&quot;END:VEVENT&quot;);
                                Response.Write(System.Environment.NewLine);

                            }
                        }
                        folderNumber++;
                    }
                }
            }
        }
        catch (Exception e)
        {
            throw;
        }
        finally
        {
        }
        Response.Write(System.Environment.NewLine);
        Response.Write(&quot;END:VCALENDAR&quot;);
        Response.Write(System.Environment.NewLine);
    }
</pre>
<p>Save the default.aspx.cs file.  Let’s open up Default.aspx now and remove all the default HTML and body ASP code (mostly forms) that is present in that file except for the top line that starts with <% (which is the asp tag).  We’re going to replace this with:</p>
<p><%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %></p>
<p><% GenerateVCalendar(); %></p>
<p>If you know anything about code, you should realize that this is an improper call.  Using the parameters defined in the block comment above my code, fill in this function appropriately.  Once everything looks good, right click your project and publish it to an IIS server.  I had a few difficulties making it work with IIS at first, but those were all solved after I reinstalled the .NET Framework 4 update on my IIS server (which I consider to be an administration issue, not a developer issue).</p>
<p><strong>I’ve decided against posting my full Visual Studio project online because I’ve already given you 95% of what you need to make this work.  I’ve discovered that programmers who are learning like to copy paste whatever code claims to do what they want without looking, and this leads to incompetent programmers!  Experienced / intermediate coders (with little ASP.NET experience) will immediately understand what I&#8217;m saying and fill in the pieces quickly, and that is the goal of this blog post.</strong></p>
<p><strong><em>One final note about FamousPhil&#8217;s recent design change</em></strong>: I will soon release the new calendar to my site (making the calendar icon work) sometime this weekend.  My goal is to rewrite the code above into a local application which can be run from the command line to use fewer server resources.  I also see some other issues with the header not working on Internet Explorer, so I will soon be fixing that also.</p>
]]></content:encoded>
			<wfw:commentRss>http://famousphil.com/blog/2010/08/exchange-2010-calendar-to-icalendar-using-asp-net-c-coding-blog-22/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
		<item>
		<title>New Comment Spam Policy</title>
		<link>http://famousphil.com/blog/2010/08/new-comment-spam-policy/</link>
		<comments>http://famousphil.com/blog/2010/08/new-comment-spam-policy/#comments</comments>
		<pubDate>Sat, 07 Aug 2010 16:39:55 +0000</pubDate>
		<dc:creator>Famous Phil</dc:creator>
				<category><![CDATA[My Site]]></category>
		<category><![CDATA[policy update]]></category>
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false">http://famousphil.com/?p=530</guid>
		<description><![CDATA[Phil's new comment approval policy is enclosed.]]></description>
			<content:encoded><![CDATA[<p>This is more an update than anything else.  I have finally taken the time to prune some of the comments in the past year on FamousPhil.  In the future, I will be only approving links that either are track backs or contain non SEO titles.  I have never minded allowing comments, but the spam volume that I&#8217;ve begun seeing is just too unreasonable to continue handling without changing my policies. In the past, I&#8217;ve approved comments that contain text that pertains to the post, but I just can&#8217;t continue on that course <img src='http://famousphil.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>In the next week or so, I will also be disabling user registrations, along with pruning the user database (except to the guest posters who were asked to make an account).  That too has gotten out of hand!</p>
<p>As always, if you want to make a guest post and get a real link back with seo key words, feel free to contact me <img src='http://famousphil.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   I generally don&#8217;t mind the content as long as it has something useful in it that won&#8217;t harm my readers.</p>
]]></content:encoded>
			<wfw:commentRss>http://famousphil.com/blog/2010/08/new-comment-spam-policy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Served from: famousphil.com @ 2012-02-10 07:34:16 by W3 Total Cache -->
