<?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>Jeremy Massel&#039;s Blog</title>
	<atom:link href="http://masseltech.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://masseltech.com</link>
	<description>Because sometimes I have good ideas too</description>
	<lastBuildDate>Fri, 05 Mar 2010 22:18:50 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>ASP.Net 301 Redirect</title>
		<link>http://masseltech.com/2010/03/asp-net-301-redirect/</link>
		<comments>http://masseltech.com/2010/03/asp-net-301-redirect/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 22:17:26 +0000</pubDate>
		<dc:creator>jeremy.massel</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[usability]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[useful]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://masseltech.com/?p=157</guid>
		<description><![CDATA[
&#60;script runat=&#34;server&#34;&#62;
private void Page_Load(object sender, System.EventArgs e)
{
Response.Status = &#34;301 Moved Permanently&#34;;
Response.AddHeader(&#34;Location&#34;,&#34;http://www.new-url.com&#34;);
}
&#60;/script&#62;

]]></description>
			<content:encoded><![CDATA[<p><code><br />
&lt;script runat=&quot;server&quot;&gt;<br />
private void Page_Load(object sender, System.EventArgs e)<br />
{<br />
Response.Status = &quot;301 Moved Permanently&quot;;<br />
Response.AddHeader(&quot;Location&quot;,&quot;http://www.new-url.com&quot;);<br />
}<br />
&lt;/script&gt;<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://masseltech.com/2010/03/asp-net-301-redirect/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mysql command doesn&#8217;t work in OS X snow leopard</title>
		<link>http://masseltech.com/2010/01/mysql-command-doesnt-work-in-os-x-snow-leopard/</link>
		<comments>http://masseltech.com/2010/01/mysql-command-doesnt-work-in-os-x-snow-leopard/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 20:09:01 +0000</pubDate>
		<dc:creator>jeremy.massel</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Web Hosting]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[mySql]]></category>
		<category><![CDATA[problems]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://masseltech.com/?p=155</guid>
		<description><![CDATA[So you install mySql on your mac, and it&#8217;s working great, but then you go into terminal to run a mysqldump or something, and it doesn&#8217;t work!
you get a message something like:

-bash: mysqldump: command not found

so how do you fix this? well, copy and paste the following into your terminal window and press enter:

echo export [...]]]></description>
			<content:encoded><![CDATA[<p>So you install mySql on your mac, and it&#8217;s working great, but then you go into terminal to run a mysqldump or something, and it doesn&#8217;t work!</p>
<p>you get a message something like:<br />
<code><br />
-bash: mysqldump: command not found<br />
</code></p>
<p>so how do you fix this? well, copy and paste the following into your terminal window and press enter:<br />
<code><br />
echo export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH" >> ~/.profile</p>
<p>source ~/.profile<br />
</code></p>
<p>whoa, whoa, you say. what is this doing? It makes it so that when you type any command into the terminal, it does a check of these folders before giving you the &#8220;command not found&#8221; error. </p>
<p>If you want to undo it, you can always edit your .profile, or just delete it. </p>
]]></content:encoded>
			<wfw:commentRss>http://masseltech.com/2010/01/mysql-command-doesnt-work-in-os-x-snow-leopard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress on Snow Leopard: Unable to Connect to Database</title>
		<link>http://masseltech.com/2010/01/wordpress-on-snow-leopard-unable-to-connect-to-database/</link>
		<comments>http://masseltech.com/2010/01/wordpress-on-snow-leopard-unable-to-connect-to-database/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 21:10:30 +0000</pubDate>
		<dc:creator>jeremy.massel</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Web Hosting]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[useful]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://masseltech.com/?p=134</guid>
		<description><![CDATA[If an &#8220;unable to connect to database&#8221; comes up while installing WordPress on a Snow Leopard machine, try adding :3306 to the end of the DB_HOST in wp-config.php
Assuming everything else works, this should solve your problem!
]]></description>
			<content:encoded><![CDATA[<p>If an &#8220;unable to connect to database&#8221; comes up while installing WordPress on a Snow Leopard machine, try adding :3306 to the end of the DB_HOST in wp-config.php</p>
<p>Assuming everything else works, this should solve your problem!</p>
]]></content:encoded>
			<wfw:commentRss>http://masseltech.com/2010/01/wordpress-on-snow-leopard-unable-to-connect-to-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Run JavaScript function every n seconds</title>
		<link>http://masseltech.com/2010/01/run-javascript-function-every-n-seconds/</link>
		<comments>http://masseltech.com/2010/01/run-javascript-function-every-n-seconds/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 19:15:55 +0000</pubDate>
		<dc:creator>jeremy.massel</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[usability]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[useful]]></category>

		<guid isPermaLink="false">http://masseltech.com/?p=132</guid>
		<description><![CDATA[
//tell javascript to run a function in 1 second
setTimeout ("myFunction()", 1000 );
function myFunction(){
        //do stuff
        //once the function is finished, queue this function up to run again in 1 second
	setTimeout ( "myFunction()", 1000 );
}

]]></description>
			<content:encoded><![CDATA[<p><code><br />
//tell javascript to run a function in 1 second<br />
setTimeout ("myFunction()", 1000 );</p>
<p>function myFunction(){<br />
        //do stuff</p>
<p>        //once the function is finished, queue this function up to run again in 1 second<br />
	setTimeout ( "myFunction()", 1000 );<br />
}</p>
<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://masseltech.com/2010/01/run-javascript-function-every-n-seconds/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Car</title>
		<link>http://masseltech.com/2009/10/new-car/</link>
		<comments>http://masseltech.com/2009/10/new-car/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 18:08:40 +0000</pubDate>
		<dc:creator>jeremy.massel</dc:creator>
				<category><![CDATA[personal]]></category>

		<guid isPermaLink="false">http://masseltech.com/?p=126</guid>
		<description><![CDATA[Got a new 2010 Toyota Corolla! It is awesome.
]]></description>
			<content:encoded><![CDATA[<p>Got a new 2010 Toyota Corolla! It is awesome.</p>

<a href='http://masseltech.com/2009/10/new-car/img_0267/' title='IMG_0267'><img width="150" height="150" src="http://masseltech.com/wp-content/uploads/2009/10/IMG_0267-150x150.jpg" class="attachment-thumbnail" alt="" title="IMG_0267" /></a>
<a href='http://masseltech.com/2009/10/new-car/img_0268/' title='IMG_0268'><img width="150" height="150" src="http://masseltech.com/wp-content/uploads/2009/10/IMG_0268-150x150.jpg" class="attachment-thumbnail" alt="" title="IMG_0268" /></a>
<a href='http://masseltech.com/2009/10/new-car/img_0269/' title='IMG_0269'><img width="150" height="150" src="http://masseltech.com/wp-content/uploads/2009/10/IMG_0269-150x150.jpg" class="attachment-thumbnail" alt="" title="IMG_0269" /></a>
<a href='http://masseltech.com/2009/10/new-car/img_0270/' title='IMG_0270'><img width="150" height="150" src="http://masseltech.com/wp-content/uploads/2009/10/IMG_0270-150x150.jpg" class="attachment-thumbnail" alt="" title="IMG_0270" /></a>

]]></content:encoded>
			<wfw:commentRss>http://masseltech.com/2009/10/new-car/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get latitude and longitude of an address using google maps</title>
		<link>http://masseltech.com/2009/09/get-latitude-and-longitude-of-an-address-using-google-mapst/</link>
		<comments>http://masseltech.com/2009/09/get-latitude-and-longitude-of-an-address-using-google-mapst/#comments</comments>
		<pubDate>Sun, 13 Sep 2009 04:33:51 +0000</pubDate>
		<dc:creator>jeremy.massel</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[usability]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[useful]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://masseltech.com/?p=98</guid>
		<description><![CDATA[Google doesn&#8217;t make it easy to show you the latitude and longitude of an address you search in google maps, but there&#8217;s an easy way to get the info.

go to google maps, type the address, and click search
once you&#8217;ve found it, go to your address bar and clear what&#8217;s in it
paste: javascript:void(prompt('',gApplication.getMap().getCenter())); into the address [...]]]></description>
			<content:encoded><![CDATA[<p>Google doesn&#8217;t make it easy to show you the latitude and longitude of an address you search in google maps, but there&#8217;s an easy way to get the info.</p>
<ol>
<li>go to google maps, type the address, and click search</li>
<li>once you&#8217;ve found it, go to your address bar and clear what&#8217;s in it</li>
<li>paste: <code>javascript:void(prompt('',gApplication.getMap().getCenter()));</code> into the address bar</li>
<li>use the coordinates for whatever you wish!</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://masseltech.com/2009/09/get-latitude-and-longitude-of-an-address-using-google-mapst/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Humility</title>
		<link>http://masseltech.com/2009/08/humility/</link>
		<comments>http://masseltech.com/2009/08/humility/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 21:16:50 +0000</pubDate>
		<dc:creator>jeremy.massel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://masseltech.com/?p=93</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p><a href="http://masseltech.com/wp-content/uploads/2009/08/Screen-shot-2009-08-18-at-3.15.51-PM.png"><img class="alignleft size-full wp-image-94" title="Screen shot 2009-08-18 at 3.15.51 PM" src="http://masseltech.com/wp-content/uploads/2009/08/Screen-shot-2009-08-18-at-3.15.51-PM.png" alt="Screen shot 2009-08-18 at 3.15.51 PM" width="473" height="141" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://masseltech.com/2009/08/humility/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>VirtualHostX and mod_rewrite</title>
		<link>http://masseltech.com/2009/08/virtualhostx-and-mod_rewrite/</link>
		<comments>http://masseltech.com/2009/08/virtualhostx-and-mod_rewrite/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 20:41:58 +0000</pubDate>
		<dc:creator>jeremy.massel</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Web Hosting]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[useful]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://masseltech.com/?p=91</guid>
		<description><![CDATA[To enable mod_rewrite manually, see: OS X server tips but if you are using VirtualHostX it changes your default config file. Add the following code to the Directives box:


    Options FollowSymLinks
    AllowOverride All AuthConfig
    Order deny,allow
    Deny from all


if you&#8217;re using the new [...]]]></description>
			<content:encoded><![CDATA[<p>To enable mod_rewrite manually, see: <a href="http://masseltech.com/2009/03/os-x-server-tips/">OS X server tips</a> but if you are using <a href="http://clickontyler.com/virtualhostx/">VirtualHostX</a> it changes your default config file. Add the following code to the Directives box:<br />
<code><br />
<Directory /><br />
    Options FollowSymLinks<br />
    AllowOverride All AuthConfig<br />
    Order deny,allow<br />
    Deny from all<br />
</Directory><br />
</code></p>
<p>if you&#8217;re using the new version of VirtualHostX, make sure that you select Directory from the dropdown, then use:<br />
<code><br />
<Directory /><br />
    Options FollowSymLinks<br />
    AllowOverride All AuthConfig<br />
</Directory><br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://masseltech.com/2009/08/virtualhostx-and-mod_rewrite/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Embedding Web Fonts: A cautionary tale</title>
		<link>http://masseltech.com/2009/07/embedding-web-fonts-a-cautionary-tale/</link>
		<comments>http://masseltech.com/2009/07/embedding-web-fonts-a-cautionary-tale/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 21:14:46 +0000</pubDate>
		<dc:creator>jeremy.massel</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://masseltech.com/?p=74</guid>
		<description><![CDATA[So for work, the designer says &#8220;Hey, can we use this font in the webpage&#8221; and like an idiot, I say &#8220;sure, why not?&#8221;. Well, FF and Safari don&#8217;t support .otf files (for whatever reason) So I download FontForge, open it in X11 (on my mac) and convert it to .ttf, which works great.
Then I [...]]]></description>
			<content:encoded><![CDATA[<p>So for work, the designer says &#8220;Hey, can we use this font in the webpage&#8221; and like an idiot, I say &#8220;sure, why not?&#8221;. Well, FF and Safari don&#8217;t support .otf files (for whatever reason) So I download FontForge, open it in X11 (on my mac) and convert it to .ttf, which works great.</p>
<p>Then I messed around in IE, trying to make it work, even downloading this tool:</p>
<p><a href="http://masseltech.com/wp-content/uploads/2009/07/Picture-31.png"><img class="alignnone size-thumbnail wp-image-76" title="Microsoft WEFT" src="http://masseltech.com/wp-content/uploads/2009/07/Picture-31-150x150.png" alt="Microsoft WEFT" width="150" height="150" /></a></p>
<p>Worst thing EVER. Don&#8217;t do this. Don&#8217;t get this. Don&#8217;t even look at this. You will feel violated if you use it.</p>
<p>So&#8230;how to embed an OTF font in a website (make sure you have a license to do so kids):</p>
<ol>
<li>Convert OTF file to .ttf (use fontForge)</li>
<li>Embed with @font-face</li>
<li>When adding the font to a style, in IE you <strong><em><span style="text-decoration: underline;">CAN NOT</span><span style="font-style: normal; font-weight: normal;"> call it by the name you gave it with the @font-face declaration. You have to call it by it&#8217;s name. So if the font&#8217;s name is myfontLTSTDBOLDITALICROMAN you have to do: body{ font-family: myfontLTSTDBOLDITALICROMAN; } Sucky? Very. Works? yes.</span></em></strong></li>
</ol>
<p>Have a nice day</p>
]]></content:encoded>
			<wfw:commentRss>http://masseltech.com/2009/07/embedding-web-fonts-a-cautionary-tale/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>WordPress plugin DB access framework</title>
		<link>http://masseltech.com/2009/06/wordpress-plugin-db-access-framework/</link>
		<comments>http://masseltech.com/2009/06/wordpress-plugin-db-access-framework/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 20:23:12 +0000</pubDate>
		<dc:creator>jeremy.massel</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[useful]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://masseltech.com/?p=39</guid>
		<description><![CDATA[While designing a recent WordPress plug-in for TruthMedia that was designed to follow MVC, I had an awful lot of database work to do, and it needed to all be properly secured, which was a lot of work, and while making a rather large change to the way the database worked, I realized that writing [...]]]></description>
			<content:encoded><![CDATA[<p>While designing a recent WordPress plug-in for <a title="TruthMedia" href="http://www.truthmedia.com">TruthMedia</a> that was designed to follow MVC, I had an awful lot of database work to do, and it needed to all be properly secured, which was a lot of work, and while making a rather large change to the way the database worked, I realized that writing all the db code by hand was crazy inefficient.</p>
<p>So I wrote a class that you can extend with any model class of your own, and it will automatically have create, read, update, and delete functionality with no more work required. It also uses all of the WordPress security features to properly escape everything and prevent injection. Although, if you can crack it I&#8217;d love to hear from you!</p>
<p><a href="http://masseltech.com/wp-content/uploads/2009/06/wec_dbphp.zip">Click here to download!</a></p>
<p>This is how it works:</p>
<ol>
<li>Create a new class (ex. person)</li>
<li>Give that class instance variables (ID, FirstName, LastName, Address, PhoneNumber, PostalCode, HairColour&#8230;)</li>
<li>Make sure that you add accessor methods (getters and setters) for the ID (although it&#8217;s good practice to have them for all instance variables). Depending on your project, it may be a good idea to run stripslashes() on your string get functions so that they don&#8217;t show up with escaping. You may want to run WordPress&#8217; attribute_escape() on setters, however, again, depending on your set up this may be unnecessary.</li>
<li>Write your SQL code to create a table named (wordPress prefix)(plugin prefix)person (ex. wp_wec_person)</li>
<li>Make sure you call your primary Key personID **This is very important, without this, the system breaks down**</li>
<li>If you wish to store variables in this class, you can modify them to be private, and they won&#8217;t be written to the database</li>
</ol>
<p>In your class, extend the class name, so for example:</p>
<p><code>class person extends wec_db {</code></p>
<p><code>var $ID;</code></p>
<p><code>var $FirstName;</code></p>
<p><code>function __construct($id = null, $autoload = true){</code></p>
<p><code></p>
<p style="padding-left: 60px;">//If we are given an ID<br />
<span> if</span><span>(!</span><span>empty</span><span>(</span>$eventID<span>)){</span></p>
<p style="padding-left: 90px;"><span> $this</span><span>-&gt;</span>setID<span>(</span>$eventID<span>);</span></p>
<p style="padding-left: 90px;"><span><br />
if</span><span>(</span>$autoPopulate<span>){</span></p>
<p style="padding-left: 90px;">$this<span>-&gt;</span><span>read</span><span>();</span></p>
<p style="padding-left: 90px;">}</p>
<p style="padding-left: 30px;"><span> }</span></p>
<p>}</p>
<p>//getters and setters, and any other methods for this object</p>
<p></code></p>
<p><code>}</code></p>
<p><strong>Setup Note: </strong>to keep your plugin from stepping on the toes of others, make sure you change the prefix at the top of the class. Also, changing the name of the class to (plugin prefix)db (example:wec_db) will make sure that it doesn&#8217;t interfere with anyone else&#8217;s if they&#8217;re using this class!</p>
<p><strong>Usage: </strong></p>
<p><strong>Create / Add</strong></p>
<p style="padding-left: 30px;">$person = new person();</p>
<p style="padding-left: 30px;">$person-&gt;setFirstName(&#8216;Joe&#8217;);</p>
<p style="padding-left: 30px;">$person-&gt;setLastName(&#8216;Blow&#8217;);</p>
<p style="padding-left: 30px;">$person-&gt;add();</p>
<p><strong>Read</strong></p>
<p style="padding-left: 30px;">$person = new person($personID);</p>
<p><strong>Update</strong></p>
<p style="padding-left: 30px;">$person = new person($personID);</p>
<p>&#8211;or&#8211;</p>
<p style="padding-left: 30px;">$person = new person($personID, false);</p>
<p style="padding-left: 30px;">$person-&gt;setFirstName(&#8216;Jane&#8217;);</p>
<p style="padding-left: 30px;">$person-&gt;update();</p>
<p><strong>Delete</strong></p>
<p style="padding-left: 30px;">$person = new person($personID, false);</p>
<p style="padding-left: 30px;">$person-&gt;delete();</p>
<p>Post any questions in the comments! I&#8217;d love to hear from you!</p>
]]></content:encoded>
			<wfw:commentRss>http://masseltech.com/2009/06/wordpress-plugin-db-access-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
