<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Michael Jay Lissner</title><link href="https://michaeljaylissner.com/" rel="alternate"></link><link href="https://michaeljaylissner.com/feeds/tag/blog" rel="self"></link><id>https://michaeljaylissner.com/</id><updated>2014-08-27T00:00:00-07:00</updated><entry><title>New Version of the Site is Now Live</title><link href="https://michaeljaylissner.com/posts/2014/08/27/site-v5-is-go/" rel="alternate"></link><updated>2014-08-27T00:00:00-07:00</updated><author><name>Mike Lissner</name></author><id>tag:michaeljaylissner.com,2014-08-27:posts/2014/08/27/site-v5-is-go/</id><summary type="html">
&lt;p&gt;I have big news today for the small world of people who read my blog regularly:
A new version of the site is now live and the old version shall die a quick death. &lt;/p&gt;
&lt;p&gt;Version 4 was pretty nice though, while it lasted:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Site v4" src="https://michaeljaylissner.com/images/oldsite/v4.png"/&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Other old versions of the site &lt;a href="https://michaeljaylissner.com/about"&gt;still available&lt;/a&gt;!&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="the-improvements"&gt;The improvements&lt;/h2&gt;
&lt;p&gt;This new version comes with some big improvements that I’m quite 
pleased with:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;If you find typos in a blog post, you can edit them on Github and I can 
   easily integrate your changes. Check out the link on the right to 
   edit the typos in this very page. (I’ve left a few conspicuous ones as a 
   treasure hunt for the reader!)&lt;/li&gt;
&lt;li&gt;The site is now &lt;em&gt;much&lt;/em&gt; faster and can handle immense traffic without a 
   hitch, thanks to being hosted by &lt;a href="https://pages.github.com/"&gt;Github Pages&lt;/a&gt;. The previous version would
   have occasional hiccups during times of high traffic – something that’s 
   really quite untenable.&lt;/li&gt;
&lt;li&gt;Comments are now moved to &lt;a href="https://disqus.com"&gt;Disqus&lt;/a&gt;, though unfortunately old comments have
   not made the jump to the new version of the blog. Comments are collapsed by 
   default so the scrollbar actually represents the length of a 
   highly-commented post.&lt;/li&gt;
&lt;li&gt;The site now looks bad-ass. Regardless of whether you’re on a phone, tablet
   computer, or what-have-you, it’s going to look good.&lt;/li&gt;
&lt;li&gt;All content has been categorized as well as tagged, as you can see in the 
   sidebar. There are Atom feeds for each.&lt;/li&gt;
&lt;li&gt;The homepage has a new design that focuses on my projects and bio, and then 
   has recent posts below that.&lt;/li&gt;
&lt;li&gt;Long articles like this one get an automatic table of contents on the left.&lt;/li&gt;
&lt;li&gt;The site is now optimized for speed dial in Opera and to be made into apps
   on mobile phones and tablets. For example, if you’re reading this on 
   Android Chrome, you can simply click “Add to homescreen” in the &lt;code&gt;⋮&lt;/code&gt;
   thing and you’ll be all set.&lt;/li&gt;
&lt;li&gt;Security is now invincible: No more webserver to update, no more database, 
   no more outdated Drupal. It’s basically impossible to hack the new site. 
   I’ve also added my &lt;a href="https://michaeljaylissner.com/archive/mike.gpg"&gt;&lt;span class="caps"&gt;PGP&lt;/span&gt; key&lt;/a&gt; to the &lt;a href="https://michaeljaylissner.com/contact"&gt;contact page&lt;/a&gt;, for those interested. &lt;/li&gt;
&lt;li&gt;The entire site is now static and doesn’t require that I pay for or maintain
   a server or database. Bonus!&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;So those are the high-level changes you can see as of now. If you’re interested
in the technical nitty-gritty, read on.&lt;/p&gt;
&lt;h2 id="the-tech"&gt;The Tech&lt;/h2&gt;
&lt;p&gt;The original motivation to rebuild the site came when the old version kept 
overwhelming the server that was running it and requiring that I step in to 
make it work again. And if that weren’t annoying enough, I have been paying
for that server for the past several years, which just seems a bit silly for
a simple blog like this one. &lt;/p&gt;
&lt;p&gt;The solution? A so-called &lt;a href="http://staticsitegenerators.net/"&gt;Static Site Generator&lt;/a&gt; or &lt;span class="caps"&gt;SSG&lt;/span&gt;. With one of these,
the paradigm for your site totally changes. Instead of having a dynamic site
that loads every time somebody visits the page or makes a comment, you 
generate the &lt;em&gt;entire&lt;/em&gt; website on your laptop (this takes about 30 seconds), 
creating static &lt;span class="caps"&gt;HTML&lt;/span&gt;, and then push that to some cloud provider of choice (in 
my case, I use Github pages for this because it’s free and easy).&lt;/p&gt;
&lt;p&gt;There are about 300 SSGs right now and the one I eventually landed on was 
&lt;a href="https://github.com/getpelican/pelican/"&gt;Pelican&lt;/a&gt; due to it being written in a language I knew (Python), and due to
it having lots of good themes and plugins. I briefly tried to make a switch to
&lt;a href="http://hugo.spf13.com/"&gt;Hugo&lt;/a&gt; instead because it’s written in Go and is much faster at generating 
content, but the documentation for Hugo isn’t very good yet, and &lt;a href="https://github.com/spf13/hugo/issues/96"&gt;it
doesn’t support basic pagination&lt;/a&gt;, which is something of a showstopper. &lt;/p&gt;
&lt;h3 id="switching-to-a-ssg-from-drupal"&gt;Switching to a &lt;span class="caps"&gt;SSG&lt;/span&gt; from Drupal&lt;/h3&gt;
&lt;p&gt;Switching from Drupal was pretty awful and took a &lt;em&gt;lot&lt;/em&gt; of effort — 
&lt;em&gt;days&lt;/em&gt; of it! The goal was to get all of my posts exported from Drupal, 
convert them all to markdown, and to get them all live on Github pages. Let’s 
go through this process together. &lt;/p&gt;
&lt;h3 id="exporting-from-drupal"&gt;Exporting from Drupal&lt;/h3&gt;
&lt;p&gt;This step of the puzzle was, shall we say, a pain. Nobody has yet made a 
Drupal to Pelican converter, so I had to do it myself. &lt;a href="https://michaeljaylissner.com/scripts/drupal_to_hugo.py"&gt;The script&lt;/a&gt; that I 
wrote dug directly into Drupal’s database, pulled out the contents
and converted them to a format that Hugo could understand. At the time I 
thought Hugo would be the &lt;span class="caps"&gt;SSG&lt;/span&gt; for me, but later I switched to Pelican, and had
to write &lt;a href="https://michaeljaylissner.com/scripts/convert_from_hugo_to_pelican.py"&gt;another script&lt;/a&gt; to make the conversion from Hugo to Pelican.&lt;/p&gt;
&lt;h3 id="problems-with-drupal"&gt;Problems with Drupal&lt;/h3&gt;
&lt;p&gt;This was a good start, but Drupal has a few funny conventions. One is that it
allows files to be “attached” to blog posts. Most blogs don’t do this (Pelican
and Hugo included), so I had to go through all of the items that I attached to 
Drupal posts and convert them to inline links instead. This took a while.&lt;/p&gt;
&lt;p&gt;Another problem I ran into is that the posts themselves were written directly 
in &lt;span class="caps"&gt;HTML&lt;/span&gt;, which makes them kind of awful, and not very portable between blog
engines. Content for Hugo or Pelican should be written in Markdown, so I began
making this conversion to the &lt;a href="/archives.html"&gt;200+ posts&lt;/a&gt; on the site. In general, the process
for this was to find a post and begin cleaning it up. If I encountered 
something that a computer could reliably fix across all the posts (for example,
&lt;code&gt;&amp;lt;i&amp;gt;&lt;/code&gt; can be converted to &lt;code&gt;*&lt;/code&gt; and &lt;code&gt;&amp;lt;strong&amp;gt;&lt;/code&gt; to &lt;code&gt;**&lt;/code&gt;), I wrote a little script 
to do so. In the end, this took a lot of time, but I now have a collection of
a few hundred nicely-formed markdown files that power the blog.&lt;/p&gt;
&lt;h3 id="moving-to-github-pages"&gt;Moving to Github Pages&lt;/h3&gt;
&lt;p&gt;With all of the content converted properly, the remaining step was to get the
project live on Github. I found this process confusing, but the process is 
basically this:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;You need to take the output file from Pelican and put it into a Git 
branch called &lt;code&gt;gh-pages&lt;/code&gt;. To do this with Pelican is remarkably easy, as there is
a simple command you can run: &lt;code&gt;make github&lt;/code&gt;. Run that, and you’ll be all set,
with the content pushed and everything.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You need &lt;a href="https://github.com/mlissner/michaeljaylissner.com/blob/gh-pages/CNAME"&gt;a file named &lt;span class="caps"&gt;CNAME&lt;/span&gt;&lt;/a&gt; that simply contains the domain of your 
website. This is easy in theory — it’s just a plaintext file — but in 
practice it is difficult because you need the file to be created by the 
&lt;code&gt;make github&lt;/code&gt; command mentioned above. To do that add the &lt;span class="caps"&gt;CNAME&lt;/span&gt; file to a
directory at &lt;code&gt;content/extra/CNAME&lt;/code&gt; and then add the following to your pelican
configuration file:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="n"&gt;EXTRA_PATH_METADATA&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s"&gt;'extra/CNAME'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s"&gt;'path'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;'CNAME'&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="n"&gt;STATIC_PATHS&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'extra/CNAME'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Do that, and the file will get copied over whenever you run &lt;code&gt;make github&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If you’ve done this correctly, you’ll see evidence of such in the 
repository’s settings page on Github, where it will tell you the domain
in the &lt;span class="caps"&gt;CNAME&lt;/span&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You need to configure your &lt;span class="caps"&gt;DNS&lt;/span&gt; provider to point your domain to Github.
This varies by provider, but I can tell you that your final version should
look something like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="err"&gt;↪&lt;/span&gt; &lt;span class="n"&gt;dig&lt;/span&gt; &lt;span class="n"&gt;www&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;michaeljaylissner&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;com&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="n"&gt;nostats&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="n"&gt;nocomments&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="n"&gt;nocmd&lt;/span&gt;

&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;DiG&lt;/span&gt; &lt;span class="mf"&gt;9.9.5&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;Ubuntu&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;www&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;michaeljaylissner&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;com&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="n"&gt;nostats&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="n"&gt;nocomments&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="n"&gt;nocmd&lt;/span&gt;
&lt;span class="p"&gt;;;&lt;/span&gt; &lt;span class="n"&gt;global&lt;/span&gt; &lt;span class="n"&gt;options&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="n"&gt;cmd&lt;/span&gt;
&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="n"&gt;www&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;michaeljaylissner&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;com&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="n"&gt;IN&lt;/span&gt;  &lt;span class="n"&gt;A&lt;/span&gt;
&lt;span class="n"&gt;www&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;michaeljaylissner&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;com&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="mi"&gt;3600&lt;/span&gt; &lt;span class="n"&gt;IN&lt;/span&gt;  &lt;span class="n"&gt;CNAME&lt;/span&gt;   &lt;span class="n"&gt;mlissner&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;github&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;io&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;span class="n"&gt;mlissner&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;github&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;io&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="mi"&gt;3600&lt;/span&gt;    &lt;span class="n"&gt;IN&lt;/span&gt;  &lt;span class="n"&gt;CNAME&lt;/span&gt;   &lt;span class="n"&gt;github&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;map&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fastly&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;net&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;span class="n"&gt;github&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;map&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fastly&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;net&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;  &lt;span class="mi"&gt;2&lt;/span&gt;   &lt;span class="n"&gt;IN&lt;/span&gt;  &lt;span class="n"&gt;A&lt;/span&gt;   &lt;span class="mf"&gt;199.27.79.133&lt;/span&gt;
&lt;span class="n"&gt;fastly&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;net&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;     &lt;span class="mi"&gt;66087&lt;/span&gt;   &lt;span class="n"&gt;IN&lt;/span&gt;  &lt;span class="n"&gt;NS&lt;/span&gt;  &lt;span class="n"&gt;ns4&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;p04&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dynect&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;net&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;span class="n"&gt;fastly&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;net&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;     &lt;span class="mi"&gt;66087&lt;/span&gt;   &lt;span class="n"&gt;IN&lt;/span&gt;  &lt;span class="n"&gt;NS&lt;/span&gt;  &lt;span class="n"&gt;ns3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;p04&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dynect&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;net&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;span class="n"&gt;fastly&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;net&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;     &lt;span class="mi"&gt;66087&lt;/span&gt;   &lt;span class="n"&gt;IN&lt;/span&gt;  &lt;span class="n"&gt;NS&lt;/span&gt;  &lt;span class="n"&gt;ns2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;p04&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dynect&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;net&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;span class="n"&gt;fastly&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;net&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;     &lt;span class="mi"&gt;66087&lt;/span&gt;   &lt;span class="n"&gt;IN&lt;/span&gt;  &lt;span class="n"&gt;NS&lt;/span&gt;  &lt;span class="n"&gt;ns1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;p04&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;dynect&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;net&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="final-words"&gt;Final Words&lt;/h2&gt;
&lt;p&gt;This is been a much larger undertaking than I expected, with tons of corner
cases that I wanted to fix before releasing a new version of the site. In the 
end though, this has been a good investment that I can expect to keep the site
going for the next five to ten years.&lt;/p&gt;
&lt;p&gt;I hope you enjoy the new look and new features.&lt;/p&gt;</summary><category term="meta"></category><category term="blog"></category><category term="me"></category></entry><entry><title>Our New Zealand Blog</title><link href="https://michaeljaylissner.com/posts/2013/11/27/our-new-zealand-blog/" rel="alternate"></link><updated>2013-11-27T10:19:46-08:00</updated><author><name>Mike Lissner</name></author><id>tag:michaeljaylissner.com,2013-11-27:posts/2013/11/27/our-new-zealand-blog/</id><summary type="html">&lt;p&gt;If you seek our blog about our journey on the Te Araroa trail, it lies down 
&lt;a href="http://trampnewzealand.wordpress.com/"&gt;this path&lt;/a&gt;.&lt;/p&gt;</summary><category term="te araroa"></category><category term="new zealand"></category><category term="blog"></category><category term="Z"></category></entry><entry><title>Privatizing the Twitter API Feed</title><link href="https://michaeljaylissner.com/posts/2009/03/20/privitizing-twitter-api-feed/" rel="alternate"></link><updated>2009-03-20T12:34:31-07:00</updated><author><name>Mike Lissner</name></author><id>tag:michaeljaylissner.com,2009-03-20:posts/2009/03/20/privitizing-twitter-api-feed/</id><summary type="html">&lt;p&gt;&lt;span class="caps"&gt;UPDATE&lt;/span&gt;: Check the comments for a version with&amp;nbsp;caching.&lt;/p&gt;
&lt;p&gt;A friend of mine recently had a rather unfortunate event involving her twitter 
public timeline, so I thought the time had come to make mine private, more or&amp;nbsp;less.&lt;/p&gt;
&lt;p&gt;As a result, I needed to update the code that pulls my most recent Twitter 
posts into the left hand column so that it would authenticate using the 
Twitter &lt;span class="caps"&gt;API&lt;/span&gt;. Here&amp;#8217;s the new code - it ain&amp;#8217;t pretty, but it&amp;nbsp;works:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt;

    &lt;span class="c1"&gt;// Your twitter username &amp;amp; password.&lt;/span&gt;
    &lt;span class="nv"&gt;$username&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;YOUR_USERNAME&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nv"&gt;$password&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;YOUR_TWITTER_PASSWORD&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="c1"&gt;//Concatenate the username and password&lt;/span&gt;
    &lt;span class="nv"&gt;$userpass&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$username&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;:&amp;quot;&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt; &lt;span class="nv"&gt;$password&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="c1"&gt;//Make up the feed URL&lt;/span&gt;
    &lt;span class="nv"&gt;$feed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;http://twitter.com/statuses/user_timeline.atom?count=1&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="c1"&gt;//A function to parse the atom feed and pull out the useful info.&lt;/span&gt;
    &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;parse_feed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$feed&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$username&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nv"&gt;$stepOne&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;explode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&amp;lt;content type=&lt;/span&gt;&lt;span class="se"&gt;\&amp;quot;&lt;/span&gt;&lt;span class="s2"&gt;html&lt;/span&gt;&lt;span class="se"&gt;\&amp;quot;&lt;/span&gt;&lt;span class="s2"&gt;&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$feed&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="nv"&gt;$stepTwo&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;explode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&amp;lt;/content&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$stepOne&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;

      &lt;span class="nv"&gt;$tweet&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nv"&gt;$stepTwo&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
      &lt;span class="nv"&gt;$tweet&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;str_replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&amp;amp;lt;&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;&amp;lt;&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$tweet&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="nv"&gt;$tweet&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;str_replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&amp;amp;gt;&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;&amp;gt;&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$tweet&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="nv"&gt;$tweet&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;str_replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$username&lt;/span&gt; &lt;span class="o"&gt;.&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;:&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$tweet&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; 
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nv"&gt;$tweet&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="c1"&gt;//Create a curl object, give it the feed and authentication&lt;/span&gt;
    &lt;span class="nv"&gt;$curl_handle&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;curl_init&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="nb"&gt;curl_setopt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$curl_handle&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;CURLOPT_URL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$feed&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nb"&gt;curl_setopt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$curl_handle&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;CURLOPT_USERPWD&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$userpass&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="c1"&gt;//Return the result, don&amp;#39;t print it.&lt;/span&gt;
    &lt;span class="nb"&gt;curl_setopt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$curl_handle&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;CURLOPT_RETURNTRANSFER&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="c1"&gt;//Make the connection, set the variable, close the connection.&lt;/span&gt;
    &lt;span class="nv"&gt;$twitterFeed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;curl_exec&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$curl_handle&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nb"&gt;curl_close&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$curl_handle&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="c1"&gt;//Echo the parsed feed. Done.&lt;/span&gt;
    &lt;span class="k"&gt;echo&lt;/span&gt; &lt;span class="nx"&gt;parse_feed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;$twitterFeed&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nv"&gt;$username&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="cp"&gt;?&amp;gt;&lt;/span&gt;&lt;span class="x"&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;One dependency is the php-curl library, and after you install that, apache2 
will want a&amp;nbsp;restart. &lt;/p&gt;</summary><category term="blog"></category><category term="Twitter"></category></entry><entry><title>Twitter (and Facebook) Integrated</title><link href="https://michaeljaylissner.com/posts/2009/01/25/twitter-and-facebook-integrated/" rel="alternate"></link><updated>2009-01-25T13:03:03-08:00</updated><author><name>Mike Lissner</name></author><id>tag:michaeljaylissner.com,2009-01-25:posts/2009/01/25/twitter-and-facebook-integrated/</id><summary type="html">&lt;p&gt;I upgraded the site a bit today by adding my Twitter/Facebook feed to left-hand sidebar. To a &lt;a href="http://spookyismy.name/resources/latest-twitter-update-with-phprss-_-part-one"&gt;teenager in Colorado&lt;/a&gt; I am indebted for this script. Jeez, they just get younger and&amp;nbsp;younger. &lt;/p&gt;
&lt;p&gt;Let me know if you catch any&amp;nbsp;bugginess. &lt;/p&gt;</summary><category term="blog"></category><category term="Twitter"></category><category term="facebook"></category></entry><entry><title>Marvelous RSS, Marvelous Google</title><link href="https://michaeljaylissner.com/posts/2008/01/27/marvelous-rss-marvelous-google/" rel="alternate"></link><updated>2008-01-27T15:36:34-08:00</updated><author><name>Mike Lissner</name></author><id>tag:michaeljaylissner.com,2008-01-27:posts/2008/01/27/marvelous-rss-marvelous-google/</id><summary type="html">&lt;p&gt;I&amp;#8217;ve been working on the site a fair amount lately, and have added a couple of 
new features. The first one is a set of those ubiquitous bookmarking buttons 
for Technorati, del.icio.us, etc. that you should be seeing if you are reading 
this online. I&amp;#8217;ve been trying to optimize this blog for a bit, and I figured 
I probably need these sooner or&amp;nbsp;later.&lt;/p&gt;
&lt;p&gt;The other thing I added today is the &amp;#8220;Subscribe&amp;#8221; block, which for the moment 
is listed on the left under the recent music. I did a little playing around in 
the heart of Drupal, and modified this block so that it has text links for 
&lt;span class="caps"&gt;RSS&lt;/span&gt; and for an email service I just discovered from&amp;nbsp;Google.&lt;/p&gt;</summary><category term="google"></category><category term="blog"></category><category term="drupal"></category><category term="rss"></category></entry><entry><title>Taxonomy Features Are Go</title><link href="https://michaeljaylissner.com/posts/2008/01/13/taxonomy-features-are-go/" rel="alternate"></link><updated>2008-01-13T16:56:44-08:00</updated><author><name>Mike Lissner</name></author><id>tag:michaeljaylissner.com,2008-01-13:posts/2008/01/13/taxonomy-features-are-go/</id><summary type="html">&lt;p&gt;I have been rather busy since starting this blog many months ago, so I never got to finish rounding out its features. One that I have been wanting to figure out and to apply was Drupal&amp;#8217;s taxonomy feature, which allows you to categorize your content as you write&amp;nbsp;it.&lt;/p&gt;
&lt;p&gt;After I turned it on today, I had to make up about 40 terms categorizing the content that I have written thus far, and I am now in the process of quickly going through and applying these tags to my old entries. What&amp;#8217;s cool about having this feature turned on is that in the future, say, when I have 80 gazillion entries about various topics, if you are a reader of the blog, you can easily find entries matching your interests. Assuming, of course, that I write 80 gazillion&amp;nbsp;things.&lt;/p&gt;</summary><category term="blog"></category><category term="infotech"></category><category term="drupal"></category></entry><entry><title>Old Versions of Site are Up</title><link href="https://michaeljaylissner.com/posts/2007/10/11/old-site-is-up-sort-of/" rel="alternate"></link><updated>2007-10-11T19:04:42-07:00</updated><author><name>Mike Lissner</name></author><id>tag:michaeljaylissner.com,2007-10-11:posts/2007/10/11/old-site-is-up-sort-of/</id><summary type="html">&lt;p&gt;I was working on getting the &lt;a href="https://michaeljaylissner.com/archive/oldsite/index.htm"&gt;old versions&lt;/a&gt; of the site up and going 
for history&amp;#8217;s sake, and I have more or less accomplished the task, 
though I learned a very important lesson in the&amp;nbsp;process.&lt;/p&gt;
&lt;p&gt;For one, I learned that if you want to host additional custom directories 
on your drupal site, it&amp;#8217;s a piece of cake: Just make the directories in 
your drupal directory, and you&amp;#8217;re done. For example, my drupal directory is
at &lt;code&gt;/usr/share/drupal-5.1&lt;/code&gt;, so to host a page at michaeljaylissner.com/oldsite, 
I just made a directory at &lt;code&gt;/usr/share/drupal-5.1/oldsite&lt;/code&gt;, put stuff in it, 
and was&amp;nbsp;done.&lt;/p&gt;
&lt;p&gt;The more important lesson was that when hand-coding &lt;span class="caps"&gt;HTML&lt;/span&gt;, as I did in the 
previous version of the site, relative links such as &lt;code&gt;/assets/picture1.jpg&lt;/code&gt; 
are &lt;strong&gt;&lt;span class="caps"&gt;NOT&lt;/span&gt;&lt;/strong&gt; the same as relative links such as assets/picture1.jpg. Both work, 
but only one is actually relative to the current page (the latter one). The 
former one may as well have been written 
&lt;code&gt;michaeljaylissner.com/assets/picture1.jpg&lt;/code&gt;, because that&amp;#8217;s what that first 
slash means.&amp;nbsp;Duh.&lt;/p&gt;
&lt;p&gt;Somehow, I never ran into this problem before now. Anyway, 
if you take the time to check out the old site (which I don&amp;#8217;t really 
recommend), you&amp;#8217;ll find many broken links. This is why. The other project I 
have been working on is getting all of my pictures from the old site set up
on this site in a place where registered users can find them. This is a 
work in progress, but if you&amp;#8217;re a registered user, you might be interested
to see them, if you haven&amp;#8217;t&amp;nbsp;already. &lt;/p&gt;</summary><category term="blog"></category><category term="me"></category></entry><entry><title>This is it. Drupal systems are go.</title><link href="https://michaeljaylissner.com/posts/2007/09/12/drupal-is-go/" rel="alternate"></link><updated>2007-09-12T21:46:59-07:00</updated><author><name>Mike Lissner</name></author><id>tag:michaeljaylissner.com,2007-09-12:posts/2007/09/12/drupal-is-go/</id><summary type="html">&lt;p&gt;Well, I can&amp;#8217;t say I have had a serious blog before, so with this very sentence, I am forging new ground for myself, and through the strange magic of the Internet, for everybody else in the world (except China, who I will now block from this blog by writing the following word:&amp;nbsp;&amp;#8220;democracy&amp;#8221;).&lt;/p&gt;
&lt;p&gt;There&amp;#8217;s a pressure here of course not to have any typos and to make this post significant and poignant, but if I know me - and I think I do - I shouldn&amp;#8217;t set high bars like that for myself. I should just enjoy the medium, allow mistakes early and often, and proceed with the reason I am here to write today, which, according to the title of this post is to discuss the software of this very&amp;nbsp;blog.&lt;/p&gt;
&lt;p&gt;It&amp;#8217;s an interesting thing setting up a blog in your house. For some reason, it&amp;#8217;s really bloody complicated. First, you&amp;#8217;ve got to learn how your house is networked, then how the Internet is networked. Once you think you&amp;#8217;ve got that figured out, you have to get a faster Internet connection (cable as opposed to &lt;span class="caps"&gt;DSL&lt;/span&gt;), and if you are feeling spry, perhaps a static &lt;span class="caps"&gt;IP&lt;/span&gt;. I&amp;#8217;m not feeling spry, and so, dyndns.com is my&amp;nbsp;friend. &lt;/p&gt;
&lt;p&gt;The next step once the networking is figured out is to figure out the software and hardware sides of things. This is not an easy task either. In the end, I have set up two computers to run this here blog. One to run Drupal, Apache, etc., and the other to do the mail serving. For the &lt;span class="caps"&gt;CMS&lt;/span&gt;, I have chosen Drupal because it seems to be all the rage, and because it has a stupid song that got caught in my head for far too long (see youtube for details). Drupal is of course running on &lt;span class="caps"&gt;GNU&lt;/span&gt;+Linux, Apache, &lt;span class="caps"&gt;PHP&lt;/span&gt;, and MySQL. As for the mail server, it would be running Zimbra, but at the moment it is crashed. I can&amp;#8217;t make it stop overheating, and it&amp;#8217;s rather&amp;nbsp;annoying. &lt;/p&gt;
&lt;p&gt;Anyway, once that&amp;#8217;s up and going, everything should be a go, and I will be a proud Internet host. Only one question truly remains: Is my &lt;span class="caps"&gt;IP&lt;/span&gt; on an anti-spam blacklist? We shall soon find&amp;nbsp;out. &lt;/p&gt;</summary><category term="blog"></category><category term="me"></category><category term="drupal"></category></entry></feed>