Move

I’ve moved, and I thought I’d write a post about it. I say ‘write’, I mean I’ll write these few lines and upload a picture.
spacer

Read more

February 18th, 2012

Personal

No Comments

Tweet

Textmate Bundle for Zurb Foundation

Finally got round to getting some code out there this year! It’s a set of nice snippets for building Foundation based sites / prototypes fast.

You can download it at Github – https://github.com/liamr/Zurb-Foundation-Textmate-Bundle

Here’s a few examples of usage:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
//Layout/grid

//zfc (Tab) creates a container
<div class="container" id="name">
   
</div>

//zfr (Tab) creates a row
<div class="row" id="name">
   
</div>

//zfc1 - zfc12 creates a column / columns, ie zfc6(Tab):
<div class="six columns" id="name">
   
</div>

//Buttons

//zfbtn (Tab)
<a href="#" class="small blue button"></a>

//zfnbtn (Tab)
<a href="#" class="nice radius small blue button"></a>

If you can think of anything to add, gimme a shout.

Read more

January 17th, 2012

Development

No Comments

Tweet

Working away from desk

I’m writing this from a desk in Starbucks Byers Road, Glasgow. I work out and about quite a lot, and I actually find it helps me concentrate. As someone whose office is at home, getting out frequently I find helps productivity.

Here’s my current view.

spacer

Read more

October 22nd, 2011

Personal

No Comments

Tweet

Deploying your site with git

After spending a lot of my time making things harder for myself, I’ve finally started to look at things that might make development that little bit nicer. I’ve been working with Less for CSS work (which I’ll write about soon – It’s so good), various CSS/HTML frameworks / libs, and Git for deploying.

For those not familiar with Git, it is a fantastically solid and simple (but also incredibly powerful) version control system developed by Linus Torvalds. I’ll not go on about it anymore than that, but I’d suggest you look into it if you haven’t already.

Anyway, I thought I’d take us through how to really quickly deploy your site from one repository to another (this could be from localhost to server say).

First things first, this requires the remote server to have both SSH enabled and GIT installed. For me Dreamhost has both of these, so I’m good to start setting up!

1. Log in to your server with SSH – I use terminal on the Mac for this, so for me I type:

1
ssh username@server.com

This then asks for your pass, go on and type that and hit return.

2. Navigate to your directory – if you need to see a list of files, just type ls -l. You can now travel between folders using the cd (change dir) command & if you want to go back up a folder use cd ../

1
 cd myfolder

 

3. Now create a new git repository

1
git init

 

4. Set a few things up for git – Now, just need to set some config stuff and create your post-update hook git needs to deploy your site!

1
git config receive.denyCurrentBranch ignore

Now, here is where it looks tricky, but it’s ok – we’re just entering into the text editor VIM, using it to create a file, pasting in some code and saving.

1
vim .git/hooks/post-update

Ok, you’re in vim, now go here utsl.gen.nz/git/post-update - this is the post-update hook we need, now just copy and paste. You now need to save this, so press the escape key (this exits the direct editmode) and type

1
:wq!

This tells VIM to save and quit, if you think you made a mistake just type :quit! and it wont save. You can try the step again.

Now, just to give it permissions!

1
chmod +x .git/hooks/post-update

Right, if all went well you should be all set on your remote server!

 

5. Add a new remote repository to your local branch – as a dreamhost user I need to type this to get to my folder ‘username@becrux.dreamhost.com/home/username/mydomain.com/folder where ‘username’ is my username. You might need to play around to find your direct path.

1
git remote add production ssh://username@server.com/home/username/mydomain.com/folder

 

6. Right, now to start pushing!

1
git push production master

That is it! Assuming you got the paths right, you should have deployed your site!

 

7. Not finish just yet – because your .git folder contains all revisions and source code, you’ll want to protect that! Fortunately it’s easy; Open up or create an .htaccess file in the main root folder (do this in your local directory, then commit and push after your finished), and type:

 

order allow,deny deny from all

 

If your directory doesn’t support <Directory> you can manually add

1
order allow,deny deny from all

in your .git folder, but bare in mind you’ll lose this if you ever reclone.

There you go – you’ve just pushed your site from development to live in no time at all – not an ftp client in sight! spacer And remember any time you want to update your site, just git push! You can also create multiple remote repositories for staging etc, just follow the steps again but at 5 change the name, so:

1
 git remote add staging ssh://username@becrux.dreamhost.com/home/username/mydomain.com/folder

Easy as pie!

Read more

October 22nd, 2011

Development GIT

No Comments

Tweet

V2

Hello All.

This is the new site in all it’s responsive, HTML5, font-face’d goodness. It’s taken it’s time as well… But I have an excuse! Well not really – I guess that work and life got in the road as it does from time-to-time.

In fact last time I posted anything of use on this site I considered myself a die-hard Flash Dev – I ate PureMVC for breakfast, BitmapData for lunch and SwfAddress for dinner. Then the iPhone / iPad shitestorm happened and I got angry; ‘Why not flash player on my iPhone, why not flash intros on my iPad!’ …After being angry for about 15 minutes I decided to invest some time into looking at what it might be like working with other alternatives – ‘What about playing with JQuery and some of the CSS 3 stuff’ I thought? How bad could it be? Not at all was the answer: Javascript and in-turn jQuery was very like the syntax I was used to in AS3 (albeit not as strict) so moving onto building fairly complex AJAX apps wasn’t that hard. And there was a lot of tutorials and resources out there to help me on the way.

From there I got into a bit of Ruby on Rails, and the lightweight PHP framework CodeIgniter. And that’s where a lot of my workload is at the moment. I have the occasional Flash project, but mainly these days they’re just legacy jobs that require updating.

What effect does this have on this site I hear you say? Well, mainly that I’ll be writing about stuff I use now and not really much on Flash – I’ll keep the old stuff there as it seems to bring a fair chunk of traffic to the site every day though.

Now! I just need to figure out what I can write about!

Read more

October 21st, 2011

Development Personal

No Comments

Tweet

>
gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.