Tuesday, 4 October 2016
Friday, 8 November 2013
Oracle VM VirtualBox Manager
Today I 'ave mainly been thinking about VirtualBox.
For several years I have felt it would be useful to have a basic linux box so that I could be in a more standard "work" type environment. OS X is fine but some things are just different.
I had been advised that VirtualBox was an option to load a linux OS onto my Mac and run it in parallel with OS X in its own window.
So I downloaded version 4.2.18 and was pleasantly surprised how easy it was to install from a downloaded iso image.
I started with Centos because I was using this at work. However this turned out to be very disappointing. The installation went fine but it always hung up while downloading upgrades. This was annoying because I had several attempts that all ended in failure.
Anyway not put off too much I downloaded ubuntu. This installed fine and managed to upgrade its self but ultimately this was also very disappointing as it ran dog slow (no offence to dogs intended). I think it was the fancy graphics. This was so bad that I gave up for a few weeks.
After chatting to a couple of mates I decided to have one last try with xubuntu. I picked the latest LTS version 12.04.3. And yippee it worked. It installed quickly, it updated quickly, I installed guest additions for virtual box from the package manager, it came with python 2.7.3. I have started working on it it does not seem to slow my mac down and it runs fast enough. I like the user interface. I even loaded my own copy of sublime text 2!
Result!
For several years I have felt it would be useful to have a basic linux box so that I could be in a more standard "work" type environment. OS X is fine but some things are just different.
I had been advised that VirtualBox was an option to load a linux OS onto my Mac and run it in parallel with OS X in its own window.
So I downloaded version 4.2.18 and was pleasantly surprised how easy it was to install from a downloaded iso image.
I started with Centos because I was using this at work. However this turned out to be very disappointing. The installation went fine but it always hung up while downloading upgrades. This was annoying because I had several attempts that all ended in failure.
Anyway not put off too much I downloaded ubuntu. This installed fine and managed to upgrade its self but ultimately this was also very disappointing as it ran dog slow (no offence to dogs intended). I think it was the fancy graphics. This was so bad that I gave up for a few weeks.
After chatting to a couple of mates I decided to have one last try with xubuntu. I picked the latest LTS version 12.04.3. And yippee it worked. It installed quickly, it updated quickly, I installed guest additions for virtual box from the package manager, it came with python 2.7.3. I have started working on it it does not seem to slow my mac down and it runs fast enough. I like the user interface. I even loaded my own copy of sublime text 2!
Result!
Saturday, 5 January 2013
Javascript - Memory Jogger
Today I 'ave manly been thinking that I need a page if Javascript facts. So I will put it here and see how I get on. I expect it will be a translation of Python to Javascript. (I am considering CoffeScript but more on that later.)
My Rules:
Python has local variables with no declaration but globals need marking as global. This is good because you do not have many global variables ... do you! Of course you have lots of local variable and they all need a var declaration. Hey ho I can get used to this.
I will always use braces even when I don't need them.
- I HATE curly brackets and the option to have them or not. Thats what Python has done for me. I LOVE indentation! Bad Javascript/C/C++ etc.
- string to int:
- int to string:
- dictionary OMG I cant believe the code to sort:
for i in sorted(dict):
is:
var keys = Object.keys(dict);
keys.sort();
for (var i=0; i<keys.length; i++) {
var key = keys[i];
var value = dict[key];
// do something with key and value here...
}
Python has local variables with no declaration but globals need marking as global. This is good because you do not have many global variables ... do you! Of course you have lots of local variable and they all need a var declaration. Hey ho I can get used to this.
I will always use braces even when I don't need them.
Wednesday, 28 November 2012
Cherry Py Anyone?
More to follow on this one too...
Since I posted this back in 2012 I have written several webservers using CherryPy. It is great for simple webpages. I did give up on it for 1 project when I needed a good db api when I chose my old favourite Django.
I also use markup.py to generate all my html with no template. Recently I have learnt to do Ajax using JSON to communicate between page and server this should improve some of my webpages.
Since I posted this back in 2012 I have written several webservers using CherryPy. It is great for simple webpages. I did give up on it for 1 project when I needed a good db api when I chose my old favourite Django.
I also use markup.py to generate all my html with no template. Recently I have learnt to do Ajax using JSON to communicate between page and server this should improve some of my webpages.
Trigger IO
More to follow....
This topic never got off the ground as our client got bored before we had chance to get in gear. Hey ho.
Probably worth checking it out though if you are into mobile apps with some native integration and html5.
This topic never got off the ground as our client got bored before we had chance to get in gear. Hey ho.
Probably worth checking it out though if you are into mobile apps with some native integration and html5.
This Editor is Sublime
Today I 'ave mainly been thinking myself lucky to have finaly found an editor that is fun to use (as opposed to just functional).
This web post is a placeholder for me to rant about how great it is..
Sublime Text 2 is the name .. watch out for more on this one!
Go here to look
I wondered how to edit hidden files on OS X (not visible in finder open).
To read hidden files I added the sublime editor to my path:
sudo ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl
Then I can type
subl -a .hgignore (this adds the file .hgignore to the open editor)
This web post is a placeholder for me to rant about how great it is..
Sublime Text 2 is the name .. watch out for more on this one!
Go here to look
I wondered how to edit hidden files on OS X (not visible in finder open).
To read hidden files I added the sublime editor to my path:
sudo ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl
Then I can type
subl -a .hgignore (this adds the file .hgignore to the open editor)
Saturday, 27 October 2012
HTML5 + CSS3 + Javascript + jQuery + Raphael
Today I'ave mainly been wondering why no-one has said to me Javascript is great...
I have never had the inclination to write any Javascript before but recently I have been interested in a project to produce some simple software for mobile phones. Here the key requirement was "use the same code for iPhone and Andriod". The solution chosen was Cordova (Phonegap).
With Corova you write a webb app in HTLM5+CSS+Javascript and make calls to Cordova to get the mobile device to respond.
Well.. after a bit of looking around I discovered jQuery was cool with Javascript and was soon looking at HTML5 canvas and SVG as a way of doing graphics. I soon realised that SVG is cool and a great way to get dynamic web content and went looking a for a Javascript library to access it. Raphael lib seem to be the answer and I have used it to re-write a simple darts program which I had spent several weeks writing in Objective C.
Javascript is great because it has several similarities with my favorite language Python.
It has built in lists and dictionaries and has an attempt at a nice object model.
I have not yet used the object model but I will.
The only thingI have missed so far is default function paramater values.
I have never had the inclination to write any Javascript before but recently I have been interested in a project to produce some simple software for mobile phones. Here the key requirement was "use the same code for iPhone and Andriod". The solution chosen was Cordova (Phonegap).
With Corova you write a webb app in HTLM5+CSS+Javascript and make calls to Cordova to get the mobile device to respond.
Well.. after a bit of looking around I discovered jQuery was cool with Javascript and was soon looking at HTML5 canvas and SVG as a way of doing graphics. I soon realised that SVG is cool and a great way to get dynamic web content and went looking a for a Javascript library to access it. Raphael lib seem to be the answer and I have used it to re-write a simple darts program which I had spent several weeks writing in Objective C.
Javascript is great because it has several similarities with my favorite language Python.
It has built in lists and dictionaries and has an attempt at a nice object model.
I have not yet used the object model but I will.
The only thingI have missed so far is default function paramater values.
Subscribe to:
Posts (Atom)