Monthly Archives: June 2013

Command Line Short Cuts

As suggested by my tutor, Ben Askins, here are some shortcuts for use in the command line:

Tab Completion: Press Tab to complete folder and file names

Control + a: Go to the beginning of the line

Control + e: Go the the end of the line

Option + b: Move back one word

Option + f: Move forward one word

Up/Down Arrow Keys: Repeats previous commands

Control + w: Delete last word typed

Control + u: Delete last line typed

Control + y: Paste last deleted item

Control + l: Clear the screen

Leave a reply

Love Hong Kong, But Missing My First GA Lessons

Hong Kong

 

I am currently travelling and working in Hong Kong and Shanghai – which I have been looking forward to all year, and am loving. BUT, unfortunately, this is also the week that my General Assembly course started (Back End Web Development).

So, I am missing the first two lessons, and originally I thought that this would be no big deal because maybe it would cover some very basic stuff, which I already knew – but of course the basic stuff they are covering is GitHub! My nemesis! I understand that GitHub is amazingly useful – but I can’t wrap my brain around it, and wished that I didn’t miss this lesson, of all lessons.

Our super helpful tutor has, however, provided us with lots of references to help us with it – so I am trying to combine work with study (not only this weeks lessons, plus homework, but the prep work too! Agghh! Already behind!) and also not spend all my time in these amazing cities indoors. This would all have gone a lot smoother had I not also just discovered The Walking Dead (yes, three years behind as usual).

Ok, so these are the extra things I have learned from the first weeks course in BEWD (Back End Web Development).

Command Line

My tutor recommended this tutorial for learning the basics of the Command Line.

I think this is great because it lists and explains all the main commands, and I’m sure I’ll use it many times in the future when I need to understand how to do something in Terminal. BUT I was hoping for some simpleton explanation of what they are talking about when they say “BASH” or “Shell”. Having said that, I know there are a million explanations online about that…

The writer also reinforced that you shouldn’t just get random advice from idiots on the internet, in case they are getting their fun by making strangers wreck their computers…I am so naive I never thought of that, but I assume StackOverflow would weed out those kind of things, so I will keep using it.

Git Cheat Sheet

Look at this awesome Git cheat sheet.

Even though it is a cheat sheet, they found space to put in some basic explanation, which I need:

Git is a free & open source, distributed version control system …GitHub is the best way to collaborate around your code. Fork, send pull requests
and manage all your public and private git repositories….Heroku is a cloud application platform that supports a number of different programming languages…

The rest of it is extremely useful, and if I had a desk with a wall, I’m sure I would print it out and put it up there. (Maybe I should get a desk, and a wall next to it…?)

(Actually, I just downloaded it, and then used my command line skills to move it into my learning folder. Tricky!)

Git Videos

Here the tutor recommended these introductory Videos for Git

I have a lot of trouble with getting my head around Git (and GitHub), and even though I have already written about this on my blog before,  it still doesn’t stick in my head.

These are great introductory videos to Git – explaining the concepts, and some easy command line keywords – but I still find the workflow confusing, and also the concept of where all this historical information is stored on my computer, and how I would access it. I need more lessons obviously.

Also, I wish that video had a transcript, because at some points I wanted to repeat, repeat, repeat to try and understand, and rewinding is just annoying.

Practising With Git

Finally, our tutor recommended Code Schools ‘Try Git’.

I like being able to actually try things, so I liked this tool. It also introduced me to a few new keywords which helped me better understand the point of git.

$ git status  which I hadn’t used before, and it is really useful to help you understand. I was using this after every operation!

$ git log – nowhere else had yet explained to me that I could use this to read the logged changes. This was an essential question I had – why am I recording all these changes if I can’t go and look at the history!

$git diff – to see the differences between versions.

$git reset – to remove things from the staging area.

Anyway –  obviously all these commands are in that excellent git cheat sheet – this tutorial just helps you have a go at using them.

The only thing I wish was different about this set of tutorials is I wish they had explained more about what the output of all these commands meant.

 

 

 

Leave a reply

Pushing to GitHub

GitHub

At Rails Girls Brisbane we created a little app and at the end of the day pushed it up to GitHub.

Because I am sure I will need to do this a lot (for example, right now, as I have just bought a new laptop and I want to get all my stuff off of this old one), I have decided to write down the notes I took from Rails Girls, to make sure I remember the process.

Ok, so

Pushing to GitHub

Step 1 – Navigate to the appropriate directory in your terminal, so that you will be pushing up the right files.

Step 2 – Make a new empty git repository by typing this into Terminal
$ git init .

Step 3 – Add all files
$ git add .

Step 4 – Check status of all those files
$ git status

Step 5 – Commit and Describe your changes
$ git commit -m"Write whatever message here to describe the changes you made"

Step 6 – Create new repository in GitHub
Go to Github, click on new repository, then copy the http URI

Step 7 -
$ git remote add origin https://whateverthaturlyoucopiedwas

Step 8 – Push up to GitHub
$ git push origin master

When making changes in the future, you can just go

$ git add .
$ git commit
$ git push

Leave a reply

Using the Clutterless WordPress Theme

UPDATE: Obviously I am no longer using the Clutterless WordPress theme, I have gone back to the simple TwentyTwelve. I agree that this theme is not as cool or beautiful as Clutterless, but I think it better serves my purpose as a technical coding blog.

Clutterless Blog Theme
Having been using a plain WordPress theme so far this year, I had been encouraged by my friend who runs the beautiful blog Fresh Squeaks to look at a more visually pleasing design.

I liked my friends blog design, but my blog is mostly comprised of longer text posts, so I wasn’t sure the same design was suitable for me. I needed a blog design which wouldn’t rely on lots of images.

Unfortunately, most of the more modern and original blog designs do rely on you to have beautiful photos or illustrations to post, but there was one theme I came across which seemed just right. I downloaded the free version of the clean, modern, Clutterless design, a beautiful blog theme that focusses on text content. The paid version is only $9 so I thought that if it works out for me, it would be very affordable to upgrade (hmm, Question: if you upgrade, do you lose any hacks you made on it so far?).

Although I didn’t want a ‘traditional’ blog look, I did want a lot of normal blog functionality, and navigation is very important to me. So in my sidebar I have used the normal ‘categories’ menu (which I think I need to clean up) as well as links to my static pages (About and Resources), and also Twitter and LinkedIn.

I had a few initial problems with the theme which had me reconsidering it, but after trying again to find a beautiful text-suitable design,  I couldn’t find anything nicer than Clutterless, and decided to stick with it and try and hack away my concerns.

Firstly, I was surprised that the theme I downloaded would not allow me to click on the blog post headings (maybe I did something wrong when uploading?). Completely strange – but I just went into the theme templates to find where the headings were, and changed the php to make them clickable.

The second problem I found was that the URLs were a bit crazy – for example if you tried to navigate to a blog post, instead of going to

http://www.tracecode.com.au/blog/forking-and-cloning-on-github/

It would go to

http://www.tracecode.com.au/blog/#/blog/forking-and-cloning-on-github/

This is probably because Clutterless was designed as a one page theme. There were a couple of problems with having the URLs doing this.

1. That the URLs would be harder for people to copy and paste. Well, not really harder, but weird looking, and I didn’t like it.

2. That it might not be as good for search engines (I mean, it probably would be ok, but just not ideal)

3. In my Analytics it wouldn’t show the actual posts people were looking at, since the root URL would stay the same no matter where a visitor navigated.

To fix this problem we looked at the source of the page to see what JavaScript files were being executed. There were 5, and without a whole lot of JavaScript knowledge, it seemed a good idea to just go and change the name of those files one by one, (rather than remove them, just in case), and see when the problem was fixed. Luckily for us it was the first one – Ajax.js! We just went in and changed the name of it, and the problem stopped straight away.

Yes, this is just a hack – but that’s all I need at the moment. So if you have this problem – you can try that solution too!

Other issues I have with the theme right now, but which I am sure I can change when I have time;

  • Will people be savvy enough to click on that little blue tab on the left? I can’t easily change it to say something like ‘Pull Me’ because currently it just takes the name of the blog – but I’m sure this can be changed in the templates
  • This is a H1

    This is a H2

    This isn’t exactly how H tags usually go

  • I would quite like for the body of this text to be a bit wider
  • I have seen in some of my older posts that some of the text is randomly given a slightly different style
  • Although I have chosen in my reading settings to show only a summary, it seems to be showing the whole post in the home page feed. I prefer to make it easier for people to browse by having only summaries – so I will need to investigate this.
  • It doesn’t by default allow comments (it is a ‘clean’ design after all), so I am going to have to go and do something with Disqus or something.

Having said all that, I still love, love, love this blog theme, and will keep playing around with it.

4 Replies