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

Wednesday, 15 January 2014

Drone

Disabling the default Parrot AR.Drone altitude height setting:

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:

  • 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:

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. 

I noticed this while stripping screws trying to repair our television.

Tuesday, 17 December 2013

Un-tab in VIM


Control D to untab, Control T to tab


Other keywords: shift tab

source: http://stackoverflow.com/questions/2874415/what-is-the-un-tab-sequence-in-gvim

Thursday, 28 November 2013

Accessing webcam via MATLAB

imaqhwinfo
"Image Acquisition Hardware Info" tells you what cameras you have available.

vid = videoinput('macvideo', 1, 'YCbCr422_1280x720')
Specify the video channel and the output format.

preview(vid)
Display the video stream.

Sunday, 24 November 2013

Version Control On Google Drive

To upload a new version of an existing file:

Right click on the file name
Select Manage Revisions … from the menu
Click on Upload New Revision

source: http://cumulusglobal.com/cms/tuesday-take-away-version-control-with-google-drive

Sunday, 10 November 2013

Restrictions on Double Indexing in MATLAB

You can follow {} referencing by () referencing, {}(), but you cannot use ()() or (){} or ().{} or ().(), and you cannot use function(){} or function()() or function().field

source: http://www.mathworks.com/matlabcentral/answers/25890

Friday, 8 November 2013

Adding code blocks to blogger


To put a “code” block in any of your blogger blog posts, you have to first modify your template a bit.
1. Login to your blogger account
2. Go to Layout > Edit HTML
3. Find ]]></b:skin>
and just ABOVE it, add this line of code:
code {background:#EEEEEE; font-family: Trebuchet MS; display:block; border:1px solid #999999; padding:10px;}


source: http://atoz2u.blogspot.com/2011/03/how-to-add-code-and-blockquote-blocks.html

Screen Capture in OSX

Launch Terminal and use the following syntax:
defaults write com.apple.screencapture location /path/
For example, if I want to have the screenshots appear in my Pictures folder, I would use:
defaults write com.apple.screencapture location ~/Pictures/
To have the changes take effect, you then must type and restart.
killall SystemUIServer


source: http://osxdaily.com/2011/01/26/change-the-screenshot-save-file-location-in-mac-os-x/

Wednesday, 6 November 2013

Assigning Default Applications to a File Type on OSX

For Mac OSX 10.6:

1. Open a New Finder Window and browse to a file of the type you'd like to change the extension. 

2. Click on the file. Go to File in the top left and select "Get Info".

3. Go to "Open With" and expand that section.

4. Click on the drop down and select the program you'd like this file type to be associated to. 

5. Click on the "Change All" button and "Continue"

source: http://www.mathworks.com/support/solutions/en/data/1-18ELZ/index.html

Default Types in MATLAB

Changing the default format of types in MATLAB [to long]:
'format long'

To return to doubles:
'format'

Tuesday, 5 November 2013

Diet



11/5/13

  • Putting Butter in Coffee
    • MCT oil, a common supplement that claims to be all-naturally from compressed oils of palms and coconut. Just like butter, it touts itself as being fuel that helps energize your body and jumpstart your metabolism. 
  • Paleo Diet
    • Based on foods are ancestors would have thrived on.

References:
http://thepaleodiet.com/
www.reddit.com/r/nutrition/

Changing the Default Style in Google Docs


11/5/13
After making changes to the style in your google doc, click on the drop down menu that specifies the font type (typically this has the default field 'Normal text'). Under the Options gear, you will be able to select "save as my default style".

Source: http://www.googlegooru.com/change-the-default-font-in-google-docs/

Adding Virtual Desktops in OSX

Hit F3. Hover to the left/right of where you see the other desktops and you will be given the option to add another desktop.

Source: http://www.macworld.com/article/1165649/how_to_add_additional_desktop_spaces.html

Multiple Plots in One Scope in Simulink

Open the scope.

Open Scope Properties.

Change number of axes (allows multiple input ports).

Rerun simulation.

Suppressing Warnings in MATLAB

warning on verbose

Displays the command that can be used to turn the warning off.


Source: http://www.mathworks.com/support/solutions/en/data/1-QESD6/

Tuesday, 22 October 2013

Image Processing: Why You Should Normalize Your Images


1. Normalizing Homographies
A homography represents a transformation between coordinates. But the actual values that go into this homography can be arbitrarily large and small. The reason to normalize here is to more accurately represent large numbers or numbers close to 0, due to computer system limitations on floats and propagation of precision errors.


2. Normalize Images
Normalizing images from their byte representations to a value between 0 and 1 is for convenience, in order to get a better estimate of the pixel intensity. We have better intuition towards a value that can be represented as a percentage (0 to 1) vs. a pixel value (0 to 255).


Source: Karanhaar

Monday, 21 October 2013

Writing: Understanding the Importance of Thesis Statements

The thesis statement is important - when readers don't have much time, they'll only read the first line of a paragraph, or even the paper, before deciding whether the rest of it is worth their time (harsh but true reality, you probably do it too). So lead with something strong. At the same time, the second most important location is the end of the paragraph. So end strong as well.

During my fellowship essay review, I kept getting asked "what is the most important part of this paragraph?" and laughed to myself as each time it was embedded somewhere within the paragraph. Julia would tell me to listen as she read the paragraph and tell me to stop her when I got to my main point. Embarassingly enough, it was never at the beginning. If teachers back in middle/high school revised my essay like this, I think it would have been better ingrained in my head how to structure my essays. Although maybe embarrassment isn't the best strategy.

Depends on the audience of course, for something like this, an anecdote, I don't need to pay attention to such rules.


Source: Dr. Julia Deems

Sunday, 20 October 2013

Programming: Debugging Tips


  • Visualize concepts when possible. 
    • Helps to understand where the information is going and what is happening
  • Modular code to easily understand the separate parts. 
    • Break things into smaller functions, assign a single task to each function.
  • Clear variable names, especially loop variables. 
    • Example: Instead of i,j for a matrix, use iRow, jCol
    • Now you at least have some sort of idea what each loop variable is.
  • Unit Testing
    • Modular code allows you to test each code component separately in order to ensure that the behavior of each function is what you expect.

For more tips like these, see 'Clean Code'. 
http://it-ebooks.info/book/1441/

Book recommendation and discussion via Karanhaar.

Wednesday, 20 April 2011

Applications of Operational Amplifiers


Name: Applications of Operational Amplifiers
Status: complete
Affiliation: 18-220 Electronic Devices and Analog Circuits Lab 6
Group members: Frank
Start: 3/17/2011
End: 3/17/2011

Description:
In this lab we used multiple op amps to perform some sort of useful function.

Peak Detector
This circuit's purpose is to indicate when an input's amplitude exceeds a certain threshold.

Analog to Digital Converter
ADCs are commonly used to convert analog signals to digital signals. Examples include storage, signal processing, and display. We built a flash ADC.





Feeding different input signals into the ADC.


Ramp Generator (Oscillator)
Ramp generators are used to generate a periodic, linearly increasing signal.

Friday, 11 March 2011

Mixing Music 2

This time with GarageBand:



I've also begun playing around with PureData but it's not quite what I expected for signal processing. More on that as it develops...

In terms of inspiration, I really like what Shinsadong Tiger has made, especially for Prepix. I can't seem to find much of his stuff floating around on youtube since it's always intertwined with Beast videos, but here's my favorite: