<?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>qvister &#187; github</title>
	<atom:link href="http://qvister.se/tag/github/feed/" rel="self" type="application/rss+xml" />
	<link>http://qvister.se</link>
	<description></description>
	<lastBuildDate>Tue, 01 Nov 2011 12:56:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>Updated SoundCloud API wrapper with OAuth 2.0 support</title>
		<link>http://qvister.se/2010/11/23/updated-soundcloud-api-wrapper-with-oauth-2-0-support/</link>
		<comments>http://qvister.se/2010/11/23/updated-soundcloud-api-wrapper-with-oauth-2-0-support/#comments</comments>
		<pubDate>Tue, 23 Nov 2010 06:56:03 +0000</pubDate>
		<dc:creator>Anton Lindqvist</dc:creator>
				<category><![CDATA[Blogg]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[release]]></category>
		<category><![CDATA[soundcloud]]></category>

		<guid isPermaLink="false">http://qvister.se/?p=1090</guid>
		<description><![CDATA[I&#8217;m glad to announce the release of version 2.0 of the SoundCloud PHP API wrapper. The wrapper got a complete overhaul including support for authentication using OAuth 2.0. As stated above the wrapper now uses the OAuth 2.0 protocol instead of 1.0. The new shiny updated protocol is in my opinion a huge step forward [...]]]></description>
			<content:encoded><![CDATA[
<p>I&#8217;m glad to announce the release of version 2.0 of the SoundCloud PHP API wrapper. The wrapper got a complete overhaul including support for authentication using <a href="http://oauth.net/2/" target="_blank">OAuth 2.0</a>.<span id="more-1090"></span></p>
<p>As stated above the wrapper now uses the OAuth 2.0 protocol instead of 1.0. The new shiny updated protocol is in my opinion a huge step forward and the authentication flow isn&#8217;t that much of a hazzle anymore.</p>
<p>The wrapper has been written with <a href="http://pear.php.net/" target="_blank">PEAR</a> in mind and can easily be distributed as a PEAR package. The <a href="http://pear.php.net/manual/en/standards.php" target="_blank">PEAR coding standard</a> is also adapted.</p>
<p>Also worth mentioning is that most of the code is now covered by unit tests which makes maintaning and contributing to the project a more gentle matter.</p>
<p>Check out the new <a href="http://soundcloud.qvister.se" target="_blank">demo application</a> or go grab the updated wrapper over at <a href="http://github.com/mptre/php-soundcloud" target="_blank">GitHub</a>.</p>
<p>Happy hacking!</p>
<p><em>Image borrowed from <a href="http://www.flickr.com/photos/pollas/" target="_blank">Anders Pollas</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://qvister.se/2010/11/23/updated-soundcloud-api-wrapper-with-oauth-2-0-support/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Deploy almost anything using Capistrano</title>
		<link>http://qvister.se/2010/04/06/deploy-almost-anything-using-capistrano/</link>
		<comments>http://qvister.se/2010/04/06/deploy-almost-anything-using-capistrano/#comments</comments>
		<pubDate>Tue, 06 Apr 2010 07:33:42 +0000</pubDate>
		<dc:creator>Anton Lindqvist</dc:creator>
				<category><![CDATA[Blogg]]></category>
		<category><![CDATA[capistrano]]></category>
		<category><![CDATA[codeigniter]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://qvister.se/?p=737</guid>
		<description><![CDATA[I recently started digging into the world of Ruby on Rails and quite early came across Capistrano. The whole idea and concept of Capistrano could be explained with their own quite catchy tagline &#8220;Welcome to easyish deployment&#8220;. I&#8217;ve been doing deployment using Git for a while by now. But I find Capistrano more flexible and reliable. [...]]]></description>
			<content:encoded><![CDATA[
<p>I recently started digging into the world of Ruby on Rails and quite early came across <a href="http://www.capify.org/">Capistrano</a>. The whole idea and concept of Capistrano could be explained with their own quite catchy tagline &#8220;<em>Welcome to easy<span style="text-decoration: line-through;">ish</span> deployment</em>&#8220;.<span id="more-737"></span></p>
<p>I&#8217;ve been doing deployment using Git for a while by now. But I find Capistrano more flexible and reliable. Since Capistrano is intended to be used with Ruby on Rails it doesn&#8217;t work with other platforms &#8220;<em>out-of-the-box</em>&#8220;. But magic can still occur with a few lines of code.</p>
<p>Below you&#8217;ll a &#8220;<em>step-by-step</em>&#8221; tutorial on how the get started using Capistrano for easier deployment. The whole idea for this post came in mind during a Capistrano setup for a <a href="http://qvister.se/tag/codeigniter/">Codeigniter</a> application I did recently. But I don&#8217;t see why this deployment process wouldn&#8217;t be applicable on any other platform or framework.</p>
<p>This tutorial assumes you already got your code hosted using either SVN or Git. You preferaly have setup <a href="http://www.linuxquestions.org/linux/answers/Networking/Public_key_authentication_with_ssh">public ssh keys</a> between your computer and the server you&#8217;re deploying to. You&#8217;re using the same directory structure as below for your applications on your server (feel free to change the Capfile in order to match your existing structure).</p>
<pre>/var/www/example.com
/var/www/example.com/www.example.com
/var/www/example.com/www.example.com/logs
/var/www/example.com/www.example.com/public</pre>
<p>Start of by installing Capistrano on your computer. Capistrano is distributed as a Ruby gem.</p>
<pre>$ sudo gem install capistrano</pre>
<p>Next up clone my default Capfile (Capistrano config file) using cURL. Or use the Gist below.</p>
<pre>$ curl "http://gist.github.com/raw/353124/ceda1eccacee7604d7180b23ff20cb618cb760af/capfile.rb" &gt; Capfile</pre>
<p><script src="http://gist.github.com/353124.js?file=capfile.rb"></script></p>
<p>There are some variabels you need to change in order to make this Capfile work with your setup. Basically look through all lines that begins with &#8220;<em>set</em>&#8221; and change the corresponding value. Also make sure to change the server domain on line 10.</p>
<p>A typical Capistrano deployment is loaded with different kind of tasks. Since Capistrano is awesome it allows you to setup own tasks and even overwrite existing tasks.</p>
<p>As mentioned earlier Capistrano was invented with Ruby on Rails in mind, therefor we need to overwrite a few Rails specific tasks (<em>migrate</em>, <em>restart</em>, <em>start</em>). These default tasks are probably not compatible with your application. But feel free to rewrite them if needed.</p>
<p>As you might noticed by now the task &#8220;<em>copy_config</em>&#8221; inside Capfile isn&#8217;t a default task. My Codeigniter applications usually include some setup specific config files that shouldn&#8217;t be included in the repository by obvious reasons. For instance a config file including all necessary MySQL credentials. Therefor these files needs to be setup and edited manually in order to get the application running. But there&#8217;s one problem using this method with Capistrano.</p>
<p>Everytime you deploy using Capistrano a fresh copy of your latest application is being cloned/checkout from the repository and stored inside a new folder on the server. Since Capistrano doesn&#8217;t proceed from the previous deployed release all files that isn&#8217;t included in the repository will <strong>not</strong> be moved to the new deployed release folder. But no worries! Since Capistrano allows us to hook up our own tasks to specific events during deployment we can solve this problem with ease.</p>
<p>The task namned &#8220;<em>copy_config</em>&#8221; is being executed right after the &#8220;<em>symlink</em>&#8221; task. Right after the new release directory has been created and linked to the current directory. Since all my necessary config files are included in the &#8220;<em>.gitignore</em>&#8221; file we can use that as a reference and simply check if the file exists in the previous release folder. If so simply move the file to the newly created release folder. Capistrano provides some nifty <a href="http://www.capify.org/index.php/Variables" target="_blank">variabels</a> such as &#8220;<em>previous_release</em>&#8221; and &#8220;<em>latest_release</em>&#8221; to make this operation easier.</p>
<p>Any other needed operation to get your application up and running should probably be executed after the &#8220;<em>symlink</em>&#8221; task.</p>
<p>Once your Capfile is done it&#8217;s time to run a initial setup deploy. Start of by running the following command.</p>
<pre>$ cap deploy:setup</pre>
<p>You should end up with a similar directory structure on your server.</p>
<pre>/var/www/example.com/www.example.com/public/releases
/var/www/example.com/www.example.com/public/shared
/var/www/example.com/www.example.com/public/shared/log
/var/www/example.com/www.example.com/public/shared/pids
/var/www/example.com/www.example.com/public/shared/system</pre>
<p>It&#8217;s finally time to perform a first initial (cold) deploy of your application to your server.</p>
<pre>$ cap deploy:cold</pre>
<p>Congratulations! You just performed your first deploy using Capistrano. For future deploys the cold task isn&#8217;t necessary. Simply execute the command below.</p>
<pre>$ cap deploy</pre>
<p>Easy enough don&#8217;t you think?</p>
<p>This post should give you a brief idea of the Capistrano workflow. And show how you can hook up your own tasks in order to get your application up and running. I can&#8217;t guarantee that this method can be applicable on your application. As the title states &#8220;<em>&#8230; almost anything</em>&#8220;.</p>
<p>Interested in learning more about Capistrano? Here&#8217;s a <a href="http://delicious.com/mptre/capistrano+blog" target="_blank">few posts</a> that I stumbled across and found interesting during research for this post.</p>
<p><em>Photo credit: </em><a href="http://www.flickr.com/people/heyskinny/" target="_blank"><em>heyskinny</em></a></p>
]]></content:encoded>
			<wfw:commentRss>http://qvister.se/2010/04/06/deploy-almost-anything-using-capistrano/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Server-side Google Analytics</title>
		<link>http://qvister.se/2010/02/02/server-side-google-analytics/</link>
		<comments>http://qvister.se/2010/02/02/server-side-google-analytics/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 11:49:14 +0000</pubDate>
		<dc:creator>Anton Lindqvist</dc:creator>
				<category><![CDATA[Blogg]]></category>
		<category><![CDATA[analytics]]></category>
		<category><![CDATA[codeigniter]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[mobil]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://qvister.se/?p=624</guid>
		<description><![CDATA[In late 2009 Google announced a new Analytics SDK used for tracking events inside iPhone and Android applications. The same release also featured a new method for more accurate tracking running Analytics server-side instead of using JavaScript. This especially comes handy when developing mobile websites. Many older phones suffer from the lack of JavaScript support. [...]]]></description>
			<content:encoded><![CDATA[
<p>In late 2009 Google announced a new Analytics SDK used for tracking events inside iPhone and Android applications. The same release also featured a new method for more accurate tracking running Analytics server-side instead of using JavaScript. This especially comes handy when developing mobile websites.<span id="more-624"></span></p>
<p>Many older phones suffer from the lack of JavaScript support. Which in some cases makes it more complicated to track the user. But running the tracking service server-side will solve this problem easily.</p>
<p>As mentioned earlier Google does offer a server-side solution for Analytics. Sadly enough the documentation is almost non-existing and the only thing provided is some crappy PHP <a href="http://www.google.com/url?sa=D&amp;q=http://www.google.com/analytics/googleanalyticsformobile.zip&amp;usg=AFQjCNEzXGXLA9w0rSdNPKJT-BA0QfJ3MQ">example code</a> to get you started.</p>
<p>Therefor I wrote a simple class in PHP used for interacting with the server-side solution for Analytics. The logic and flow is provided by the existing example code. Below you&#8217;ll find a brief description of the &#8220;<em>flow</em>&#8220;.</p>
<p>A user comes to your site and the url function will generate an uri with all mandatory parameters included. This uri is will be included in the src attribute inside an img element. The browser will then request the uri believing that it&#8217;s an image. The uri will actually be pointing to a executable script. In this script the track function is called. A unique visitor id will be generated and stored inside a cookie. An HTTP-request will be sent to Analytics including all kind of parameters in order to track the user. When the request is done a 1&#215;1 GIF image will be severed in order to satisfy the browser.</p>
<p>The method described above is a quite common way of solving lack of JavaScript related problems.</p>
<p>In order to start using this tracking method you&#8217;ll need to create a new Analytics profile for your website.</p>
<ul>
<li>Create a new profile.</li>
<li>Select &#8220;tracking for a new domain&#8221; or new subdomain if applicable.</li>
<li>Click on the &#8220;Advanced&#8221; tab and choose the mobile option.</li>
<li>Copy your new Analytics ID from the textarea (MO-XXXXXX-XX).</li>
</ul>
<p>The code is available on <a href="http://github.com/mptre/php-ga">GitHub</a> so feel free to fork away! There&#8217;s also a demo included in the repository. Should be just enough to get you started.</p>
<p>To all CodeIgniter fanboys out there. The class works perfectly as a library in CodeIgniter. You just need to make sure to include the uri generated from the url function inside your view. And then point it towards a function in your controller which executes the track function. See the demo inside the repository for further reference.</p>
<p>Happy accurate tracking!</p>
<p><em>Photo credit: <a href="http://www.flickr.com/photos/manfrys/" target="_blank">Antonio Manfredonio</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://qvister.se/2010/02/02/server-side-google-analytics/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Good Old Email Templates</title>
		<link>http://qvister.se/2009/12/14/good-old-email-templates/</link>
		<comments>http://qvister.se/2009/12/14/good-old-email-templates/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 07:56:00 +0000</pubDate>
		<dc:creator>Anton Lindqvist</dc:creator>
				<category><![CDATA[Blogg]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[goodold]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://qvister.se/?p=514</guid>
		<description><![CDATA[Tidigare i våras när jag hjälpte Good Old med sajten till Moving Images 2009 kom jag i kontakt med en smart WordPress plugin vid namn Good Old Email Templates. Utvecklad av Joel Arvidsson från just Good Old. I ett flertal projekt som jag jobbar med just nu krävs liknande funktionalitet. Därav hörde jag mig för [...]]]></description>
			<content:encoded><![CDATA[
<p>Tidigare i våras när jag hjälpte<a href="http://goodold.se/"> Good Old</a> med sajten till <a href="http://movingimagesmalmo.se/">Moving Images 2009</a> kom jag i kontakt med en smart WordPress plugin vid namn Good Old Email Templates. Utvecklad av Joel Arvidsson från just Good Old. I ett flertal projekt som jag jobbar med just nu krävs liknande funktionalitet.<span id="more-514"></span></p>
<p>Därav hörde jag mig för om jag fick &#8220;<em><a href="http://sv.wikipedia.org/wiki/Fork">forka</a></em>&#8221; plugin:en och modifiera den utefter mina behov. Givetvis vart svaret ja.</p>
<p>Good Old Email Templates är alltså en plugin till WordPress för att skapa och administrera email-mallar. Mallarna kan innehålla ett flertal variabler som kan ersättas med egna värden. Detta är framför allt smidigt när man ska göra automatiska mailutskick till ett flertal användare.</p>
<p>Koden har fått sig en rejäl översyn och större delar har skrivit om av mig. Givetvis är plugin:en släppt helt i det fria. Var så god att ladda ner plugin:en från <a href="http://github.com/mptre/wp-goodold-email-templates">GitHub</a> eller varför inte skapa en egen fork?</p>
]]></content:encoded>
			<wfw:commentRss>http://qvister.se/2009/12/14/good-old-email-templates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

