Delete already-Merged Branches on integration or master

Posted on December 19th, 2013 by thiswayup.
Categories: Development.

I always spend a few minutes on google how to do this so I thought I keep a reminder here. To delete local branches which have already been merged into master:

git branch --merged master | grep -v "\* master" | xargs -n 1 git branch -d

Thanks to



Getting my own status updates via Facebook graph api

Posted on December 12th, 2013 by thiswayup.
Categories: Development.

To get your own facebook status updates this is the graph query:



Fastest way to run a web server for development

Posted on November 30th, 2013 by thiswayup.
Categories: Web.

To future forgetful self, this is the fastest way to run a web server. To anyone else, you just need to navigate to the directory and run the command below.

python -m SimpleHTTPServer



Be the next EMI, Sony BMG, Warner record label of the world – Invest and trade bands

Posted on September 17th, 2013 by thiswayup.
Categories: Geek Culture.

- Heard from Guardian tech weekly podcast
- New start up
- Buy and sell equity in bands
- Trade exchange


JavaScript things to remember #0

Posted on August 26th, 2013 by thiswayup.
Categories: JavaScript.

Amongst my interests at the moment is JavaScript and as I've got the worse memories in the world, I've decided to embark on doing a series of JavaScript related posts for my future self. I find committing stuff like this to paper writing helps the old synapses fire :)

It took 10 days to write JavaScript

For the first piece thing to remember is as a piece of trivia. Brenden Eich wrote the first js in 10 days in May 1995. I think it's probably important to remember as everytime I curse about js I remind myself about this fact. I also remind myself it's not the language, it's how you use it.

"arguments" parameter

WIthin every function is a arguements, try it!

function test() {
    var args = arguments;
    for (var i=0; i < args.length; i++) {

test("a", "b", "c");

Note also that "arguments" is an object and not an array. Array.slice it to break it down to an array.


Missing path to get Titanium Alloy Template working in Studio

Posted on June 24th, 2013 by thiswayup.
Categories: Mobile Dev.

After having lots of issues on Titanium Studio and getting the Alloy templates showing up, I finally found the reason for it now showing. It was down the npm install path folder (which Studio uses to figure out if Alloy is installed) was missing.

The following command fixed it:

export PATH=$PATH:/usr/local/share/npm/bin

Hope this helps someone


Debugger keyword in Appcelerator Titanium

Posted on June 17th, 2012 by thiswayup.
Categories: Mobile Dev.

I've been using Appcelerator Titanium for the past year to play around building Iphone apps, whats good about it also builds to Android.

I've just realised you can use the "debugger" keyword in code to set a breakpoint. This is different from just adding a breakpoint via choosing a specific line to set a breakpoint, since as soon as you add/remove any code before that line, it then stops that break point working,


how to change host and apache conf files for MAMP

Posted on May 27th, 2012 by thiswayup.
Categories: Development.

I use MAMP for my OSX dev, the regular edition doesn't include the easy way to add to the host file (so that you can have a dev domain eg and virtualhost to the apache.conf, you need to do it manually. But luckily it is very easy, this is for my future self to save finding it on google.

Adding to the host file

sudo cp /etc/hosts /etc/hosts.bak

sudo nano /private/etc/hosts

Add virtualhost

location: Applications/MAMP/conf/apache/httpd.conf

Add a virtual host

example entry:


 ServerName hib.local

 DocumentRoot "/Users/joelee/Sites/hub.local/web"

 DirectoryIndex index.php



Quake like drop down terminal for Mac OSX

Posted on March 28th, 2012 by thiswayup.
Categories: Development.

SInce I started using Mint Linux, I have been steadily getting more drawn to the command line and love using Guake to quickly access it. It draws its inspiration from the game Quake, where the terminal drops down from the top of the screen. Through Guake, I can create multiple terminal windows and access it via a shortcut that drop them all down from the top of the screen and allow for multiple windows.

I've been looking around for something similar and found Totalterminal from Visor. Does pretty much the same thing, thoroughly recommended!

They also do a fantastic Finder replacement (allows for tabs and "cut n paste, for example) called Totalfinder


Good web page capture plugin for chrome

Posted on February 11th, 2012 by thiswayup.
Categories: Technology.

I've decided to recently try capture sites as reference for ideas for future projects. Being lazy I wanted a way to easily capture a whole page and maybe add notes to it in a quick manner in a central place. In the end I decided to use a chrome plugin and my fave note taking app Evernote. 

I was very tempted to use the Evernote clipper but it's very focused on grabbing just the text and larger images, missing out a few of the smaller elements. which causes the page to break from the original layout, 

The Chrome plugin I use is called Screen Capture (by Google) which essentially allows you to go to a page and capture it in a few ways, by region of a page, visible area or the whole area. Once captured you can augment/edit your capture it. Some of my favourite features include being able to highlight sections and add text on top in various colours. You can save the pic and then just add it to which ever notebook.

Hope this help all site layout/design hoarders around the world!