source: http://radar.oreilly.com/2011/07/what-is-node.html
Monday, 20 January 2014
What is Node.js?
Node.js is a server-side javascript interpreter that is useful for receiving and responding to http requests. Node itself isn't javascript, but the code that it handles is javascript. Node is actually a c program, and uses javascript as a way to send instructions to the c program and drastically simplify the server networking code required in c.
Sunday, 19 January 2014
Python: input() vs raw_input()
raw_input() reads everything as a string and you have to process it yourself.
input() functions as eval(raw_input()) which can lead to vulnerabilities in injection code.
Blocking websites on Android phones
Goal: Want to stop lying in bed reading facebook and 9gag so that I will get out of bed sooner in the morning.
Solution: I used an app called safebrowser which allows you to black/whitelist specific websites. I also hid the default internet browser so that I wouldn't be tempted to bypass the safe browser.
https://play.google.com/store/apps/details?id=com.cloudacl
Thursday, 16 January 2014
Mac: Finder <-> Terminal
Terminal -> Finder:
open .
source: http://alvinalexander.com/blog/post/mac-os-x/open-finder-window-in-current-directory-off-terminal-window
Finder -> Terminal:
More complicated. Have to enable settings in System Preferences.
source: http://stackoverflow.com/questions/420456/open-terminal-here-in-mac-os-finder
open .
source: http://alvinalexander.com/blog/post/mac-os-x/open-finder-window-in-current-directory-off-terminal-window
Finder -> Terminal:
More complicated. Have to enable settings in System Preferences.
source: http://stackoverflow.com/questions/420456/open-terminal-here-in-mac-os-finder
Wednesday, 15 January 2014
Drone
Disabling the default Parrot AR.Drone altitude height setting:
http://forum.parrot.com/ardrone/en/viewtopic.php?id=3712
http://forum.parrot.com/ardrone/en/viewtopic.php?id=3712
Saturday, 11 January 2014
Giving up competitive Dominion
Dominion is a multi-player card game with a large library of possibilities and interesting techniques/combinations.
I am giving up competitive dominion because there is too much randomness at the beginning of the game pending your initial hand and I decided that I prefer a game with less initial randomness.
On the goko servers I achieved ~8k ranking amongst casual players with ~2000 elo.
Head-to-head competitive activities I am currently still interested in:
I am giving up competitive dominion because there is too much randomness at the beginning of the game pending your initial hand and I decided that I prefer a game with less initial randomness.
On the goko servers I achieved ~8k ranking amongst casual players with ~2000 elo.
Head-to-head competitive activities I am currently still interested in:
- programming
- chess
- SSBM
- league of legends
- fencing
Recording videos on AR.Drone
When using the built-in record function, you have to end recording BEFORE you land, otherwise the video DOES NOT SAVE.
First flight video below:
First flight video below:
Sunday, 5 January 2014
Saving Mac External Monitor Configurations
In OSX 10.8.3, I encountered an issue with external monitors where unplugging and restablishing the external monitor would cause the position to reset, which was annoying for every time I reconnected my laptop. A fix that seems to work properly is below:
Got a Mac Pro 2008 model with 2 x 5770 cards (Apple Ones) running 10.8.4 and 6 screens. Had this problem since I bought this unit about 8 months ago and been running latest release all through this period. Screen would lose settings after power off but also just on reboot. Complete PRAM zap, replaced CR2032 battery inside (just in case) worked through all discussed fixes. So reading the thread tonight it appears that our Admin users don't have the rights to change the setting perminantly. So.... I setup the root user account and then logged in, usual problem with screens all over the place. Reset them and then rebooted. All fixed! Have done this a few times now so not just a fluke. Will have to do a cold start and leave the unit off for a couple of days. Have a go and let me know if you also get the same results. Very interested as I was thinking it was my old hardware and it was going to get skipped and replaced with a 2010 12 core but I'm glad I haven't now as I would still have this issue!Here is the link to setting up root. Usual caveats apply. With great power comes great responsibility Take care!
Source: https://discussions.apple.com/thread/4157760?start=75&tstart=0
Friday, 3 January 2014
Quick check to avoid stripping screws
For a given screw, many screwdriver sizes available smaller than the hole will still work on the screw. However, the smaller sizes will wear away at the material. A way to avoid this mistake is to start at the larger spectrum of screwdrivers available and work your way down to a size that is appropriate.
Subscribe to:
Posts (Atom)