Habaritag:mattread.com,2020-02-06:atom/8570b76d965d9aabc07ffb82b7ac6c3a35ed2deaMatt Read, WeblogIt says little, does less, means nothing.2016-03-11T23:43:40-05:00New PGP/GnuPG KeyMatt Readhttps://mattread.comtag:mattread.com,2016:new-gpg-key/14577575542016-03-11T23:43:40-05:002016-03-23T19:21:23-04:002016-03-11T23:37:11-05:00<p>I revoked my previous <a href="http://pgp.mit.edu/pks/lookup?op=get&search=0xD404D2C00676CEF9">old key</a> and generate a <a href="http://pgp.mit.edu/pks/lookup?op=vindex&search=0x9B8E27DC9A5F62E1">new one</a>. You can download my new PGP Public Key below. While you’re at it, send me an email to <a href="mailto:matt@mattread.com">matt@mattread.com</a> with your public key and/or certificate.</p>
<ul class="download">
<li><a href="/user/files/matt@mattread.com.asc">GPG Public Key <i class="icon-key"></i></a></li>
</ul>
<p>md5sum: <code>c0b0c396d8f70bfcddb2f710c0bee336 matt@mattread.com.asc</code></p>
hConsole: A Live Habari ConsoleMatt Readhttps://mattread.comtag:mattread.com,2013:hconsole-a-live-habari-debugging-console/13594035242013-10-03T10:55:19-04:002020-02-06T12:56:28-05:002013-10-02T14:54:06-04:00<p>If you have ever written code before, you’ve come across a situation where you needed to debug or test something simple in your code. Doing this with a Command Line Interpreter is quite simple. Type your code, see what comes out. But when it comes to web applications, it’s a little harder. There are <abbr title="HyperText Transfer Protocol">HTTP</abbr> requests, Sessions, Cookies, and a Webserver involved. This is where <a href="https://github.com/habari-extras/hconsole" title="hConsole github repo">hConsole</a> comes in.</p>
<p>hConsole is a live <a href="https://habariproject.org/en/" title="Habari Project's main site">Habari</a> console, or command line, that allows you to evaluate your code directly in your Habari installation, with all the <abbr title="HyperText Transfer Protocol">HTTP</abbr> request, Sessions, etc. there. You can access the entire Habari core, even trigger plugin actions and filters, and view the live result on screen.</p>
<p>Once installed, you simply click on the hConsole button in the bottom right of your screen to bring up the console. In the console you can evaluate any <abbr title="PHP: Hypertext Preprocessor">PHP</abbr> code and utilize the entire Habari base. You can also execute <abbr title="Structured Query Language">SQL</abbr>, to query your Habari’s database directly (Tip: press <kbd>ctrl</kbd>+<kbd>Q</kbd> to run code without the mouse).</p>
<div><figure>
<a href="//farm9.staticflickr.com/8099/8590516105_9d9462457c_b.jpg" class="fancybox"><img alt="hconsole_php" src="//farm9.static.flickr.com/8099/8590516105_9d9462457c.jpg" class="card center"></a>
<figcaption><b>Figure 1</b> Using the debug area to output code.</figcaption>
</figure></div>
<h3>Debugging <abbr title="PHP: Hypertext Preprocessor">PHP</abbr> and Habari</h3>
<p>hConsole has 2 parts; A debug section, for outputting variables and such (<code>Utils::debug()</code> comes in handy here), and the ability to trigger plugin hooks and affect the output of, say, post titles. There is also an option to <code>htmlspecialchars()</code> the output of the debugging code if you wanted to output <abbr title="Hyper Text Markup Language">HTML</abbr> tags, for example. Let’s look at two basic examples:</p>
<div><figure>
<pre class="highlight php">
$test = "this is a test";
echo $test;
</pre>
<figcaption><b>Example 1</b> A simple Debug echo</figcaption>
</figure></div>
<p>The code in example 1 will simply echo the variable <code>$test</code> above the command line in hConsole; The so called “Debug Area”. We can also implement plugin hooks.</p>
<div><figure>
<pre class="highlight php">
filter_post_title_out {
function boo ($title)
{
return $title . ' Boo!';
}
}
</pre>
<figcaption><b>Example 2</b> Filtering Post Titles</figcaption>
</figure></div>
<p>The code in example 2 will register the function <code>boo()</code> to the <code>post_title_out</code> filter. Function <code>boo()</code> then appends <code>" Boo!"</code> to all post titles for the page you are looking at. We can also combine the two and have debug output along will running filters or actions.</p>
<p>Of course these are very simple examples of what can be done with hConsole. In the real world it becomes a very powerful tool.</p>
<h3>Debugging With hConsole</h3>
<p>Let’s look at an example of a real debugging situation where hConsole came in handy. When trying to debug Habari’s internal Cron system it’s hard to tell why it’s failing when <abbr title="PHP: Hypertext Preprocessor">PHP</abbr> is set to use <abbr title="Client URLs">CURL</abbr>. Recently <a href="http://skippy.net" title="Scott's website">Scott</a> was having an issue with a local install, where crons weren’t running.</p>
<p>The issue comes from the fact that Habari makes an asynchronous <abbr title="HyperText Transfer Protocol">HTTP</abbr> call to itself to trigger all the Cronjobs to run. So you never actually see any errors from this, and when <abbr title="Client URLs">CURL</abbr> throws an exception, nothing is in the logs. So to test why Scott’s crons where not running he used hConsole.</p>
<div><figure>
<pre class="highlight php">
$cronurl = URL::get( 'cron',array( 'asyncronous' => Utils::crypt( Options::get( 'public-GUID' ) ) ) );
$request = new RemoteRequest( $cronurl, 'GET', 100 );
$request->execute();
</pre>
<figcaption><b>Example 3</b> Making a request to the cron.</figcaption>
</figure></div>
<p>In example 3 we run the cron trigger using hConsole with a longer timeout so we can see what is happening. And Scott was able to get the error <code>Exception: CURL Error 60: SSL certificate problem, verify that the CA ...</code>. He was then able to add his <abbr title="Secure Socket layer">SSL</abbr> certificate chain to his Apache config so <abbr title="Client URLs">CURL</abbr> accepted the certificate, and crons ran smoothly.</p>
<h3>Debugging <abbr title="Structured Query Language">SQL</abbr></h3>
<p>hConsole will also let you directly run <abbr title="Structured Query Language">SQL</abbr> statements on your database. It will even substitute proper table names when using “curly brackets”, like <code>{posts}</code> becomes <code>habari__posts</code>, or whatever you chose during install. You can run any database query by simply checking the <abbr title="Structured Query Language">SQL</abbr> checkbox, and the results will output in a nicely formatted table.</p>
<div><figure>
<pre class="highlight sql">
select * from {posts} limit 3;
</pre>
<figcaption><b>Example 4</b> SQL selecting the 3 most recent posts.</figcaption>
</figure></div>
<p>And the results from running example 4 show in a nice tabular format so we can easily see what’s in our database.</p>
<div><figure>
<a href="//farm9.static.flickr.com/8506/8591609336_bf476f433f_b.jpg" class="fancybox"><img alt="hconsole_sql" src="//farm9.static.flickr.com/8506/8591609336_bf476f433f.jpg" class="center card"></a>
<figcaption><b>Figure 2</b> Results of selecting the 3 most recent posts.</figcaption>
</figure></div>
<p>You can also, of course, run other statements, such as delete, update, show tables, etc. All statements will output their results, or show an error if there are troubles.</p>
<h2>Developer’s Best Friend</h2>
<p>As you can see hConsole is the plugin and theme developers best friend. Whether you are debugging a core Habari issue, or simply looking at the contents of an object. You can pretty much debug and test any code you need to; <abbr title="PHP: Hypertext Preprocessor">PHP</abbr>, <abbr title="Structured Query Language">SQL</abbr>, and Habari.</p>
<ul class="download">
<li><a href="https://github.com/habari-extras/hconsole/archive/master.zip">hConsole Master <i class="icon-box-add"></i></a></li>
<li><a href="https://github.com/habari-extras/hconsole">GitHub Repo <i class="icon-github"></i></a> </li>
</ul>
The Garden, 2013Matt Readhttps://mattread.comtag:mattread.com,2013:garden-2013/13715939652013-06-18T19:41:07-04:002014-09-24T10:56:56-04:002013-06-18T18:18:54-04:00<p>The garden this year is coming along nicely; We planted Tomatoes, Lettuce, Green Beans, Beans, Green Peppers, Carrots, Swiss Chard, Green Onions, and Cucumbers. We also planted Chives, and Cilantro, two of my favourite herbs.<a href="//farm3.staticflickr.com/2808/9078570513_829b6f0f06_c.jpg" title="DSC00771 by MattRead, on Flickr" class="fancybox" rel="garden"><img src="//farm3.staticflickr.com/2808/9078570513_829b6f0f06_m.jpg" width="240" height="180" alt="DSC00771" class="card right"></a></p>
<p>We started a little too early (mid May) and the green peppers and tomatoes never came up, so I got some “pre-started” ones from the Home Depot. They seem to be doing well. The green onions never really took off, but about 5 or so have come up. Next year I think I’ll start the green peppers, green onions and tomatoes inside, then move them outside at the end of May.</p>
<div class="gallery">
<a class="fancybox" rel="garden" href="//farm6.staticflickr.com/5525/9078637827_9ec8a0191c_c.jpg" title="DSC00775 by MattRead, on Flickr"><img src="//farm6.staticflickr.com/5525/9078637827_9ec8a0191c_s.jpg" width="75" height="75" alt="DSC00775"></a>
<a href="//farm6.staticflickr.com/5328/9078622919_2e07caecae_c.jpg" title="DSC00774 by MattRead, on Flickr"><img src="//farm6.staticflickr.com/5328/9078622919_2e07caecae_s.jpg" width="75" height="75" alt="DSC00774"></a>
<a class="fancybox" rel="garden" href="//farm4.staticflickr.com/3827/9078609343_6703bb48ca_c.jpg" title="DSC00773 by MattRead, on Flickr"><img src="//farm4.staticflickr.com/3827/9078609343_6703bb48ca_s.jpg" width="75" height="75" alt="DSC00773"></a>
<a class="fancybox" rel="garden" href="//farm4.staticflickr.com/3793/9078584795_597676305a_c.jpg" title="DSC00772 by MattRead, on Flickr"><img src="//farm4.staticflickr.com/3793/9078584795_597676305a_s.jpg" width="75" height="75" alt="DSC00772"></a>
<a class="fancybox" rel="garden" href="//farm8.staticflickr.com/7386/9078668569_9ed004c078_c.jpg" title="DSC00777 by MattRead, on Flickr"><img src="//farm8.staticflickr.com/7386/9078668569_9ed004c078_s.jpg" width="75" height="75" alt="DSC00777"></a>
<a class="fancybox" rel="garden" href="//farm3.staticflickr.com/2888/9080921078_1803718b47_c.jpg" title="DSC00779 by MattRead, on Flickr"><img src="//farm3.staticflickr.com/2888/9080921078_1803718b47_s.jpg" width="75" height="75" alt="DSC00779"></a>
</div>
<p>I also wanted to plant some fruit. We have wild raspberries in the back, and i was thinking of doing a “domestic” blueberry and raspberry patch. But I was also thinking of trying cherry trees, or apple trees, or maybe even orange trees (you need at least two for them to grow fruit, I’m told). If you’ve got any advise on growing fruit in the northern part of the world, let me know.</p>
<p>I know, I need to weed the garden.</p>
Rest In Peace, JasperMatt Readhttps://mattread.comtag:mattread.com,2013:rest-in-peace-jasper/13614574992013-02-21T09:38:19-05:002014-09-26T12:55:00-04:002013-02-21T09:38:19-05:00<p class="center">I will miss you greatly. Thank you for always being there.</p>
<p><a href="//farm1.staticflickr.com/1/572742_09da443b84_z_d.jpg?zz=1" class="fancybox"><img alt="Jasper - Light" src="//farm1.static.flickr.com/1/572742_09da443b84.jpg" class="card center"></a></p>
Thinking About PasswordsMatt Readhttps://mattread.comtag:www.mattread.com,2012:thinking-about-passwords/13529358992012-11-15T13:00:18-05:002014-09-18T10:57:23-04:002012-11-14T18:25:12-05:00<p>The other day I was thinking about passwords and the “forgot password” links that are common on websites today. I got to thinking just how many passwords I have and how many I forget.</p>
<p>I use a different password for pretty much every site I belong to. I have a simple algorithm I can do in my head to remember that password (usually). But does it matter? Do multiple passwords really provide you with any added security?</p>
<p class="pull-quote">Your entire online life is protected only by your email password, and identified by your email address</p>
<p>With the advent of the “forgot password link” that will email you a reset link, there is really only one password that is the key to every account you have. Your email password. If you got my email password you could gain access to <strong>all</strong> my accounts on the internet. All you have to do is reset my password, check my email, and bob’s your uncle.</p>
<p>Email addresses today are actually used as the single point of identification, if you really think about it. But at the same time, your email address is your <abbr title="Single Sign On">SSO</abbr> security key. With access to your email you have access to all accounts that implement the “forgot password link”.</p>
<p>Any site that I’ve seen that implements the “forgot password” feature, only requires you to click a link in your email. There is no other stage of identification required, with the exception of my online banking. The bank requires I call in and identify myself via my address, my Date of Birth, etc.</p>
<p>So why aren’t other sites doing this? Obviously you can’t have a call in to an agent, too many expenses for that. But why not have some other personal information stored to identify the person that clicked that link. As I wrote that last sentence, I realized how much of a privacy concern that would be. Especially after reading about so many DB dumps on <a href="http://arstechnica.com/">Ars</a> recently.</p>
<p>It comes down to a single password, a single email address. Your entire online life is protected only by your email password, and identified by your email address. The two most important things you have online.</p>
<p>Would you be willing to provide additional personal information to some random site? If you think about it, you already provide your email address, the thing that identifies you to each and every site out there. How much more info is required to properly secure your identification? Is a single email address enough?</p>
<p>I think I’ll go change my email password right now.</p>
My Poor Little Car is DeadMatt Readhttps://mattread.comtag:mattread.com,2012:my-poor-little-car-is-dead/13382301462012-05-28T20:33:44-04:002013-03-22T12:28:30-04:002012-05-28T13:31:20-04:00<p>My 2003 Pontiac Sunfire Sedan, which has served me for the past 5 years, finally decided to quit. At 300,000 km, I would say it did a pretty good job for me. And at this point, It’s not worth spending the $800 to get fixed.</p>
<p>So, I’m on the hunt for a small truck. A Ford Ranger would be perfect, and would be my ideal vehicle. But a Mini Van has come for $2,500 and I’m seriously considering it. I <strong>never</strong> thought I would consider buying a mini van. But if you think about, it gets better gas mileage than the truck, can carry pretty much anything the small truck could, and I can put a hitch on it to pull a trailer.</p>
<p>But I don’t want to be a “Soccer Mom”, so I think I’ll be sticking with a small truck. I got a line on a Chevy S-10 in my price range. I’ll let you know what I decide.</p>
Bill-C11, An Act to Amend CopyrightMatt Readhttps://mattread.comtag:mattread.com,2012:bill-c11-an-act-to-amend-the-copyright-act/13286221352012-02-07T08:42:15-05:002013-03-08T22:58:08-05:002012-02-07T08:42:15-05:00<p>I received a response from the <a href="http://www.ndp.ca/" title="New Democrat Party">NDP</a> regarding Bill C-11. Basically it is a Canadian version of the American’s <abbr title="Digital Millenium Copyright Act">DMCA</abbr>. Should this bill pass it would make me a pirate for copying all my CD’s into <abbr title="Free Loseless Audio Codec">FLAC</abbr> files on my computer; Not only that, but anyone who circumvented “digital locks” to make copies for personal use would be breaking the law.</p>
<p>So on Linux watching a DVD using the free decoding libraries (libdvdcss2) you would be performing a criminal act. Many of you don’t know this, but if you watch a DVD on your computer you paid royalties to the movie industry to do so when you bought your DVD player software. Furthermore, if you use free ones, like <a href="http://www.videolan.org/vlc/" title="Video Lan Player">VLC</a>, you would now be breaking the law and would be prosecuted in Criminal Court.</p>
<hr />
<p>It’s good to see at least the <a href="http://www.ndp.ca/" title="New Democrat Party">NDP</a> is taking a stance against this specific part of the Bill, and is actually, it seams, listening to the <strong>people</strong>. Too bad they form a minority in the House of Commons. Here is their response:</p>
<blockquote cite="Nycole.Turmel@parl.gc.ca">
<p>Thank you for taking the time to write regarding Bill C-11, An Act to amend
the Copyright Act. We appreciate having the benefit of your comments and the
opportunity to let you know more about our work on a number of these
legislative concerns.</p>
<p>New Democrats want updated copyright laws to balance the rights of artists,
consumers and rights-holders. We believe that Canada needs effective
legislation to ensure artists’ royalties are protected; long-distance
education opportunities aren’t hindered; and that young people aren’t
subject to unfair, expensive fines.</p>
<p>That’s why we will not be supporting Bill C-11 unless the government is
willing to amend the digital lock provisions and restore royalty provisions
for artists. The blanket provisions for digital locks will allow corporate
interests to decide what legal rights you may or may not exercise. This
unbalanced approach will ultimately hurt artists, educators and consumers.</p>
<p>New Democrats also think that it is time to strike a balance in Canada’s
copyright law that will properly recognize the cultural community for its
valuable contributions to our society. Going forward, we will continue to
work hard to improve this bill and press the Harper government to adopt the
best copyright laws for the 21st century. </p>
<p>Please find below a letter from NDP Copyright and Digital Issues critic
Charlie Angus that further explains our position on Bill C-11.</p>
<p>Again, thank you for taking the time to register your views.</p>
<p>Sincerely,</p>
<p>Nycole Turmel, M.P.<br>
Interim Leader of the Official Opposition<br>
New Democratic Party of Canada</p>
<p>Charlie Angus, M.P.<br>
NDP Copyright and Digital Issues Critic</p>
</blockquote>
Canadian DadMatt Readhttps://mattread.comtag:mattread.com,2012:canadian-dad/13285455882012-02-06T11:26:28-05:002013-03-08T22:58:08-05:002012-02-06T11:26:28-05:00<p>My cousin has got his <a href="http://canadiandad.com/" title="Canadian Dad">new blog</a> up and running. It’s a new site <a href="http://canadiandad.com/about-me/" title="About Canadian Dad">about his life as a Dad</a>. He definately does more blogging than me, so I thought I would link him a bit. He’s going to be doing <a href="http://canadiandad.com/category/httpcanadiandad-comreviewsgiveaways/" title="Candian Dad Reviews">reviews </a>and <a href="http://canadiandad.com/category/httpcanadiandad-comreviewsgiveaways-2/" title="Canadian Dad Giveaways">giveaways</a>. Apparently he’s got some products coming up, for free, to review then give away. There is already a chance to win a <a href="http://canadiandad.com/win-a-25-marks-work-warehouse-gift-card/">$25 Gift Certificate from Marks</a>.</p>
<p>It’s looking to be a good read, so <a href="http://canadiandad.com/" title="Canadian Dad">head over</a> and give him some traffic, eh?</p>
Ephyboy, The Epiphany Tomboy ExtensionMatt Readhttps://mattread.comtag:mattread.com,2010:ephyboy-the-epiphany-tomboy-extension/12841689622011-12-27T01:12:10-05:002013-04-24T09:08:09-04:002010-09-10T21:36:02-04:00<p>Back in the day when I used to use <a href="http://getfirefox.com">Firefox</a>, I fell in love with the <a href="https://addons.mozilla.org/en-US/firefox/addon/8276/">Tomfox extension</a>. It
allowed you to create a new <a href="http://projects.gnome.org/tomboy/">Tomboy</a> note using the currently selected text of the webpage you
were browsing, using the title for the title of the note and referencing the url as the source. This
was great for me to document all the code and Linux commands I’d find scattered around the net.</p>
<p>Eventually, though, I got tired of <a href="http://getfirefox.com">Firefox</a>, especially it’s load times, and switched to
<a href="http://www.chromium.org/">Chromium</a>. You guessed it, <a href="http://www.chromium.org/">Chromium</a> sucked too. So back to <a href="http://projects.gnome.org/epiphany/">Epiphany</a> I went, and with the
2.30 version it is really quite a nice little browser.</p>
<p><a href="http://projects.gnome.org/epiphany/">Epiphany</a> extensions are now done with <a href="http://live.gnome.org/Seed">Seed</a>, the GTK javascript bindings, making it really
easy to write new extensions. Plus, it has almost a complete GTK implementation via GObject
Introspection. So getting my tomboy note maker dohicky back was really not that hard —aside from
the lack of documentation. And thus, <a href="http://github.com/MattRead/Ephyboy">Ephyboy</a> is born. It’s really quite simple:</p>
<ol>
<li><a href="http://github.com/MattRead/Ephyboy/downloads">Download</a> the tarball, or zip.</li>
<li><a href="http://github.com/MattRead/Ephyboy/wiki">Install</a> the extension.</li>
<li>Enable the extension (<em>no restart required!</em>).</li>
<li>Select some text to add in your note.</li>
<li>Hit <kbd>CTRL+Shift+B</kbd>; Or, add the Tomboy Note button to the toolbar and click the button.</li>
</ol>
<p>The extension will then create your note and open your note in <a href="http://projects.gnome.org/tomboy/">Tomboy</a> for review and/or further
editing.</p>
<p>There is one thing to note. The extension works by making a DBus call to Tomboy to create the note
so you have to have Tomboy open and connected to the bus for this to work. Usually not a problem
as I have Tomboy start on log in.</p>
Why Playoff Hockey Is Better Than SexMatt Readhttps://mattread.comtag:mattread.com,2009:why-playoff-hockey-is-better-than-sex/12608999842011-12-27T01:11:06-05:002013-03-08T22:58:09-05:002009-12-15T13:00:29-05:00<p>I always knew Hockey was important, just never realized how important; It’s better than sex! From an Email I received:</p>
<ol>
<li>It’s legal to play hockey professionally.</li>
<li>The puck is always hard.</li>
<li>Protective equipment is reusable and you don’t even have to wash it.</li>
<li>It lasts a full hour.</li>
<li>You know you’re finished when the buzzer sounds.</li>
<li>Your parents cheer when you score.</li>
<li>Periods only last 20 minutes.</li>
<li>You can count on it at least twice a week.</li>
<li>You can tell your friends about it afterwards.</li>
<li>A two-on-one or three-on-one is not uncommon.</li>
</ol>
Matt Read, Weblog: Oceanus v3Matt Readhttps://mattread.comtag:mattread.com,2010:matt-read-weblog-oceanus-v3/12759562312010-06-07T20:32:30-04:002014-09-26T12:54:14-04:002010-06-07T20:32:30-04:00<p>Version 3.0 of my theme, Oceanus, is now live. This time I went all out space age with CSS fonts and CSS text effects, like text-shadow and opacity. Inspired mostly by <a href="http://chrisjdavis.org/" title="Sillyness Spelled Wrong Intentionally">Chris J. Davis</a>.</p>
<p><a href="//www.flickr.com/photos/47293812@N00/4680652414"><img src="//farm5.static.flickr.com/4010/4680652414_9182a5d55e_m.jpg" class="card right"></a>I also went for HTML5, which, obviously, required a little MSIE hack. I found the semantics of HTML5 well thought out; Can’t wait till it becomes reality, especially the audio/video stuff. Goodbye Flash!</p>
<p>You’ll notice the pinstripe background, which may make it harder to read, but this time I went for beauty over usability. Yes, I committed a sin, don’t hate me please. I’ve played with some transparent containers for the content, but I think it looks better as is. Although, I still have a fluid layout and flexible font sizes.</p>
<p>I’ve also implemented a “notification area” at the top. Logged out, you will see the extra panes that include the less used stuff, that I would call clutter. Logged in, some additional things appear, like alerts for when you have comments awaiting moderation, etc. Sort of an admin bar built in.</p>
<p>When I get all the code sorted out, and the options pages going, I plan on releasing this revision of the theme. But don’t hold your breath.</p>
Why You Should Never Trust PluginsMatt Readhttps://mattread.comtag:mattread.com,2009:why-you-should-never-trust-plugin-authors/12610797792009-12-18T22:35:23-05:002013-03-08T22:58:09-05:002009-12-17T14:36:16-05:00<p>I apologize for this, but thought it would be fun. I hacked my own site! I must be good! I did this using an exploit found in a plugin for Habari. I plan on fixing this plugin very soon. If you are worried use my <a href="/contact">Contact Form</a> to contact me about it, and I’ll let you know which plugin it is. Even better, if you feel like fixing something, let me know and you can fix it for me :D.</p>
<p><strong>Update 2:</strong> This has <a href="http://habariproject.org/en/potential-security-issue-with-the-autosave-plugin">now been fixed</a> in the <a href="http://habariproject.org/dist/plugins/autosave/autosave-0.6-0.1.2.zip">AutoSave plugin</a>. The exploit could allow any cracker to post to the vulnerable site without being an authenticated user. So if any anyone is using AutoSave, you should <strong><a href="http://habariproject.org/dist/plugins/autosave/autosave-0.6-0.1.2.zip">update now</a></strong>.</p>
GMail, Almost PerfectMatt Readhttps://mattread.comtag:mattread.com,2009:gmail-almost-perfect/12343176742009-02-10T21:12:42-05:002013-04-10T19:56:35-04:002009-02-10T21:12:42-05:00<p>One of the great things about <a href="https://www.google.com/a/">Google Apps for Domains</a> is they run a mail server for you, and you get the GMail web interface for email. Not only that, but you get a fully functional IMAP server as well.</p>
<p>Unfortunately, GMail has a few annoyances.</p>
<h3>GPG</h3>
<p>The first annoyance is the lack of support for <a href="http://www.gnupg.org/">GPG</a>. Fortunately this is easily overcome with the use of <a href="http://getfiregpg.org/">FireGPG</a> extension for <a href="http://www.mozilla.com/en-US/firefox/">FireFox</a>. FireGPG provides a simple easy interface for using GPG, including, but not limited to, digitally signing emails, encrypting email and attachments, and GPGAuth.</p>
<p>If your not into GMail, FireGPG can also support <a href="http://roundcube.net/">Rouncube Webmail</a>. It also provides an easy mechanism to import GPG Keys, you know those big hash like things people paste on their sites; with one click you can import them.</p>
<h3>Fixed-Width Fonts</h3>
<p>The other major annoyance, which I find extremely annoying, is GMail displays all emails in a variable-width font instead of fixed-width. There is a “labs” feature that gives a toggle switch to change to fixed-width font, but you cannot make it the default. Fortuantely, again, <a href="http://www.mozilla.com/en-US/firefox/">FireFox</a> comes to the rescue, with it’s “user defined style sheets”. With only a couple of lines of CSS you can haz your email in fixed-width fonts.</p>
<p>User style sheets are located your <a href="http://www.mozilla.com/en-US/firefox/">FireFox</a> profile directory, and is named userContent.css. Any CSS you put in the file will be applied to each and every site you visit, so we can use it to get back our fonts. In Ubuntu it’s located at <var>~/.mozilla/firefox/xxx.default/chrome/userContent.css</var>.</p>
<p>Just add the following to that file:</p>
<pre class="highlight css">
/* GMail fixed-width font: see http://3cx.org/item/34 */
div.msg div.mb, div.ArwC7c {
font-family: monospace !important;
font-size: 12px !important;
}
div.yxEQwb {
display: none;
}
div.ckChnd textarea, textarea.tb {
font-family: monospace !important;
font-size: 12px !important;
}
td.ct {
font-family: monospace !important;
font-size: 12px !important;
}
</pre>
<p>This will give you fixed-width fonts for all plain text emails, in the old and new, GMail interface, and it will hide those annoying “Sponsored Links”. Also, it will give you fixed-width fonts on <a href="http://groups.google.com/">Google Groups</a>. Awesomeness!</p>
<h3>Customizing GMail With Labs</h3>
<p>In the <a href="http://gmailblog.blogspot.com/2008/06/introducing-gmail-labs.html">GMail Labs</a> section there are a bunch of goodies to be had. My favorites are Tasks, Advanced IMAP Control, and Navbar drag and drop.</p>
<p>Tasks are very simple. It gives you a little pop-out at the bottom for which you can add tasks, mark them as completed, link them to corresponding emails, etc. Lovely little TODO list keeper.</p>
<p>Advanced IMAP Controls gives you the ability to <q>Choose which labels show up in IMAP, turn off message auto-expunging, or trash messages when they’re deleted from IMAP</q>. I love being able to choose which label/folders IMAP can use.</p>
<p>Pretty simple, title says it all. You can drag around all the little gadgets to the order of your choosing.</p>
<h3>GMail Almost Rocks</h3>
<p>As long as you have <a href="http://www.mozilla.com/en-US/firefox/">FireFox</a>, the GMail web interface is almost a complete replacement for those old and clumsy desktop mail apps. Hopefully we’ll see some cool new Labs features roll out, like plain text/fixed-width only email ;).</p>
<p>As long as I don’t have to maintain a mail server, I’m happy with GMail.</p>
A Bold Move To OpenIDMatt Readhttps://mattread.comtag:mattread.com,2008:a-bold-move-to-openid/12290952972008-12-12T10:21:37-05:002014-10-08T18:55:04-04:002008-12-12T10:24:58-05:00<p>After deleting thousands of spam comments every week, I got fed up. I went looking for a way to eliminate spam all together. There are many different approaches that work at completely destroying spam bots A Honey Pot, <a href="http://svn.habariproject.org/habari-extras/plugins/spamhoneypot/">a Habari plugin</a> by <a href="http://seancoates.com/">Sean Coates</a>, that adds a CSS hidden field that only bots would fill in; encoding the “action” URL, and input elements names and ids of the submitting form, a technique used by <a href="http://gsnedders.com">Prof. Sneddy</a>, killing all spam bots which don’t use an HTML parser (which is all of them). There are others, but those are two that I find work reliably.</p>
<p><img alt="OpenID Logo" src="//mattread.com/user/files/openid.png" class="right"></p>
<p>The above mentioned methods, however, do not provide any way to authenticate the identity of the submitting comment author. In comes <a href="http://openid.net/">OpenID</a>. Using <a href="http://openid.net/">OpenID</a> to authenticate that the commenter is who they say they are, allows us to ensure that only valid comments are submitted. Since I haven’t seen a spam bot with an <a href="http://openid.net/">OpenID</a>, this will absolutely stop them in their tracks.</p>
<p><a href="http://openid.net/">OpenID</a> also allows to use heuristics to determine which <a href="http://openid.net/">OpenIDs</a> can be trusted, and which can be blacklisted. Since every commenter has a unique authenticated <a href="http://openid.net/">OpenID</a>, we can reliably trust repeat commenters and push their comments through the moderation queue; at the same time, not trust blacklisted <a href="http://openid.net/">OpenIDs</a>, deleting them immediately, without needing any human interaction to <em>reliably</em> do so.</p>
<p>I’ve decide to jump head first into the deep end, and only allow comments to be submitted using an OpenID Identifier. This means, that if you want submit a comment on my site, you <em>must</em> have an <a href="http://openid.net/">OpenID</a>. There are many people who do not have an <a href="http://openid.net/">OpenID</a> yet, but for your protection, and mine, I would highly recommend you go out and get one now.</p>
<p>I use <a href="https://pip.verisignlabs.com/">Verisign’s <abbr title="Personal Identity Portal">PIP</abbr></a> service for my OpenID provider. The service is still in “beta” (whatever that means nowadays) but I would highly recommend it. They even provide phishing detection, and “Strong Authentication” methods, including Browser Certificates, and their <a href="https://idprotect.verisign.com/learnmore.v">VIP Credetial</a>. Go sign up!</p>
Javascript Prototype Behaviour in PHPMatt Readhttps://mattread.comtag:mattread.com,2008:javascript-prototype-behaviour-in-php/12226641092008-09-29T00:55:09-04:002013-04-20T12:43:28-04:002008-09-29T02:01:57-04:00<p>One of the “neat” things in Javascript is you are able to dynamically add or change methods of a class and automatically update every instance of that class. Some of the things I usually find useful are adding to the String class, like so:</p>
<pre class="highlight javascript">
<![CDATA[
String.prototype.htmlSpecialChars = function() {
return this.replace(/\</g,'<').replace(/\>/g,'>');
}
String.prototype.trim = function() {
return this.replace(/^\s+|\s+$/g, '');
}
]]>
</pre>
<p>Obviously we cannot do this in PHP, and why would we, right? However we can emulate this behaviour to a certain extent using my “neat” little <a href="https://gist.github.com/576295">Prototype</a> class. With this Prototype class we can dynamically add properties and methods to any class, and they will be inherited by all instances of that class.</p>
<p>Let’s look at the following “normal” PHP code.</p>
<pre class="highlight php">
<![CDATA[
class Person extends Prototype
{
public $name;
public $gender;
public function gender()
{
printf("%s is %s\n", $this->name, $this->gender);
}
}
$matt = new Person;
$matt->name = 'Matt';
$matt->gender = 'male';
$matt->gender();
// Matt is male
]]>
</pre>
<p>Now, there is nothing magical or out-of-the-ordinary going on here. We just instantiate the Person class and setup some properties. Calling the <code>gender()</code> method outputs a nice little string for us.</p>
<p>However, you see that the Person class is actually a child of the Prototype class. This will allow us to do some of that “neat” Javascript stuff. Using Prototype, let us expand the Person class to add an <code>$age</code> property and an <code>age()</code> method to output a nice string. Like so:</p>
<pre class="highlight php">
<![CDATA[
Person::add_property('age');
Person::add_method('age', 'printf("%s is a %d year old %s\n", $this->name, $this->age, $this->gender);');
$matt->age = 28;
$matt->age();
// Matt is a 28 year old male
]]>
</pre>
<p>Now all instances of Person inherit the <code>$age</code> property and <code>age()</code> method. So we can create a new Person, Susie, and this object will now have the age stuff.</p>
<pre class="highlight php">
<![CDATA[
$susie = new Person;
$susie->name = 'Susie';
$susie->gender = 'female';
$susie->age = 21;
$susie->age();
// Susie is a 21 year old female
]]>
</pre>
<p>One limitation of the Prototype class though, is you cannot overload a current method. So the following code, that attempts to overload the <code>gender()</code> method, will not work.</p>
<pre class="highlight php">
<![CDATA[
Person::add_method('gender', 'printf("%s is a %d year old %s\n", $this->name, $this->age, $this->gender);');
$matt->gender();
// Matt is male
]]>
</pre>
<p>There are also many, many, many other problems with this Prototype class. Some of which are:</p>
<ul>
<li>The ‘$this’ keyword is reserved, so it actually does a string replace and uses ‘$self’ instead.</li>
<li>You cannot access/add new methods or properties statically (until PHP 5.3 with __callStatic()).</li>
<li>It uses create_function, so every “method” is actually defined in the global namespace.</li>
<li>Iteration does not work, although it could possibly be done with Iterator, Countable, et al.</li>
<li>You cannot reference static variables/methods in your add method.</li>
<li>You cannot share methods between classes.</li>
<li>And so on and so forth…</li>
</ul>
<p>This class was just an experiment to see if it was at all possible to implement something like Javascript’s prototype behaviour in PHP with out using the <a href="http://pecl.php.net/package/runkit">Runkit PECL extension</a>. I had no intention of actually making this usable in production, for many reasons ;), although it was fun.</p>
Persistent Static VariablesMatt Readhttps://mattread.comtag:mattread.com,2008:persistent-static-variables-across-instances-in-php/12132494732008-06-12T01:44:33-04:002013-03-22T10:57:47-04:002008-06-12T01:26:40-04:00<p>Wait, What? Yeah that’s what I thought too. Still no Idea what I’m talking about? Well, let’s take a look at the following code. Let’s call it “fred”.</p>
<pre class="highlight php">
class foo {
function bar( $b = 0 )
{
static $a = 0;
if ( $b ) {
$a = $b;
}
echo $a;
}
}
$faz = new foo;
$faz->bar(3);
$baz = new foo;
$baz->bar();
foo::bar();
foo:bar(1);
$faz->bar();
</pre>
<p>The code above, named “fred”, basically creates a static variable <code>$a</code> inside the function <code>foo()</code>. When you call <code>foo(0)</code> it outputs the value of <code>$a</code>. When you call <code>foo('x')</code> , where x can be anything, it updates the value of <code >$a</code> with <code>'x'</code>, and outputs the new result.</p>
<p>Now, what would expect “fred” to output? If your like me, then you are completely wrong. “fred” will actually output the following code.</p>
<pre class="highlight php">
<![CDATA[
/*
Actual Outputs:
$faz->bar(3); ==> 3
$baz->bar(); ==> 3
foo::bar(); ==> 3
foo:bar(1); ==> 1
$faz->bar(); ==> 1
Expected outputs:
$faz->bar(3); ==> 3
$baz->bar(); ==> 0
foo::bar(); ==> 0
foo:bar(1); ==> 1
$faz->bar(); ==> 3
*/
]]>
</pre>
<p>Yes, that’s what I said at the start, “Persistent Static Variables Across Instances”. The static variable <code>$a</code> actually persists across the two instances of foo that “fred” created, and even into the static method call. This was completely unexpected, at least by me. So I’ll ask, does anyone know if this is actually the expected behaviour, and why it is or is not?</p>
Find My Easter EggMatt Readhttps://mattread.comhttp://mattread.com/archives/2005/12/find-my-easter-egg/2008-05-08T23:28:12-04:002013-03-20T19:57:12-04:002005-12-01T16:33:22-05:00<p>A while ago I remember reading about an easter egg in <a href="http://haveamint.com">Mint</a>. You type in a secret code and receive a special prize, or something.</p>
<p>I thought it sounded neat. And we all know neat stuff is, well, neat. Anyway, I started to create my own easter egg, and came up with this <a href="https://gist.github.com/MattRead/5209607">“neat” little script</a>.</p>
<p>HINT: jibby</p>
WordPress is not PHPMatt Readhttps://mattread.comhttp://mattread.com/?p=1932008-04-19T23:57:01-04:002013-05-02T14:50:25-04:002005-04-21T17:47:55-04:00<p>There have many concerns and question about the template system used in <a href="http://wordpress.org">WordPress</a>. Mostly the concerns are with n00bs and the complications of PHP. “I want to change this and that, but don’t know PHP”. I hear this a lot. But the thing is, you don’t need to know PHP to change the <a href="http://codex.wordpress.org/Templates">Templates</a> in <a href="http://wordpress.org">WordPress</a>. <!--more--></p>
<h2>The Template System</h2>
<p>Lets’ start with “<a href="http://codex.wordpress.org/The_Loop">the Loop</a>” as we call it. Probably the most confusing part of the <a href="http://codex.wordpress.org/Templates">Template</a> for a non-programmer. The Loop looks like this:</p>
<pre class="highlight php">
<![CDATA[
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
//Template Section 1: post content Template Tags go here
<?php endwhile; else: ?>;
//Template Section2: no posts found stuff here.
<?php endif; ?>
]]>
</pre>
<p>It may look complicated, but it’s actually quite simple. In <a href="#ex1">Template Section 1</a>, all the posts information will be displayed. Within that section we will put all the posts <a href="http://codex.wordpress.org/Template_Tags">Template Tags</a>, and our HTML to format them. In <a href="#ex1">Template Section 2</a>, we will display a message telling the user no posts were found, if we find none to meet their criteria. </p>
<h3>Template Section 1: The Posts</h3>
<p>We’ll start with outputting the post tile. Simply add in the <a href="http://codex.wordpress.org/Template_Tags">Template Tag</a> <code class="html"><?php the_title() ?></code>. That will output the title of the post. </p>
<p>Now let’s output the date of the post. Simply add the date’s <a href="http://codex.wordpress.org/Template_Tags">Template Tag</a> <code class="html"><?php the_date() ?></code>. That outputs the date of the post.</p>
<p>We will also, of coarse, need the content of the actual post. Simply, again, add the <a href="http://codex.wordpress.org/Template_Tags">Template Tag</a> <code class="html"><?php the_content() ?></code>.</p>
<p>Now let’s put it all together with some HTML:</p>
<pre class="highlight php">
<div class="post">
<h2> <?php the_title() ?> </h2>
<p> <?php the_date() ?> </p>
<?php the_content() ?>
</div>
</pre>
<p>And there’s our simple template. Now let’s add some more.</p>
<p>First let’s add a link to the post, permalink as it’s called, on the title. We get the actual URL, something like <code class="html">http://mysite.com/archives/2004/09/post-title/</code>, with the <a href="http://codex.wordpress.org/Template_Tags">Template Tag</a> <code class="html"><?php the_permalink() ?></code>. We will need to put that in our <code class="html"><a href=””></code> HTML tag.</p>
<p>We also want to add in links to each page of our post, next page, previous page, etc.. We simply call another <a href="http://codex.wordpress.org/Template_Tags">Template Tag</a>, <code class="html"><?php link_pages('<p>','</p>') ?></code>. Now here’s another confusion people have. We’ve added in, what programmers would call, arguments to our <a href="http://codex.wordpress.org/Template_Tags">Template Tag</a>. That is, we’ve added in <code class="html">'<p>', '</p>'</code> to the brackets of the <a href="http://codex.wordpress.org/Template_Tags">Template Tag</a>. In this case we are just saying, if there are pages to link, output the page links with a <code class="html"><p></code> at the start, and a <code class="html"></p></code> at the end. Hence, enclosing it all in HTML paragraph tags. Most <a href="http://codex.wordpress.org/Template_Tags">Template Tags</a> have different arguments you can pass to them, causing them to format their output differently.</p>
<p>Now let’s add in our new tags.</p>
<pre class="highlight php">
<![CDATA[
<div class=”post”>
<h2> <a href=”<?php the_permalink() ?>”> <?php the_title() ?> </a> </h2>
<p> <?php the_date() ?> </p>
<?php the_content() ?>
<?php link_pages('<p>','</p>') ?>
</div>
]]>
</pre>
<p>Now we have a fully functional Posts section, <a href="#ex1">Template Section 1</a>. Let’s move on to <a href="#ex1">Template Section 2</a>.</p>
<h3>Template Section 2: No Posts Found</h3>
<p>For our <a href="#ex1">Template Section 2</a>, the no post found section, all we need to do is put in a message to tell the user nothing was found, to meet their criteria. Whether it was a search or a mis-typed URL. So let’s use the following simple HTML:</p>
<pre class="highlight html">
<![CDATA[
<p>Sorry, no posts could be found to match your criteria.</p>
]]>
</pre>
<p>Now let’s put it all together.</p>
<h3>Complete Template</h3>
<p>Putting all we learned above together, we get a nice simple <a href="http://codex.wordpress.org/The_Loop">Loop</a> <a href="http://codex.wordpress.org/Templates">Template</a>.</p>
<pre class="highlight php">
<![CDATA[
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div class=”post”>
<h2> <a href=”<?php the_permalink() ?>”> <?php the_title() ?> </a> </h2>
<p> <?php the_date() ?> </p>
<?php the_content() ?>
<?php link_pages('<p>','</p>') ?>
</div>
<?php endwhile; else: ?>
<p>Sorry, no posts could be found to match your criteria.</p>
<?php endif; ?>
]]>
</pre>
<p>As you can see, we have done no PHP coding, just some simple HTML with <a href="http://wordpress.org">WordPress</a> Template Tags added in.</p>
<p>Obviously this is not a complete template, as we have no header and footer containing all the <code class="html"><html><head><body></code> tags. But with some simple HTML and more <a href="http://codex.wordpress.org/Template_Tags">Template Tags</a>, and no PHP, we can easily add all that is needed for a complete HTML document. That’s right, an HTML document, not a PHP script.</p>
<p>As we can see <a href="http://wordpress.org">WordPress</a> is not PHP. <a href="http://wordpress.org">WordPress</a> is powered by PHP, but uses a simple template system, easily modified by even the most novice of users. None of that complicated Perl code like MT has … Yes, believe it or not, MT is also powered by a complicated programming language. The only difference is marketing. MT has been marketed as having simple templates with no programming skills needed. However, somehow, and I don’t know why, <a href="http://wordpress.org">WordPress</a> has gotten a rap of being complicated and only for the hardcore programmers out there. But as we can see, using the <a href="http://codex.wordpress.org/Template_Tags">Template Tags</a> is extremely easy and requires no knowledge of PHP at all.</p>
<p>Changing the format and style of your <a href="http://codex.wordpress.org/Templates">Template</a> is as easy as using a little HTML, CSS and Template Tags. Just like other Weblog systems out there. </p>
<p>However, as with any software, there is room for improvement.</p>
<h2>Improving Templates</h2>
<p>One of the problems with the <a href="http://wordpress.org">WordPress</a> <a href="http://codex.wordpress.org/Templates">Template System</a>, in my opinion, is the default <a href="http://codex.wordpress.org/Templates">Template</a>, or theme, itself. Specifically the sidebar, with all the <code class="html">is_*()</code> functions. We shouldn’t expect a novice <a href="http://wordpress.org">WordPress</a> user to understand what these functions mean. I would suggest removing all the <code class="html">if(is_*())</code> statements in place of a simple sidebar with just the essentials. Say, Search, Pages, Archives, Categories, Links, Meta information and take out all the complicated if statements and includes.</p>
<p>Another problem I see with the default <a href="http://codex.wordpress.org/Templates">Template</a> is the CSS in the header. I think all CSS should be contained in the style sheets themselves. Again remove the if statements. When a user wants to modify the CSS it seems logical to have just the simple CSS in one place, to easily modify.</p>
<p>Another problem I see is with some of the <a href="http://codex.wordpress.org/Template_Tags">Template Tags</a>. Such as <code class="html"><?php bloginfo() ?></code>. Instead of having one function to display some necessary information, like blog name, description, url, etc., why not have specific tags for the highly used information. Like say, <code class="html"><?php blog_name() ?></code>, <code class="html"><?php blog_description() ?></code>, <code class="html"><?php blog_url() ?></code>, etc., to maintain consistency. For some of the less used information, charset, version, etc., the <code class="html"><?php bloginfo() ?></code> tag would be fine.</p>
<p>And some of the other advanced <a href="http://codex.wordpress.org/Template_Tags">Template Tags</a> in use in the default <a href="http://codex.wordpress.org/Templates">Templates</a>, like <code class="html"><?php list_cats(0, '', 'name', 'asc', '', 1, 0, 1, 1, 1, 1, 0,'','','','','') ?></code>, should be simplified to not contain all those arguments. Maybe use <code class="html"><?php wp_list_cats() ?></code> where all those settings would be set in the admin area.</p>
<p>It would also be nice to try to simplify the loop, although I can’t see any way of doing that now, to use as little actual PHP, like if else statements, as possible. Also take out the else, for when no posts are found, and always use the 404 template file.</p>
<p>The point I’m trying making is to take the PHP out of the <a href="http://codex.wordpress.org/Templates">Templates</a>, as much as possible, so users don’t get confused and think they need PHP skills to modify the <a href="http://codex.wordpress.org/Templates">Templates</a>.</p>
<p>Those are just my thoughts on the matter.</p>
<p>If you need any help with your templates, or would like to learn more about the monkey, I’d be glad to help out. Just <a href="/contact/">drop me a line</a>.</p>
Faking Two Column TextMatt Readhttps://mattread.comhttp://mattread.com/?p=2142008-04-17T21:55:49-04:002013-03-22T10:58:33-04:002005-10-12T11:32:32-04:00<p>One of the many exciting features of CSS 3 is the ability to create columnar text. In this article I will show you a way to fake two column text with a little Javascript. </p>
<!--more-->
<p>First off we need to stipulate that this hack will only work with textual information contained in HTML paragraph tags (<p></p>).</p>
<p>To use the script all you need to do is <a href="#download">download the script</a> and include it in the head of your document.</p>
<pre class="highlight html">
<![CDATA[
<script type="text/javascript" src="two-col.js"></script>
]]>
</pre>
<p>To designate which text will be columnar we will put it in a layer with an id attribute of “two-col” like below. And that’s all you need to do to use the script.</p>
<pre class="highlight html">
<![CDATA[
<div id="two-col">
<p>The information here will be displayed as two columns.
This will be the first of two Paragraphs</p>
<p>Here is the second paragraph in our columnar
data.</p>
</div>
]]>
</pre>
<h3>The Script And The Problems</h3>
<p>The script works by grabbing all the HTML inside the “two-col” element and splitting into an array, by spaces, using javascripts built in split function. Then we loop through our new array and place half the words in the left column and the other half in the right column. Of coarse splitting the HTML in half causes a few problems. </p>
<p>First, if a tag is located in the middle of the data, it can split that tag in two. This is quite bad but can be overcome by formatting the content so it doesn’t occur. Maybe in a latter version of the script I’ll try to address this problem.</p>
<p>Second, because we are spiltting the content into two, we end up spiltting a paragraph into two paragraphs, creating a new paragraph out of part of the original. This is unfortunate but necessary for proper styling with CSS.</p>
<p>But if everything works right we get our two column text.</p>
<h3>Example of Two Column Text</h3>
<div id="two-col">
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Suspendisse imperdiet, erat quis tempus euismod, mi quam faucibus nibh, ac ullamcorper erat velit in nisl. In eget elit. Sed pede quam, eleifend facilisis, lobortis a, sagittis non, eros. Aliquam erat volutpat.</p>
<p>Praesent mauris magna, laoreet id, venenatis in, suscipit vitae, nisl. Aenean rutrum convallis nunc. Suspendisse pharetra placerat felis. In eget ipsum pretium nunc dignissim aliquet. Nulla ligula. Sed nulla lorem, dapibus in, malesuada sed, ultrices id, nunc. </p>
<p>Proin feugiat neque a orci. In hac habitasse platea dictumst. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Integer nec dolor id neque aliquet mattis. Mauris leo eros, elementum eget, varius ultricies, vehicula non, lorem. Nam eget neque id lacus imperdiet tincidunt. Aliquam eu augue.</p>
</div>
PasteosaurusMatt Readhttps://mattread.comtag:mattread.com,2007:pasteosaurus/11845990392008-04-17T21:31:22-04:002013-04-25T22:00:08-04:002007-07-16T04:17:19-04:00<p><a href="http://jimwhimpey.com/" title="The Jim Whimpey Weblog">Jim Whimpey</a> and <a href="http://brisbanecreative.com.au/">Brisbane Creative</a> bring you <a href="http://pasteosaurus.com/">Pasteosaurus</a>. The new PHP pastebin on the block, based on the OSS code from <a href="pastebin.com">Pastebin.com</a>. The entire systme and codebase was almost completely rewritten by Jim, in aim of simplifying the entire system.</p>
<p>As <a href="http://jimwhimpey.com/blog/2007/pasteosaurus-and-an-incredible-photographic-journal/">Jim says</a> on his blog, <q cite="http://jimwhimpey.com/blog/2007/pasteosaurus-and-an-incredible-photographic-journal/">Every piece of junk I wasn’t using from pastebin has been removed, including DB fields and every file has been reorganised and rewritten in cleaner, smaller and more easily read code. This means it’s now much easier for me to add features, which I’ve already done!</q></p>
<p>It is quite a lovely pastebin, much faster and cleaner than most of those other big ones. The design is simple yet beautiful; I love to see red and pink in a design. And with the use of <a href="http://geshi.org/">Geshi</a>, the syntax highlighting works quite well.</p>
<p>Of course, being a good OSS citizen, the code available for download via the link at the bottom of every page. So let’s not pastebin anymore, let’s Pasteosaurus!</p>