Thursday, August 22, 2013

Create Transparent Demo pages on Android

Have you seen those apps with the really cool hand drawn arrows that show the users how the app works the first time they run it?  Yeah I have too and I wanted to figure out how to do that.  So I did.   Now I'm going to show you also.

This is going to be pretty easy and we'll do it for Activities and Fragments so all your apps will be covered.

The first thing you'll need to do is draw the pictures that we'll place over the Activity/Fragment.  I draw mine on Gimp but you can use whatever drawing tool you want.  I recommend you draw them 480 X 760 px.  You'll want to set your background as Transparent.   Here is a sample of what I've done.


That's easy enough.  I recommend you draw these as you go, I've found that I needed to edit the images to make sure they are pointing to the exact right place on the screen.

Next up we'll create an XML layout for each image that you want to use in your app.  We'll create a LinearLayout with an embedded ImageView.  The ImageView will display our beautiful art from above.  Make sure to give the LinearLayout an ID, set the background to @null.  As for the ImageView you'll need to give it an ID also and set the source to the image file you drew previously.  Be sure to put the image in the res/drawable folder, make sure the image file name is all lower case and it is a .png file type.  Again you will need to create as many of these XML layouts as you did images above.

overlay_activity.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/llOverlay_activity"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@null"
    android:orientation="vertical" >

    <ImageView
        android:id="@+id/ivOverlayEntertask"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:src="@drawable/activity_overlay" />

</LinearLayout>

We are going to control when this is displayed to the user with SharedPreferences.  Utilizing SharePreferences gives us the ability to show the tutorial on the first run of the app and also allows the user to see it again by selecting it in the apps Settings menu.

We'll need to create a folder under /res/ named /xml, so you'll end up with /res/xml.  Now let's create a new XML layout for our preferences.  In Eclipse you'll choose File New > Android XML file.  Change the Resource Type to Preference, then name the file exactly this prefs.xml and click Finish.  

Next we'll add a CheckBoxPreference with the following attributes:
android:defaultValue="true"
android:key="tutorial"
android:summary="Enable tutorial on device"
android:title="Tutorial"
So your final prefs.xml file will look exactly like this:

<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" >

    <CheckBoxPreference
        android:defaultValue="true"
        android:key="tutorial"
        android:summary="Enable tutorial on device"
        android:title="Tutorial" />

</PreferenceScreen>

Now let's look at how to show this to the user from our Activity or Fragment.  First we'll determine if our tutorial CheckBoxPreferene is set to true and if so we'll display the drawing on top of the current Activity/Fragment.  

Create and instance of SharedPreferences and a boolean to store the value:
SharedPreferences setNoti;
boolean showTut;

Then in our OnCreate we'll get the value for our tutorial CheckBoxPreference and if ti's true we'll overlay the image onto our Activity/Fragment:

setNoti = PreferenceManager.getDefaultSharedPreferences(this);
// SharedPref tutorial
showTut = setNoti.getBoolean("tutorial", true);

if (showTut == true) {
showActivityOverlay();
}

Now for the last part we'll create the method to display the overlay.  We will create a Dialog and apply a translucent theme with no title bar, this provides a dialog that covers our activity but doesn't hide our notification bar.

private void showActivityOverlay() {
final Dialog dialog = new Dialog(this,
android.R.style.Theme_Translucent_NoTitleBar);

dialog.setContentView(R.layout.overlay_activity);

LinearLayout layout = (LinearLayout) dialog
.findViewById(R.id.llOverlay_activity);
layout.setBackgroundColor(Color.TRANSPARENT);
layout.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {
dialog.dismiss();

}

});

dialog.show();
}

We'll use a method like this whereever we want to display the overlay to our users.  When we get to the last overlay it is best to change the value in our SharedPreferences so we don't continue showing the overlays to the user.  We do that with this variation on our above method where in the onClick we update the SharePreferences to set our tutorial to false.

private void showActivityOverlay() {
final Dialog dialog = new Dialog(getActivity(), android.R.style.Theme_Translucent_NoTitleBar);

dialog.setContentView(R.layout.overlay_activity);

LinearLayout layout = (LinearLayout) dialog
.findViewById(R.id.llOverlay_activity);
layout.setBackgroundColor(Color.TRANSPARENT);
layout.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {
// Get SharedPrefs
PreferenceManager.setDefaultValues(getActivity(), R.xml.prefs, true);
SharedPreferences setNoti = PreferenceManager
.getDefaultSharedPreferences(getActivity());
setNoti.edit().putBoolean("tutorial", false).commit();
showTut = false;
dialog.dismiss();

}

});

dialog.show();

}

And there you have it!  As I mentioned at the begging of this post, this can be applied to an Activity or a Fragment.  You'll notice in the last method instead of using the context of "this" I'm using the context of "getActivity()", that is the only change you have to make for this to work with a Fragment.

I am publishing the full code on my GitHub.  Please feel free to leave comments, questions or your own pointers below.

https://github.com/marty331/overlaytutorial

Thanks for reading!

Sunday, July 28, 2013

I have the future sitting on my face!

So I picked up Glass on July 12th at the downtown office in San Francisco.  For my first impression I was a little underwhelmed.  Don't hang up!!  I think I felt underwhelmed because first off the doors were locked and I could barely get into the Google office (Don't they know who I am!), I ended up banging on the glass door with a quarter to get the attention of a couple of Glass guides that were in a deep conversation and didn't know that it was my time (For the record I was two hours early for my appointment), nonetheless I gained access and was shuttled to the elevator to Glass heaven.

I was checked in and told to decide on a color and let them know when I was ready.  I tried on every color, I believe I tried on red first, then blue, white, shale and finally charcoal.   I choose charcoal.  It was really the only choice.

So my Glass guide Josh brought out my unit and we found a seat.  I truly felt like it was Christmas morning, I had it.... it was in my hands. Finally.   The future was sitting in the box in front of me.  I unboxed it slow.  It deserved the respect.  Under the box lid, which was quite heavy, was this perfect was paper stretched tight.  Under the wax paper is where it sat.  I powered it on and placed it on my head.  A few adjustments were done and it was in place.



My Glass unit wasn't configured when I picked it up so my Glass guide and I spent a few minutes setting up my contacts and and choosing the Glassware I wanted to enable (I did not enable Elle or facebook).  The really cool thing about this part is I was able to use a Chromebook Pixel!  Next I paired it with my phone and out we went for the obligatory pic of the bay.  Josh went over a few of the essentials with me and then answered a couple of questions (I'd pre-studied so there wasn't much I didn't know already) and I was released into the wild.




I took off and since I wasn't 100% sure how to get back to the BART station and I had the future on my face, I looked up directions to the station.  Walking directions.  Why am I pointing out that they were walking directions, well the map moves with your head as you walk.  WOW!  I was amazed at this, the future is totally AWESOME!  Also, I suddenly felt terrified, I had a $1500 computer sitting on my face and suddenly felt like I was an easy target.  Looking back now I feel that was a ridiculous thought, no one has attempted to rob me yet and if they do I'll record them and beat the shit out of them at the same time.

I played with Glass for a bit back at my hotel but due to total exhaustion from not sleeping because of the excitement of getting Glass and my soon to be one year old daughter who was up a lot the night before teething I was exhausted.  Sleep.

4 AM Wake.  Uggh.  Off to the airport and heading home.  At the airport in public I wonder, are people looking at the thing on my face?  Hmmm.  Not yet, it's 5 AM and no one there seems to have had coffee, I know I hadn't.  Coffee, flight to Denver.  I change planes and notice a girl that was on my previous flight is in this gate also, and she's staring.  She got the courage to come ask me what this strange thing was on my face (yes I did have Glass on, wasn't just my face.). I explained what I knew so far and that I didn't work for Google.  Since then it's become a common occurrence for strangers to talk to me about Glass.  Everyone wants to know what Glass is like (It's awesome!) and they come right up and ask.... or point and I'll hear them say "That guy is wearing Glass!"

My family picked me up at Love Field when I got back from San Francisco, my son wanted to wear Glass immediately.  I made him wait till we were home to try them out.  He loved Glass!  He got it right away and could easily use the voice commands and take pictures.  He'll never know world without wearable technology.  He will grow up in the world of the Jetsons.



Glass is still a beta product, it's not ready for prime time..... yet.  It will be.  Soon.  Everyone had better get ready.  Glass will be huge!  Huge!  Apps are being written for Glass everyday.   That's the reason I have Glass.  I want to write some great apps for Glass and I'm extremely lucky to have the explorer edition (XE). 

Glass has some shortcomings, current version is XE7 (a new version is currently released each month, so improvements happen fast.) and it has a web browser but it is not really something that is enjoyable.  Also, you get what I call an email notification, a snippet of your email message and no way to view attachments including pictures.  You cannot view pictures on an MMS either.

Glass also does some things very well and has potential to do so many more things, mainly hands free with just your voice.  Glass is awesome at taking pictures and video while keeping the user involved in the current activity, it's great at delivering texts, email notifications and doing a fast Google search.  Glass is great at forcing the user to maintain eye contact with everyone they are speaking to add you are forced to keep the prism above your line of sight.  The hardest thing about learning to use Glass is learning to keep your head up when you're having a conversation with someone.



I love my Glass, I look forward to using it everyday and I am looking forward to seeing what it becomes.  It will be huge.  HUGE.

Tuesday, March 12, 2013

Setting up NAS with Auto Backups on the rPi

Alright here's the follow up to my last post, Share WiFi to Wired Connection with Ubuntu.

So I set up the rPi with rdesktop, gedit, ntfs-3g, Samba, Hamachi, Privoxy and rsync to build my NAS and VPN.  I have two external hard drives (2 TB and 500 GP) plugged in to a powered USB hub.  I also have the powered USB hub powering the rPi.  I'll reference the links I used as I go along, this wasn't hard to do.  

I'll say it right now, if I can figure it out, anyone can.

First off if you haven't put Rasbian on your rPi, go do it and then come back....you're back already?  Great, let's get started.

I don't like having to plug in a monitor, keyboard and mouse every time I want to access my rPi, so go ahead and do it the first time for the setup.  Now that you have your peripherals all set up, let's install rdesktop so we don't have to do this again.

Open the terminal and then:

sudo apt-get install rdesktop

then get the IP address and write it down:


ifconfig eth0

Great.  Now you can keep working on it as you have it set up or you can access it from another computer.  IF you're on linux, go to your terminal and enter:

rdesktop ipaddress from above -g 90%   (the -g 90% tells rdesktop to launch at 90% of the size of your screen.  If you want something larger or smaller, suit yourself.)  Sign in as your user id and password for your rPi.

Since I'm not a big nano fan, I like to use gedit, let's install it now:

sudo apt-get install gedit

Now I initially followed this guide to set up Samba, http://elinux.org/R-Pi_NAS.  We'll walk through the relevant parts.  Let's install Samba:

sudo apt-get install samba samba-common-bin

If you're prompted to continue then say yes.  Copy the the samba config file, in case we mess it up.

sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.old


On the link above we're told to use nano to update our config file, as I said, I don't like it.  The great thing about Linux is, if you don't like something, you don't have to use it.  So we won't use it...much.

Let's work on that config file:

sudo gedit /etc/samba/smb.conf

Search for security (ctrl + F and type security, then press enter) and you'll find the following:

#  security = user

Go ahead and remove the #, so we just have:

security = user

Now let's search for homes and change:

read only = yes
to
read only = no

Now save and close the file.  Run the following command to restart Samba:

sudo /etc/init.d/samba restart

You'll see the following:


Stopping Samba daemons: nmdb smdb
Starting Samba daemons: nmdb smdb

Samba comes configured with your user id defined, assuming it's pi we will now allow pi to be a Samba user.

sudo smbpasswd -a pi

You'll need to enter the password twice and then pi will be setup as the samba user id.  If you would like to add an additional user(not required), then do the following:

sudo useradd marty -m -G users
sudo smbpasswd marty

You'll be asked to enter the password for marty twice now.

Now let's make a shared folder to house our main storage (this will be for user pi, not for marty):

sudo mkdir /home/pi/shared

We also need to make a folder to house our backups:

sudo mkdir /home/pi/backup

Once more we need to edit the Samba configuration file, this time we are telling it about the shared folder we just created.  So let's go do that:

sudo gedit /etc/samba/smb.conf

Scroll down to the end of the file and add the following:

[public]
  comment = Public Storage
  path = /home/pi/shared
  valid users = @users
  force group = users
  create mask = 0660
  directory mask = 0771
  read only = no


Now save and close the file.  Run the following command to restart Samba:

sudo /etc/init.d/samba restart

You'll see the following:


Stopping Samba daemons: nmdb smdb
Starting Samba daemons: nmdb smdb



Now we are getting ready to start mapping our drives, so let's make sure we have support for NTFS-formatted disks.

sudo apt-get install ntfs-3g

Great, good job!

Let's go find our hard drives that we have mounted so we can get them setup to do their jobs.  Run the following command to determine where they are currently located in our file system:

sudo fdisk - l

You'll see something like this:
























Now let's look at the results:
/dev/mcblk0 - This is the SD Card that Rasbian is running on.
/dev/sda - This is the 2 TB hard drive that I am using for my main storage.
/dev/sdb - This is the 500 GB hard drive that I am going to use for backing up my family pictures and business documents.

Let's prepare to mount the harddrives by their UUID so they can be unplugged and plugged back in to the Raspberry Pi and will automatically mount to the correct file location.  (Thank to Colin for this suggestion.)

In terminal execute:
sudo blkid
You will see results similar to the below:

/dev/sda1: UUID="4369e650-ce1b-4ea5-8e24-809e275a0314" TYPE="ext4"
/dev/sda2: UUID="1Ugipa-CKBF-qUpA-xJtp-q49N-fb6q-0Gikql" TYPE="LVM2_member"

We will need to capture the values that are in quotes beside UUID="xxxx".

The next step is to mount the hard drives to the folders we created earlier.  Before we do this we need to make sure that they are not currently mounted.  We are going to do this the easy way, open the file explorer as root:

sudo pcmanfm

 and you will probably see the two hard drives mounted, simply client the unmount button beside each one. then close the file manager.  Now let's mount the hard drives to their permanent location:

sudo mount /dev/sda1 /home/pi/shared
sudo mount /dev/sdb1 /home/pi/backup

Great job, now we have access from our home folder to both of these drives.  But we need to make this happen automatically on boot, easy:

sudo gedit /etc/fstab

Now in the fstab file add the following two lines below the line that starts with /dev/mcblk0p2

Here is where we will use the UUID for each drive:

UUID=4369e650-ce1b-4ea5-8e24-809e275a0314        /home/pi/shared  auto noatime 0 0
UUID=1Ugipa-CKBF-qUpA-xJtp-q49N-fb6q-0Gikql /home/pi/backup auto noatime 0 0

Make sure you tab where you see the spaces above.  Now save and close the file.  We are set now, the drives will auto-mount to our home folders when we reboot.

Now it's time to get started with our backups, we need the software first:

sudo apt-get install rsync
(that was hard huh!)

Well we've reached the point where we have to use nano.  It's not that hard, but it's definitely different than using a text editor.  You will need to use your arrow keys to move up and down and then to save the file you'll need to press 'Ctrl + X' and then you'll be prompted to accept by pressing 'y'.  We are now going to configure our backups.  I used the guide found on How to Geek, as my inspiration for this, but I've modified a few things to work better for me.  I want to give them credit for the idea though.  If you read their article they instruct you to setup your backup to run nightly, however I thought that was  bit much, so I decided to educate myself and figure out how to modify this.  I found this link, which explains how crontab works.  Basically crontab takes this entry to determine when it will execute the command that follows:



# Minute   Hour      Day of Month            Month                    Day of Week        Command  
# (0-59)     (0-23)    (1-31)                   (1-12 or Jan-Dec)       (0-6 or Sun-Sat)              
    0              2          12                             *                                     0,6                      rsync



I wanted to have my backups running at alternating times and only a couple of times a week, so let's go ahead and configure that:

crontab -e

Now you are in nano, navigate down to the bottom of the list and enter the following:
0 2 * * 0,3 rsync -av --delete /home/pi/shares/Pictures /home/pi/backup
0 2 * * 1,5 rsync -av --delete /home/pi/shares/busdocs /home/pi/backup

Now save the file, 'Ctrl + X' and then confirm 'y'.  So let me explain what we just set up, I'll go through the first line:
0 - 0 minutes
2 - 2 hours (2 AM)
* - Any day of the month.
* - Any month.
0,3 - Run this on Sunday and Wenesday.  (0 - Sunday, 1 - Monday, 2 - Tuesday, etc)
rsync - Command to be ran.
-av - archive and verbose
- -delete - (MAKE sure there are TWO dashes - -, there should not be a space between these.)  This parameter tells rsync to delete any file on the to folder that is not on the from folder, so if you remove a file in your main storage it will be removed in you backup.
/home/pi/shares/Pictures - This is the from folder.
/home/pi/backup - This is the to folder.

This last step is optional but recommended.  Let's go ahead and run rsync for two reasons, to verify that it can successfully back up your data and to get the biggest backup done.

rsync -av --delete /home/pi/shares/Pictures /home/pi/backup/Pictures

Depending on how much data you are backing up, this could take a while.  When I first ran it I backed up around 40 GB of pictures and it took about 2 1/2 to 3 hours.  So go get some coffee and relax.

So your backup is set and ready to run!  You did it! And it wasn't even that hard!

There may be a better way to set this up, but this what worked for me, I hope you've enjoyed getting your rPi setup as a NAS with auto backups!



One final piece, setup Hamachi so you can access  your files remotely (yes you can already do it if you have SSH installed (which you should.))  Go to logmein.com and create a free account and set up your network.  You can install this on Linux, Mac and windoze.

sudo apt-get update

sudo apt-get install --fix-missing lsb lsb-core    (this will take a bit)


sudo dpkg -1 --force-architecture --force-depends logmein-hamachi_2.1.0.86-1_armel.deb
( the above line is dash dash force dash architecture and then dash dash force dash depends)


Now set up hamachi on the rPi:


sudo hamachi login
sudo hamachi attach [INSERT LOGMEIN.COM EMAIL HERE]
sudo hamachi set-nick [INSERT A NICKNAME FOR YOUR RASPBERRY PI]

Now back on your computer on logmein.com, go to your networks and grant the Pi permissions to join your network and write down the network ID (a 9-digit number) for that network.


Back on the rPi:
sudo hamachi do-join [THE NETWORK ID YOU WROTE DOWN]

Now start SSH so you can reach the rPi remotely:
sudo /etc/init.d/ssh start

You should test out the set up now by SSH'ing into the rPi at the virtual IP on the logmein.com site, it will be something like 25.xx.xx.xx:
ssh pi@25.xx.xx.xx

Now you can access your rPi remotely (outside of your network.)

You can also remote desktop into the pi at the new virtual IP address:
rdesktop 25.xx.xx.xx -g 70%


Here are the links that pulled knowledge from for all of this.:

http://www.howtogeek.com/139433/how-to-turn-a-raspberry-pi-into-a-low-power-network-storage-device/

http://linux.about.com/library/cmd/blcmdl1_rsync.htm

http://www.pantz.org/software/cron/croninfo.html

http://elinux.org/R-Pi_NAS

http://lifehacker.com/5978098/turn-a-raspberry-pi-into-a-personal-vpn-for-secure-browsing-anywhere-you-go

Monday, February 25, 2013

Share WiFi to Wired Connection with Ubuntu

So I bought my second Raspberry Pi and it was delivered last week.  I have barely been able to contain myself waiting to set it up.  However work is crazy right now and I worked till Midnight (started at 7 AM) two nights last week and it was son's 4th birthday and my wife and I are trying to get our home in order to list for sale.  So yeah, things are BUSY!  Anyway, back to the story...

I had to travel to Oklahoma City for work this week and I brought my new rPi with me and an SD Card.  I'm in the hotel after work and decide it's time to get to work on the new project, but I didn't have any peripherals.  I made a quick run to Wal-Mart, grabbed a $10 keyboard and a $5 HDMI cable and I was in business...sort of.

I wrote Rasbian to the SD card and connected the rPi to the hotel TV via the HDMI cable, used an Android charger for power, my wireless mouse and my new keyboard.  I booted up the rPi and installed Rasbian.  So far so good, but I really didn't want to quit there.  I knew there had to be a way to get internet to my new rPi.  I called the front desk and they told me it was 2013 and there are no wired connections in hotels anymore (my how times have changed.)

I started looking around the Ubuntu forums and came across a link that I thought had a good shot at giving me data, figured I had nothing to lose and gave it a shot.

It turned out to be a piece of cake!  So I had wireless on my laptop, connected to the hotel WiFi.  I had to go the Network > Edit Connections > Wired > Wired Connection1 - Edit > IPv4 Settings - change Method to: Shared to other computers.  Save.  Reboot the laptop....and BOOM!  Data for the rPi!



After I got data going to the rPi, I then set up Samba, Hamachi and Privoxy.  I'm planning on using this rPi as a server for my family's pictures and videos and also will be using it as a VPN server for secure browsing when I'm traveling.

I'll write another post on the final setup.  Till then, if you're stuck in a hotel with your rPi and need data, it's easy to get!

Wednesday, November 28, 2012

How to host your own website on a Raspberry Pi


How to host your own website on a Raspberry Pi

Requirements

Hardware:
Raspberry Pi
USB power cable
Ethernet cable and modem to connect to
HDMI cable (temporary need)
Monitor (temporary need)
USB mouse/keyboard (temporary need)
Standard SD card
SD card reader on your computer

Software:
Raspbian image - Debian based OS for Raspberry Pi
Lighttpd - lightweight webserver that is extremely easy to set up
PageKite - makes local websites or SSH servers publicly accessible in mere seconds, and works with any computer and any Internet connection.

Also you will need to buy a domain for your site.  I purchased mine through hover.com, but there are many to chose from.



First you need to setup the SD card on your Raspberry Pi.

The SD card is the harddrive for the Raspberry Pi, you'll be installing Raspbian which is a derivative of Debian.  If you are familar with Linux you'll be right at home.

Here is the guick start guide for Raspbian:
http://www.raspberrypi.org/quick-start-guide

Install the latest "Raspbian" SD card image from here:
http://www.raspberrypi.org/downloads

Just follow the instructions to download the image and install it on your SD card, once we actually boot the Raspberry Pi you will set it up.

Now, here is where you temporarily need to  have a monitor, keyboard, and mouse that you can use to run your Raspberry Pi.

If you don't have a monitor, mouse and keyboard, you can set up your Raspberry Pi in headless mode.  Here is a link to to this, although I did not utilize this method:
http://www.penguintutor.com/linux/raspberrypi-headless

Now plug in the ethernet from the Raspberry Pi to the modem, HDMI from the Raspberry Pi to the monitor, USB to your keyboard and mouse.  Plug in the SD card that you
installed Raspbian and last plug in the power.  Plugging in power is how you power on the Raspberry Pi.  Go through the on screen setup, be sure and change the password,
turn on SSH, set the date/time and any of ther other setup options that you think you'll need.  Complete the setup and pat yourself on the back, you are on  your way.

Next step, setup a static IP on your router so the Raspberry Pi always has a static IP in your home network.  Here is tutorial that I followed for this
step:  http://www.penguintutor.com/blog/viewblog.php?blog=6306

Once you complete this come back here to continue the setup.

Good job so far.  Let's use some of our Linux skills now(I'm a huge Linix fan, it's all I run on my PCs), don't worry, it won't hurt.

Open the terminal and run the following command:
sudo apt-get install lighttpd

Did you press enter at the end of that last row?  You should.
Now run the command:
sudo reboot

While your rebooting here is something to read:
lighttpd is a lightweight open source webserver.  It is pronounced "Lighty" and it will listen for requests on port 80, when it receives a request
it sends back the requested webpage.

Ok and we're back.  So you should be rebooted now so let's check to see if lighttpd is doing it's job.  Type in the IP that you assigned to your
Raspberry Pi, for instance 192.168.1.10, on your browser.  You can do it on your computer or on the Raspberry Pi's browser, it's called Midori.
You should get a webpage showing that lighttpd is working.  The file that is being displayed is sitting on the Raspberry Pi at /var/www/ and it's
named index.html.  This folder is where you will place your website.  You have created your website already right?  If not, you can do that once you
have completed this setup.  I used a starter page from http://www.styleshout.com/.

Ok you're doing great, we're getting near the end.

Next we are going to set up an account with PageKite.  PageKite charges $36/year for an account.  There are free options like Dyndns, but I have
Verizon fios and am forced to use their router, thus my Dyndns did not work well for me.  If you wan to use Dyndns, you can set up a free account
that should work for you.

PageKite is easy to install, just visit their page from the Raspberry Pi and setup an account and install the software.  You will be installing
the Linux version and the site walks you through all the steps.  Make sure your account id is NOT the same as the site you are setting up.  You will
use the site name also as a secondary pagekite.  Once you have your account set up with PageKite, you will need to follow this guide to setup
PageKite to point to your own doman:  https://pagekite.net/wiki/Howto/CnamePageKites/

For step 2 above, if you went with hover.com, you'll need to add a new DNS with the following format:
Hostname:  www  
Record Type:  CNAME
Target Host: sitename.accountid.pagekite.me

Complete the CnamePageKites setup and then you are done!  Your website is now live on the web!  See that really wasn't very hard to do.