<?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>andre bluehs &#187; Webby</title>
	<atom:link href="http://andrebluehs.net/blog/category/webby/feed/" rel="self" type="application/rss+xml" />
	<link>http://andrebluehs.net/blog</link>
	<description>nerdy, webby, smelly?</description>
	<lastBuildDate>Wed, 25 May 2011 23:35:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Node.js and jQuery and Rhythmbox</title>
		<link>http://andrebluehs.net/blog/2010/10/node-js-and-jquery-and-rhythmbox/</link>
		<comments>http://andrebluehs.net/blog/2010/10/node-js-and-jquery-and-rhythmbox/#comments</comments>
		<pubDate>Thu, 21 Oct 2010 03:12:01 +0000</pubDate>
		<dc:creator>Andre</dc:creator>
				<category><![CDATA[Webby]]></category>

		<guid isPermaLink="false">http://andrebluehs.net/blog/?p=304</guid>
		<description><![CDATA[I wrote a node.js server that listens on port 3000 (with an index page to be served by a regular server) that can do rudimentary control of rhythmbox. Dependencies: Rhythmbox Node.js Express TLDR: Download Playr from github. The Premise I wanted to be able to control my Rhythmbox from my phone, but didn&#8217;t want to build [...]]]></description>
			<content:encoded><![CDATA[<p>I wrote a node.js server that listens on port 3000 (with an index page to be served by a regular server) that can do rudimentary control of rhythmbox.</p>
<p>Dependencies:</p>
<ul>
<li>Rhythmbox</li>
<li><a title="Node.js" href="http://nodejs.org">Node.js</a></li>
<li><a title="Expressjs" href="http://expressjs.com/">Express</a></li>
</ul>
<p>TLDR: <a title="Download Playr" href="http://github.com/helloandre/playr">Download Playr from github</a>.</p>
<p><strong>The Premise</strong></p>
<p>I wanted to be able to control my Rhythmbox from my phone, but didn&#8217;t want to build a special app to do so. So I set about building something in php to control it. I thought I would be able to use the `rhythmbox-client` command line tool I use with Compiz&#8217;s &#8216;Commands&#8217; to map things to my keyboard and mouse buttons.</p>
<p>Boy  was I wrong.</p>
<p><strong>Linux and it&#8217;s Multiple-User architecture suck</strong></p>
<p>So first I tried to use the command-line and php&#8217;s `exec` to call things. Then I realized that php tried to start an X session to try to start up rhythmbox because it couldn&#8217;t detect one. OK. Fine. Maybe I can try to use dbus to communicate with it? No dice. Linux mandates that users cannot see each others programs. Or at least I&#8217;ve failed at finding out how. I tried changing the uid,gid,eid through various languages, still to no avail.</p>
<p>Then I had a conversation with <a title="Alex Milstead" href="http://twitter.com/xanderal">@xanderal</a> and came up with the idea of a server running in user space listening for commands. Magical! I&#8217;ve been looking to try my hand at some node.js, so I figured this would be a great opportunity to try it out.</p>
<p>I found a great web server framework that would do handily (expressjs) for dealing with uri&#8217;s sent by ajax, and got it working in quick order.</p>
<p><strong>Gotchas</strong></p>
<p>Because the port had to be different, I had to use jsonp to fetch data from the node.js server. What I couldn&#8217;t figure out is why sometimes the clicks sent out requests, and sometimes they didn&#8217;t. Browser caching is to blame. After setting $.ajax&#8217;s `cache` to false, it fired every time.</p>
<p><strong>Todos</strong></p>
<p>I&#8217;d like to have autocompleted searching for songs and being able to play them.</p>
<p>Also I&#8217;d like to add in some volume controls too.</p>
<p>If there is any way possible to get this server to run in user space on startup (or more likely login) please let me know. That would be awesome.</p>
 <img src="http://andrebluehs.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=304" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://andrebluehs.net/blog/2010/10/node-js-and-jquery-and-rhythmbox/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Co-founders: Please Pull Your Weight</title>
		<link>http://andrebluehs.net/blog/2010/09/co-founders-please-pull-your-weight/</link>
		<comments>http://andrebluehs.net/blog/2010/09/co-founders-please-pull-your-weight/#comments</comments>
		<pubDate>Thu, 23 Sep 2010 19:36:16 +0000</pubDate>
		<dc:creator>Andre</dc:creator>
				<category><![CDATA[Webby]]></category>

		<guid isPermaLink="false">http://andrebluehs.net/blog/?p=291</guid>
		<description><![CDATA[UPDATE: The original version of this post contained a story whining about a current co-founder of mine. I realized after posting it that I just wanted to get it off my chest. I have updated this post to reflect a much more subdued attitude, but a nonetheless just as important message. Some people can be [...]]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE: </strong>The original version of this post contained a story whining about a current co-founder of mine. I realized after posting it that I just wanted to get it off my chest. I have updated this post to reflect a much more subdued attitude, but a nonetheless just as important message.</p>
<p>Some people can be unreliable. Sometimes things they say make you wonder how much effort is actually being put into the project you have worked for the last year trying to get ready.</p>
<p>This is why I implore all you co-founders to pull your own weight. Or <strong>at least don&#8217;t overpromise and underdeliver</strong>. If you don&#8217;t think something can be done, say it up front. Ask for help. Let your other founders know that you&#8217;re having a hard time accomplishing your duties.  We as your fellow founders are relying on you doing what you said you would do. Not only are other people&#8217;s livelihoods depending on it, but the users who would benefit from your project are too.</p>
<p>There are signs that things like this can happen. No one is going to make all the right decisions and always be able to deliver. But batting zero is not going to get anything accomplished. Maybe you need to stand back and reevaluate your relationship with that person or your approach to your startup.</p>
<p>Hopefully we can pull through and make this work. This isn&#8217;t a cautionary tale quite yet, but it&#8217;s looking like it will be another story of why a startup failed.</p>
 <img src="http://andrebluehs.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=291" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://andrebluehs.net/blog/2010/09/co-founders-please-pull-your-weight/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Backups or The Dreaded `rm -rf /*`</title>
		<link>http://andrebluehs.net/blog/2010/07/backups-or-the-dreaded-rm-rf/</link>
		<comments>http://andrebluehs.net/blog/2010/07/backups-or-the-dreaded-rm-rf/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 19:47:36 +0000</pubDate>
		<dc:creator>Andre</dc:creator>
				<category><![CDATA[Webby]]></category>
		<category><![CDATA[backups]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web dev]]></category>

		<guid isPermaLink="false">http://andrebluehs.net/blog/?p=274</guid>
		<description><![CDATA[At my startup, we have a moderately sane deployment environment. Check-ins are automatically pushed to a staging server (And i&#8217;m notified via notifo with this script). When we want to push code to our live server, we manually move things. For a while that meant we had to run a command by hand once a [...]]]></description>
			<content:encoded><![CDATA[<p>At my startup, we have a moderately sane deployment environment. Check-ins are automatically pushed to a staging server (And i&#8217;m <a href="http://andrebluehs.net/blog/2010/06/subversion-and-notifo-and-post-commit/">notified</a> via <a href="http://notifo.com">notifo</a> with <a href="http://github.com/notifo/Notifo-API-Libraries/tree/master/svn-hooks/">this script</a>). When we want to push code to our live server, we manually move things.</p>
<p>For a while that meant we had to run a
<pre class="brush: plain; title: ; notranslate">svn export</pre>
<p>command by hand once a day or so. (we are under heavy development still)</p>
<p>Eventually we needed a couple more things done when we moved code to the live server (among them run google&#8217;s <a href="http://code.google.com/closure/compiler/docs/gettingstarted_ui.html">closure compile</a>r to reduce our js footprint). So I wrote a script to handle these things. Apparently while testing, I got distracted and never finished it, because when i ran it, the code was this:</p>
<pre class="brush: bash; title: ; notranslate"># ... snipped ...
#
# code to assure you're running as root
#

if [ -z $2 ]
    then
        loc= '/path/to/code'
    else
        $loc = $2
fi

# nuke old files
rm -rf $loc/*

# ... snipped ... </pre>
<p>Now, to the astute, you will notice there is a bug here. Can you find it? It&#8217;s in the assignment of</p>
<pre class="brush: plain; title: ; notranslate">$loc = $2</pre>
<p>It SHOULD be similar to the loc assignment above it.</p>
<pre class="brush: plain; title: ; notranslate">loc=$2</pre>
<p>Well. This throws an error, but happily keeps moving on down the script. Next question: what happens here when $loc is an empty string &#8221;? That&#8217;s right. <strong>I just ran rm -rf /*as sudo on our main server.</strong></p>
<p>I <a href="http://twitter.com/helloandre/status/19318926067">realized quickly</a> what had happened. Errors whizz by about permissions, and finally I Ctrl+c&#8217;d it out of existence. Everything still in memory was intact. Our application was still running, I was still ssh&#8217;d in. So I took stock of my life, and tried to calm down. I had no idea what to do at this point; thoughts ranged from spending the next 12 hours slowly rebuilding everything (I had the latest copy of our code and db on my local computer, so our code was safe) to never returning my CEO&#8217;s emails again and abandoning our company. I initially did some fruitless googling for &#8216;restore rm -rf *&#8217; even though I knew &#8211; short of serious hard drive-level manipulation &#8211; I was NOT getting anything back. </p>
<p>Then I remembered that we are using <a href="https://www.jungledisk.com/">Jungle Disk</a> to do daily and weekly backup. I figured out that Media Temple (our awesome <a href="http://mediatemple.net/webhosting/dv/">host</a>) allows us to reinstall our OS if something like&#8230; this happens. So first I checked that we had a recent backup. We did. So i went into our dasboard, and clicked on the button to &#8216;Revert to Default&#8217; (MT&#8217;s oh-shit button). <a href="http://twitter.com/helloandre/status/19320699412">And waited</a>. After that was done, the first thing I reinstalled was Jungle Disk and set it up to recognize itself. Then I simply ran Jungle Disk&#8217;s restore program, and voilà! I installed a few more programs that we needed, and <strong>we were 100% back up and running in about 3 hours</strong>.</p>
<p>We back up our /etc, /var, and /home folders daily and our entire file system weekly, so not too much data was lost. As it turns out, this doesn&#8217;t include our Postfix maildir, so we lost about a week&#8217;s worth of email (personally, I use gmail and it downloads all the email, so I didn&#8217;t lose anything). We have since fixed this to save email daily. </p>
<p>This story is another among many to remind you to back your shit up. Fortunately we ended up ok; thanks in no small part to Jungle Disk.</p>
<p>If you have any questions about our staging=>live process (which is now Idiot Proof&copy;), or our backup strategy, drop me a line at hello at andrebluehs dot net. </p>
 <img src="http://andrebluehs.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=274" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://andrebluehs.net/blog/2010/07/backups-or-the-dreaded-rm-rf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Subversion and Notifo and Post-Commit</title>
		<link>http://andrebluehs.net/blog/2010/06/subversion-and-notifo-and-post-commit/</link>
		<comments>http://andrebluehs.net/blog/2010/06/subversion-and-notifo-and-post-commit/#comments</comments>
		<pubDate>Sat, 19 Jun 2010 21:52:39 +0000</pubDate>
		<dc:creator>Andre</dc:creator>
				<category><![CDATA[Webby]]></category>
		<category><![CDATA[hooks]]></category>
		<category><![CDATA[notifo]]></category>
		<category><![CDATA[post-commit]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://andrebluehs.net/blog/?p=265</guid>
		<description><![CDATA[A service called Notifo just launched recently. They facilitate ridiculously simple push notifications. So I wanted to be notified when any of my developers checked in code, and what the message they sent was. This is useful for me because we all work remotely, and I can&#8217;t just walk over to their office to check [...]]]></description>
			<content:encoded><![CDATA[<p>A service called <a href="http://notifo.com">Notifo</a> just launched recently. They facilitate ridiculously simple push notifications. So I wanted to be notified when any of my developers checked in code, and what the message they sent was. This is useful for me because we all work remotely, and I can&#8217;t just walk over to their office to check in on them. So I wrote a couple-line post-commit hook to tell me these things. Then i figured other people would want it, so i made it prettier and put it up on github.</p>
<h3>Pick up the script at github <a href="http://github.com/helloandre/Notifo-Post-Commit-Hook">Notifo Post Commit Hook</a></h3>
<p>You&#8217;ll need to change the NAME and APISECRET variables, and then it will work straight out of the box. You can test it without having to actually check anything in by doing cd&#8217;ing into your repo&#8217;s &#8216;hooks&#8217; folder, and then run the command &#8216;./post-commit /path/to/your/repo &lt;a revision number&gt;&#8217;</p>
<h3>Some highlights from the code:</h3>
<p>Notifo requires that the data you send it be url-encoded (makes sense), but there is no command line utility for that, specifically. So I had to use a tiny little perl script I found on this stack overflow question that had the same <a href="http://stackoverflow.com/questions/296536/urlencode-from-a-bash-script">url encoding from a bash script</a> problem. I also put in handling an empty message (yes, some people suck).</p>
<p>Don&#8217;t forget to make sure you have curl installed. php5-curl (or equivalent apache plugin) will not do, you need to actually have the command-line tool for this to work. The other programs used i&#8217;m pretty sure come standard. Svnlook comes with a standard subversion command-line installation (which I assume you have if you&#8217;ve got a repo on there&#8230;).</p>
<p>Something i&#8217;d like to improve is to get the author and message in one call. However, i can&#8217;t figure out how to separate them with awk, or any other command line utility.</p>
<h3>Notes on Notifo</h3>
<p>I am super happy with this service. I&#8217;ve wanted to add push notifications to several of my projects for a while, but the barrier to entry with sending notifications is pretty steep. The only other comparable option is <a href="http://prowl.weks.net/">Prowl</a>, but it&#8217;s api page is sparse, with no examples, and it&#8217;s only for iPhone (And costs $2.99). Also, they do not allow the flexibility of Notifo. With Notifo, you can send <em>yourself</em> a notification, you do not have to have a registered application or service. This is what allows my script to work, as well as the <a href="https://chrome.google.com/extensions/detail/lgffhepmapgeepjnhchaabmaoijfcnhi">Chrome to Notifo</a> link sharing extension written by Notifo co-founder <a href="http://paulstamatiou.com/">Paul Stamatiou</a>.</p>
<p>Email me at hello at andrebluehs dot net with any questions.</p>
 <img src="http://andrebluehs.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=265" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://andrebluehs.net/blog/2010/06/subversion-and-notifo-and-post-commit/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Coffin Nails and Native Mobile Apps</title>
		<link>http://andrebluehs.net/blog/2010/06/coffin-nails-and-native-mobile-apps/</link>
		<comments>http://andrebluehs.net/blog/2010/06/coffin-nails-and-native-mobile-apps/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 19:17:30 +0000</pubDate>
		<dc:creator>Andre</dc:creator>
				<category><![CDATA[Webby]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[native ipad app]]></category>
		<category><![CDATA[native iphone app]]></category>
		<category><![CDATA[web app]]></category>
		<category><![CDATA[web dev]]></category>

		<guid isPermaLink="false">http://andrebluehs.net/blog/?p=243</guid>
		<description><![CDATA[One of my startups, Usable Health, is making an iPad-specific version of our web app to be installed in restaraunts. (Side note: watch our CEO talk at Ignite Atl) Since we were going to set-and-forget these applications, we needed a way to prevent people from going to other sites (as this is a web app [...]]]></description>
			<content:encoded><![CDATA[<p>One of my startups, <a href="http://usablehealth.com/">Usable Health</a>, is making an iPad-specific version of our web app to be installed in restaraunts. (Side note: <a href="http://www.youtube.com/watch?v=RfUhoW1kP6g">watch our CEO</a> talk at Ignite Atl) Since we were going to set-and-forget these applications, we needed a way to prevent people from going to other sites (as this is a web app just running in safari). Then I came across this <a href="http://sixrevisions.com/web-development/html5-iphone-app/">article by Alex Kessinger</a>. And we realized:</p>
<p><strong>We wanted a native iPad app. So we made a web app.</strong></p>
<p>Alex&#8217;s article gets in to a bit too much detail for us. We really only need one line:</p>
<p>&lt;meta name=&#8221;apple-mobile-web-app-capable&#8221; content=&#8221;yes&#8221; /&gt;</p>
<p>This one line of code transformed our web app (built for ipad size and features) into a native-looking app with no Safari toolbars on the top or bottom. Add it to the home screen, and you are off and running.</p>
<p>There are other features of that post that we could use, such as setting a home screen icon, but we don&#8217;t care about this, because our app should never be closed anyway while at an installation.</p>
<p>Here are screens of before:</p>
<p><a href="http://ablu.us/plg"><img class="alignnone" title="Before" src="http://ablu.us/files/plg-before.png" alt="" width="1024" height="768" /></a></p>
<p>after:</p>
<p><a href="http://ablu.us/ymg"><img class="alignnone" title="After" src="http://ablu.us/files/ymg-after.png" alt="" width="1024" height="768" /></a></p>
<p>The total time from start to finish to get this working? <strong>26 minutes. This includes me sharing the link, and our developer reading the article.</strong></p>
<p>This is why i believe that for most applications, native apps are becoming obsolete. There are HUGE incentives for more adoption of this method:</p>
<ul>
<li>no need for apple developer licence (cheap for small companies)</li>
<li>don&#8217;t have to deal with the app store</li>
</ul>
<p>There are, however, cons:</p>
<ul>
<li>hardware acceleration is spotty. games are mostly out.</li>
<li>hard to charge to download app. however, can charge for access.</li>
</ul>
<p>For the people who say that &#8220;Well, it doesn&#8217;t work on other browsers&#8221;. That&#8217;s only half true. While this method of removing top and bottom bars only works on iPhone/iPad, the app still functions 100% normally in other mobile browser. Building a mobile app gets you 90% of the way, and adding that <strong>ONE LINE</strong> gets you the rest of the way for apple browsers.</p>
<p>Here is where you can try it on your ipad (or iphone/ipod touch):<a href="http://ablu.us/files/uh_ipad" target="_blank"> http://ablu.us/files/uh_ipad</a></p>
 <img src="http://andrebluehs.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=243" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://andrebluehs.net/blog/2010/06/coffin-nails-and-native-mobile-apps/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Gmail and Tips and Tricks</title>
		<link>http://andrebluehs.net/blog/2010/05/gmail-and-tips-and-tricks/</link>
		<comments>http://andrebluehs.net/blog/2010/05/gmail-and-tips-and-tricks/#comments</comments>
		<pubDate>Wed, 05 May 2010 19:44:00 +0000</pubDate>
		<dc:creator>Andre</dc:creator>
				<category><![CDATA[Webby]]></category>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[web dev]]></category>

		<guid isPermaLink="false">http://andrebluehs.net/blog/?p=233</guid>
		<description><![CDATA[Did you know that you can modify your gmail address with and it will still reach you? Gmail ignores dots &#8216;.&#8217; and everything after a plus &#8216;+&#8217; sign. This comes in extremely handy. Need to create several test accounts on your new web app? No problem! Just move around a dot in your address! Need [...]]]></description>
			<content:encoded><![CDATA[<p>Did you know that you can modify your gmail address with and it will still reach you? Gmail ignores dots &#8216;.&#8217; and everything after a plus &#8216;+&#8217; sign.</p>
<p>This comes in extremely handy. Need to create several test accounts on your new web app? No problem! Just move around a dot in your address! Need to give an email address, but don&#8217;t want to ever receive email from them? Tack a &#8216;+spam&#8217; on the end of your address and filter it to automatically be marked read and go to the trash.</p>
<p>Let&#8217;s take a look at how to do this.</p>
<p><strong>The Dot</strong></p>
<p>Gmail handily ignores all dots in the name part of your email address. andre.bluehs@gmail.com is exactly the same as andrebluehs@gmail.com is exactly the same as a.n.d.r.e.b.l.u.e.h.s@gmail.com. This is useful for signing up for accounts that require a unique email address, but you already have an account for (for testing, purposes, of course). All emails will go to your account, regardless of where and how many dots are in the name.</p>
<p>This also works for signing in to google. you can use your username without the @gmail part when logging into gmail. (This is not true for third party apps using your gmail identity for log in, such as stackoverflow, you need to provide your full email address)</p>
<p><strong>The Plus</strong></p>
<p>This hack is extremely useful for &#8216;tagging&#8217; email from certain places. If a site requires that you give an email address, simply put a +spam at the end of your username, and filter it. Note: you can put whatever you want after the +, i just use &#8216;spam&#8217; here as an example. Gmail does not automatically filter things with &#8216;+spam&#8217; on the end, you must do this manually with the next step.</p>
<p>To create the appropriate filter, click on &#8216;create new filter&#8217; next to the search button:</p>
<p><a href="http://ablu.us/xum"><img class="size-full wp-image-235 alignnone" title="gmail-step1" src="http://ablu.us/files/xum-gmail-step1.png" alt="" width="302" height="75" /></a></p>
<p>Then put in the To: field, whatever your email address is, with a &#8216;+spam&#8217; for the username.</p>
<p><a href="http://ablu.us/elq"><img class="size-full wp-image-235 alignnone" title="gmail-step2" src="http://ablu.us/files/elq-gmail-step2.png" alt="" width="437" height="167" /></a></p>
<p>and finally, check &#8216;mark as read&#8217; and &#8216;delete it&#8217; in the last step.</p>
<p><a href="http://ablu.us/icz"><img class="size-full wp-image-235 alignnone" title="gmail-step3" src="http://ablu.us/files/icz-gmail-step3.png" alt="" width="474" height="214" /></a></p>
<p>and you&#8217;re done! never to be pestered by &#8216;affiliate email&#8217; again.</p>
<p>This can be repeated for any kinds of filters you want, as well as using the dot hack with this filtering hack to accomplish the same thing.</p>
 <img src="http://andrebluehs.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=233" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://andrebluehs.net/blog/2010/05/gmail-and-tips-and-tricks/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Techtopics: Week 1</title>
		<link>http://andrebluehs.net/blog/2010/04/techtopics-week-1/</link>
		<comments>http://andrebluehs.net/blog/2010/04/techtopics-week-1/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 22:03:14 +0000</pubDate>
		<dc:creator>Andre</dc:creator>
				<category><![CDATA[Webby]]></category>

		<guid isPermaLink="false">http://andrebluehs.net/blog/?p=231</guid>
		<description><![CDATA[My gtacm techtopics started last week. It&#8217;s all about javascript, jQuery, and AJAX. This week consisted of the introduction to the browser: DOM, DOM Inspectors, javascript: syntax, variables, jquery: syntax, selectors, basic animations. You can download this week&#8217;s zip over at the techtopic page. It includes the html and javascript from our in class demonstration [...]]]></description>
			<content:encoded><![CDATA[<p>My gtacm techtopics started <a href="http://andrebluehs.net/blog/2010/03/techtopics-and-you/">last week</a>. It&#8217;s all about javascript, jQuery, and AJAX. This week consisted of the introduction to the browser: DOM, DOM Inspectors, javascript: syntax, variables, jquery: syntax, selectors, basic animations.</p>
<p>You can download this week&#8217;s zip over at the <a href="http://andrebluehs.net/techtopic">techtopic page</a>. It includes the html and javascript from our in class demonstration as well as another example, and the powerpoint i <em>meant</em> to show.</p>
<p>Here is some auxiliary stuff that I did not get to talk about in class but I wanted to cover.</p>
<h2><strong>$(document).ready(function(){})</strong></h2>
<p>All I said in class was that &#8220;this is necessary. Put everything inside here. jQuery won&#8217;t function without this. Don&#8217;t question&#8221;. I&#8217;m sorry, this was mean. What I really meant to explain was that this IS necessary, but it is NOT the only way to accomplish this task.</p>
<p>What this line is saying is that jQuery has some things that need to be run AFTER the browser has populated the DOM with all the HTML elements. It has to wait for this so that the elements EXIST when it tries to assign all the appropriate listeners to what you have told it to do. However, you can do this exact same thing with a much simpler call:</p>
<p><code>$(function(){})</code></p>
<p>That&#8217;s right, <strong>you can replace $(document).ready(fuction(){}) with $(function(){})</strong>.</p>
<p>Wow, that was easy.</p>
<h2>Dropdown menu</h2>
<p>I had originally planned on doing a full-blown example at the end of class. This example would be a dropdown menu that would work on hover over (similar to the one found at <a href="http://www.cc.gatech.edu">http://www.cc.gatech.edu</a>). I have included it in the zip (found on <a href="http://andrebleuhs.net/techtopic">the techtopic page</a>) along with a spiffed up code that we did in class.</p>
<p>The dropdown menu included in the zip is a bare-bones implementation that you can put into any navigation. I used a function we didn&#8217;t cover in class <a href="http://api.jquery.com/children/">.children()</a>. Briefly, this function finds all the HTML elements that are contained in that element (div, span, etc), and you can refine it by putting a selector as a parameter to the function (like in my dropdown example).</p>
<p>Please study this and modify it (try using <a href="http://api.jquery.com/fadeIn/">.fadeIn()</a>/<a href="http://api.jquery.com/fadeOut/">.fadeOut()</a> instead of .slideDown()/.slideUp()) and try some experimentation with this. Also, this is a great reference to have in the future if you are building something that needs a dropdown menu: this will work great for you.</p>
<h2>More Stuff</h2>
<p>Two things I didn&#8217;t get to talk about this week are <strong>$(this)</strong> and <strong>.animate(). </strong></p>
<p>$(this) is a reference inside a callback function to whatever was selected. In the dropdown example, $(this) refers to the div with class=&#8217;hover-container&#8217; that was hovered over. It only exists inside the callback function.</p>
<p><a href="http://api.jquery.com/animate/">.animate()</a> is the big kahuna when it comes to anything animated with jQuery. Actually, in the actual source code for jQuery most specifically named animation functions (slideDown, slideUp, etc) just call .animate() with the proper parameters for that specific function.</p>
<p>.animate() is ridiculously powerful and can do a lot of things. We will be covering it more in-depth in the final week.</p>
 <img src="http://andrebluehs.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=231" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://andrebluehs.net/blog/2010/04/techtopics-week-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>You and Urls and Browser Plugins</title>
		<link>http://andrebluehs.net/blog/2010/03/you-and-urls-and-browser-plugins/</link>
		<comments>http://andrebluehs.net/blog/2010/03/you-and-urls-and-browser-plugins/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 06:11:41 +0000</pubDate>
		<dc:creator>Andre</dc:creator>
				<category><![CDATA[Webby]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web dev]]></category>

		<guid isPermaLink="false">http://andrebluehs.net/blog/?p=217</guid>
		<description><![CDATA[Someone recently offered to pay me to write them a url shortening backend/script to use for themselves. Not only did I decide to not charge them for it, but I decided to write a chrome extension so you can use it with as little hassle as possible. For the tl;dr; crowd: download the url shortening script [...]]]></description>
			<content:encoded><![CDATA[<p>Someone recently offered to pay me to write them a url shortening backend/script to use for themselves. Not only did I decide to not charge them for it, but I decided to write a chrome extension so you can use it with as little hassle as possible.</p>
<p>For the tl;dr; crowd: download the url <a href="http://github.com/helloandre/shortnsweet">shortening script</a> and the <a href="http://ablu.us/files/custom-ext.crx">chrome extension</a> to use with your shiny new shortener. Instructions are included.</p>
<p>The following instructions are included in the README.txt of the tar file. But here they are for convenience, and for any questions: leave them in the comments. NOTE: these instructions are if you want a default installation setup. This assumes you want all the default table, user name, and password. It&#8217;s probably a good idea to change them, but that&#8217;s up to you.</p>
<p><strong>Step 0: Things You Need</strong></p>
<p>You&#8217;re going to need a url. Probably a short one? There are tons of crazy tld&#8217;s available. i chose ablu.us cause it&#8217;s moderately close, yours might work even better.</p>
<p>Apache with mod_rewrite. Or equivalent server/rewrite setup.</p>
<p>PHP.</p>
<p><strong>Step 1: The Database</strong></p>
<p>You&#8217;re going to need to create the database for your service. NOTE: the user@server$ and mysql&gt; are the prompts you should  see (clearly user@server$ will be different for you).</p>
<pre class="brush: bash; title: ; notranslate">user@server$ msyql -u root -p

mysql&gt; CREATE DATABASE `uploads`;

mysql&gt; GRANT ALL PRIVILEGES ON `uploads`.* TO 'uploads_user'@localhost IDENTIFIED BY 'uploads_pass';

mysql&gt; FLUSH PRIVILEGES;

msyql&gt; quit;</pre>
<p>This will create the database we need to install things in the next step.</p>
<p><strong>Step 2: Installation</strong></p>
<p>If you table name, username, or password you need to edit config.php accordingly. There are also a number of other things you can customize in config.php like the alphabet used to chose characters from, the length of the shortened url.</p>
<p>One thing you <strong>MUST change</strong> the $site_url in config.php. Otherwise it will insert things into your database, but not give you the correct link back.</p>
<p>Visit /install of the folder from above from your browser (http://yourdoma.in/install). If you kept the defaults from the above step, you don&#8217;t need to change any of these fields.</p>
<p>Click &#8220;Install &gt;&gt;&#8221;. And barring any database errors, you should have a working url shortening service!</p>
<p>NOTE: You may want to consider removing the /install folder after this step. It&#8217;s not necessary as running it again won&#8217;t destroy any data, but you never know.</p>
<p><strong>Chrome Extension</strong></p>
<p>The chrome extension is pretty easy to use. The first time you try to use it, it will tell you to Set Shortener. You have two choices here: If you want to use your own service you just created, enter the following:</p>
<pre>yourdomain/up.php?site=</pre>
<p>If you want to use MY service, enter:</p>
<pre>ablu.us/up.php?site=</pre>
<p>I&#8217;m considering doing a Firefox addon as well, but creating one of those is a bit more involved.</p>
<p>This extension will work with any url shortening api that returns just the plain text of the short url. Examples include <a href="http://fizl.us">http://fizl.us</a>, <a href="http://is.gd/api_info.php">http://is.gd</a>.</p>
<p><strong>That&#8217;s It!</strong></p>
<p>You have your own url shortening service!</p>
<p>I am running a modified version of this on my own site: <a href="http://ablu.us">http://ablu.us/</a>. The main ablu.us is an image uploader. Feel free to use it if you so chose, but I just created it for my own personal use for some coding practice.</p>
<p>Leave any questions in the comments below, and i&#8217;ll try to get to them.</p>
 <img src="http://andrebluehs.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=217" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://andrebluehs.net/blog/2010/03/you-and-urls-and-browser-plugins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ablu.us and Chrome Extensions</title>
		<link>http://andrebluehs.net/blog/2010/02/ablu-us-and-chrome-extensions/</link>
		<comments>http://andrebluehs.net/blog/2010/02/ablu-us-and-chrome-extensions/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 17:16:57 +0000</pubDate>
		<dc:creator>Andre</dc:creator>
				<category><![CDATA[jquery]]></category>
		<category><![CDATA[Securiy]]></category>
		<category><![CDATA[Webby]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[extensions]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web dev]]></category>

		<guid isPermaLink="false">http://andrebluehs.net/blog/?p=199</guid>
		<description><![CDATA[I recently created a file hosting and url shortening service for myself: ablu.us. Now as a pet project, i&#8217;m starting to get some feature creep action going on. Case in point: I just wrote a chrome extension to use this service. NOTE: I am never going to release this to the gallery, as I don&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>I <a href="http://andrebluehs.net/blog/2010/02/image-uploader-and-url-shortener-and-you/">recently created</a> a file hosting and url shortening service for myself: <a href="http://ablu.us/s">ablu.us</a>. Now as a pet project, i&#8217;m starting to get some feature creep action going on. Case in point: I just wrote a chrome extension to use this service.</p>
<p>NOTE: <em>I am never going to release this to the <a href="https://chrome.google.com/extensions?hl=en-US">gallery</a></em>, as I don&#8217;t want THAT much attention to this thing, it&#8217;s just sweet for me to have for myself. In all actuality, I might do something else with this url eventually, so releasing this out into the world would probably be a bad idea.</p>
<p>That said, here is a link to download it if you actually want it:</p>
<p><strong>INSTALL </strong><a href="http://ablu.us/files/custom-ext.crx"><strong>ablu.crx</strong></a><strong>. </strong></p>
<p><strong></strong>CHANGELOG :</p>
<p>version 0.2 now includes using fizl.us.</p>
<p>version 0.2.1 fixed an initial settings bug</p>
<p>version 0.3 don&#8217;t remember fixes. but there were some!</p>
<p>It&#8217;ll ask you if you really trust me, and to continue. And that&#8217;s it.</p>
<p>I won&#8217;t get into the nitty gritty details of HOW TO create your own chrome extension quite yet, but expect a blog post about it soon. Also, Google has a bunch of getting started tutorials that helped me so well it only took me about 2 hours to write this extension from scratch.</p>
<p>Some interesting things are as follows:</p>
<p><strong>These babies are written in javascript</strong></p>
<p>This was news to me. I knew Firefox plugins are written in XUL, which is similar to javascript. Chrome extensions are written in plain, vanilla javascript. Not only that, the part that gets displayed is literally an html page that you can do whatever you want with. If you want to include jQuery, you can (mine does not). Any other library? yup. It also means that you can use any of the HTML 5 capabilities Chrome offers: local storage, canvas, image rotation.</p>
<p>This strikes me as a bit excessive as you can load an unlimited number of scripts from anywhere. Seems to me that this could be abused.</p>
<p><strong>Chrome allows copying to clipboard</strong></p>
<p>That&#8217;s right. You can copy things to clipboard just like in IE with</p>
<pre>document.execCommand('Copy')</pre>
<p>This is exactly how similar URL Shortening extensions work. After seeing how awesome this is, I have to wonder&#8230; why doesn&#8217;t Firefox support this? I don&#8217;t see it being a security risk more than copying profanity into the clipboard. Whatever, it&#8217;s nifty that chrome has it.</p>
<p><strong>Autoupdating is scary</strong></p>
<p>Hoo dangle is it scary. What happens if the dev&#8217;s life suddenly tanks and decides he wants to have your browser randomly redirect to a porn site at random intervals? If you have a previously installed extension of his and he decides to update this new functionality, he can (there are some caveats to this, like what permissions the extension already has). This could be problematic as it would be difficult to track down exactly what&#8217;s causing this browser behavior. This has the potential to turn any previously useful and non-porn-redirecting extension into a very messy thing to be a part of.</p>
<p>If you are in the market for (another) url shortening extension, give it a try. Let me know what you think. It could probably use a much better logo, so if  you want to help drop me a line at hello () andrebluehs [] net.</p>
 <img src="http://andrebluehs.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=199" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://andrebluehs.net/blog/2010/02/ablu-us-and-chrome-extensions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Image Uploader and URL Shortener and You</title>
		<link>http://andrebluehs.net/blog/2010/02/image-uploader-and-url-shortener-and-you/</link>
		<comments>http://andrebluehs.net/blog/2010/02/image-uploader-and-url-shortener-and-you/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 16:18:27 +0000</pubDate>
		<dc:creator>Andre</dc:creator>
				<category><![CDATA[jquery]]></category>
		<category><![CDATA[Webby]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web dev]]></category>

		<guid isPermaLink="false">http://andrebluehs.net/blog/?p=169</guid>
		<description><![CDATA[I recently purchased the url ablu.us with the intention of using it as a url shortener/image uploader. So i did. It was actually quite trivial, and I had the code for it done about 6 months ago, but didn&#8217;t purchase the url till recently. I had created a photo uploader for another website I was [...]]]></description>
			<content:encoded><![CDATA[<p>I recently purchased the url ablu.us with the intention of using it as a url shortener/image uploader. So i did.</p>
<p>It was actually quite trivial, and I had the code for it done about 6 months ago, but didn&#8217;t purchase the url till recently. I had created a photo uploader for another website I was working on (<a href="http://newnantheatre.org">newnantheatre.org</a>) so I just copied over the code (I wasn&#8217;t getting paid anyway, so I felt it was ok to reuse the code). There are some improvements tho that I&#8217;ll document here. However, I&#8217;m not actually going into the implementation of a url shortener or image uploader. You should take a weekend and figure this out for yourself. Or maybe I&#8217;ll do a post on it later.</p>
<h3>Resize Me</h3>
<p>The first thing I wanted was for people to not have to scroll horizontally to see huge pictures. But I didn&#8217;t want to resize them during the upload process, because I wanted people to see them the largest possible. So i wrote a quick jQuery script to detect the window size/proportions, and resize the image to that roughly. There are still some bugs in this, and currently there is no way to see the actual real size image without going to the hotlink.</p>
<h3>mod_rewrite</h3>
<p>This was a huge thing, as I had just started experimenting with it recently. I&#8217;m not a fan of big, scary regular expressions, but they&#8217;re damn useful (and necessary) when it comes to mod_rewrite. For those of you who don&#8217;t know what this is, it&#8217;s pretty urls. It takes the part after the .com, .net, .us, etc, and turns it into a meaningful request to the script that is actually being accessed. This was particularly useful for url shortening because it removes the need for a &#8216;?x=xxx&#8217; at the end of a url.</p>
<h3>api</h3>
<p>In the case of the url shortening, i created a dead simple api to use. This can be used as a bookmarklet with any browser that supports them (Firefox, Chrome (only tested in dev builds), Safari, etc). Just paste this code into the url part of a bookmark to create a bookmarklet:</p>
<pre class="brush: jscript; title: ; notranslate">javascript:void(window.location='http://ablu.us/s/up.php?site='+location.href)</pre>
<p>Or you can visit http://ablu.us/s and copy the url you want to shorten and click &#8216;Shorten&#8217;. Or you can use it in any other context of plugin, extension, etc for url shortening purposes by using the url http://ablu.us/s/up.php?site=.</p>
<p>EDIT: Chrome Extension</p>
<p>I have written a <a href="http://andrebluehs.net/blog/2010/02/ablu-us-and-chrome-extensions/">chrome extensio</a>n for this as well.<br />
I hearby release this unto the world. My friend Eric (<a href="http://twitter.com/diagonalfish">@diagonalfish</a>) runs a similar (and WAY more professional) service at <a href="http://fizl.us">http://fizl.us</a>, and both of us doing this prompted me to write this post. If you have your own personal image uploader/url shortener, let us know in the comments.</p>
 <img src="http://andrebluehs.net/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=169" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://andrebluehs.net/blog/2010/02/image-uploader-and-url-shortener-and-you/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

