<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
  <channel>
    <title>Sharpers</title>
    <description>Sharpers Techie blog</description>
    <link>http://sharpers.com/posts</link>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/sharpers/YRda" /><feedburner:info uri="sharpers/yrda" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:browserFriendly></feedburner:browserFriendly><item>
      <title>setting up heroku with a custom domain on Site5</title>
      <description>&lt;p&gt;In order for this blog to be reached at www.sharpers.com I completed the following:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;heroku addons:add custom_domains
heroku domains:add www.sharpers.com
heroku domains:add sharpers.com
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now I go to site5.com to setup my DNS pointers:&lt;/p&gt;

&lt;p&gt;Goto the site5 site admin page for the domain and click on Manage my domains -&gt; DNS Zone Files
&lt;img src="http://d.pr/VQGY+" alt="alt text" /&gt;&lt;/p&gt;

&lt;p&gt;Click on the "view/edit zone" file button
&lt;img src="http://d.pr/ZfxP+" alt="alt text" /&gt;&lt;/p&gt;

&lt;p&gt;Set the a name for * to 75.101.163.44, 75.101.145.87 and 174.129.212.295&lt;/p&gt;

&lt;p&gt;&lt;img src="http://d.pr/sqn5+" alt="alt text" /&gt;&lt;/p&gt;

&lt;p&gt;You have to wait a while for it to resolve - to test if its ready yet:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;host www.sharpers.com
&lt;/code&gt;&lt;/pre&gt;</description>
      <pubDate>Tue, 30 Nov 2010 20:07:30 -0500</pubDate>
      <link>http://sharpers.com/posts/3-setting-up-heroku-with-a-custom-domain-on-site5</link>
      <guid>http://sharpers.com/posts/3-setting-up-heroku-with-a-custom-domain-on-site5</guid>
    </item>
    <item>
      <title>Adding a project to git and heroku</title>
      <description>&lt;p&gt;First - I have to say that blogcast needs an autosave feature - I nearly lost a previously drafted version of this. Fortunately, I have a chrome plugin called &lt;a href="https://chrome.google.com/extensions/detail/loljledaigphbcpfhfmgopdkppkifgno"&gt;Lazarus&lt;/a&gt; installed which saved my bacon and retrieved the previous draft from a local store. [TODO] Could autosave be a feature I add to blogcast?&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;Assuming you already have accounts at both github and heroku, here are the necessary steps for managing a project (such as this new instance of blogcast!) in those two cloud based applications.&lt;/p&gt;

&lt;h1&gt;Adding project to github&lt;/h1&gt;

&lt;p&gt;Login to github and click on the "New Repository" button on the right hand side.&lt;/p&gt;

&lt;p&gt;Change directory into the project you want to add. Create a new .gitignore:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;.DS_Store
log/*.log
tmp/**/*
config/database.yml
db/*.sqlite3
config/database.yml
db/schema.rb
nbproject/*
*~
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;From the command line:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;git init
git add .
git commit -m 'first commit'
git remote add origin git@github.com:&amp;lt;username&amp;gt;/&amp;lt;project&amp;gt;.git
git push origin master
&lt;/code&gt;&lt;/pre&gt;

&lt;h1&gt;Pushing to a new Heroku project&lt;/h1&gt;

&lt;pre&gt;&lt;code&gt;heroku create
heroku db:push
git push heroku master
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;NOTE: The heroku db:push did not work. This created an issue when I tried to login as admin on the heroku instance of my blog, the admin user did not exist. Easy to get around by using the heroku console:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;heroku console
User.create(:name =&amp;gt; "Bob", :initials =&amp;gt; "sph", :email =&amp;gt; "admin@sharpers.com", :login =&amp;gt; "admin", :password =&amp;gt; "passw0rd", :password_confirmation =&amp;gt; "passw0rd")
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;But I think there must be a way of seeding the database with the admin user (it is supposed to default to admin/admin - but I couldn't find the code where that occurs)&lt;/p&gt;</description>
      <pubDate>Tue, 30 Nov 2010 17:29:33 -0500</pubDate>
      <link>http://sharpers.com/posts/2-adding-a-project-to-git-and-heroku</link>
      <guid>http://sharpers.com/posts/2-adding-a-project-to-git-and-heroku</guid>
    </item>
    <item>
      <title>Blogcast, markdown and wmd-editor</title>
      <description>&lt;p&gt;I read about &lt;a href="http://techoctave.com/blogcast"&gt;blogcast&lt;/a&gt; in my news stream today and it looked like just what I was looking for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Lightweight and quick to install&lt;/li&gt;
&lt;li&gt;Uses Rails 3 so lets me get my hands dirty on that for the first time&lt;/li&gt;
&lt;li&gt;Allows me to embed code into my postings and auto syntax highlights them using &lt;a href="http://softwaremaniacs.org/soft/highlight/en/"&gt;highlight.js&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;So lets get this thing going:&lt;/p&gt;

&lt;p&gt;First of all I downloaded the &lt;a href="http://techoctave.com/blogcast"&gt;blogcast zip&lt;/a&gt; from Tian Davis' website, extracted it into my Projects folder and started up the rails server. 5 minutes later I had this blog up and running locally - sweet!&lt;/p&gt;

&lt;h1&gt;Markdown?&lt;/h1&gt;

&lt;p&gt;Blogcast uses markdown. I've not had a huge amount of experience with that although I have played with it a little. There is a great reference to all the commands on &lt;a href="http://daringfireball.net/projects/markdown/syntax#header"&gt;Daring fireball&lt;/a&gt;. Here are a few I think I will be using significantly:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# heading   - this is a h1
## this is a h2
* unordered list item
1. Ordered list item
&lt;/code&gt;&lt;/pre&gt;

&lt;h1&gt;WMD Editor&lt;/h1&gt;

&lt;p&gt;Blogcast uses the &lt;a href="http://wmd-editor.com/demo"&gt;wmd-editor&lt;/a&gt;. Which gives a few handy shortcuts for editing blog posts.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;ctrl-k     - insert code
ctrl-l     - insert link
ctrl-b     - make **bold**
&lt;/code&gt;&lt;/pre&gt;</description>
      <pubDate>Tue, 30 Nov 2010 16:34:13 -0500</pubDate>
      <link>http://sharpers.com/posts/1-blogcast-markdown-and-wmd-editor</link>
      <guid>http://sharpers.com/posts/1-blogcast-markdown-and-wmd-editor</guid>
    </item>
  </channel>
</rss>

