Friday, April 3, 2015

Rename File Extensions in Bash

A while ago I have posted an article on how to Rename File Extensions with OS X Automator. Since then I have been using Bash scripting a lot more and since running a one liner is sometimes a lot faster than messing about with apps I have produced this little gem...

$ for old in ./*.m4a; do new=$(echo $old | sed -e 's/m4a$/m4b/'); mv -v "$old" "$new"; done

It renames m4a files to m4b, that's all :)

Friday, February 20, 2015

How to Cool an Apple AirPort Time Capsule

Apple's AirPort Time Capsule is a truly wonderful device. If all works as intended it is a connect-configure-forget kind of device. The frustrating thing is that the long term reliability of older models is not great due to heat dispensing. Two of my previous Time Capsules died on me due to this problem.

The first "death by heath" was covered by Apple warranty, the second was not. I have therefore picked up a new power supply from eBay and replaced it manually. The Time Capsule was resurrected but it kept overheating and it was just a matter of time before it was going to give up again. Someone actually made a business out of fixing Time Capsules :) A wonderful wealth of info can be found on this site: http://www.fackrell.me.uk/

I almost gave up on Time Capsules but I could not find an alternative that I liked apart from the new model so I looked into a way to better cool it. There are many way to do this, but all required me to drill, cut and solder.

Being the creative (read lazy and with a limited tool set) person I am, I found this USB LED Cooling Pad on eBay for next to nothing! :)

The cooling pad is perfect. It looks great and delivers exactly what the doctor prescribed, a steady flow of air to keep the Time Capsule alive. Here it how it looks like action now.



The fan is not completely silent, but it is not loud enough to be a nuance. It cools the Time Capsule really well. The bottom of the Time Capsule used to be very hot and that's even after removing the plastic bottom cover from it and adding little rubber legs to keep a gap for heat dispersing. The nice thing is that the fan is USB covered and can be plugged into the back of the Time Capsule.

I have been using the USB at the back of the Time Capsule to power Google Chromecast and since I have run out of all available power outlets in the area and wanted to avoid running more extension cords, I have picked up this Cute USB Mini 2-Port USB 2.0 Hub Splitter. It is reliable and fits perfectly.


I hope this post will help someone time and money! :)

Wednesday, February 18, 2015

A Beautiful Stand Up Desk

I have been experimenting with stand-up desks for a while, but most were just simple stand up desk laptop risers built out anything I could find.

For example I have "borrowed" a piano chair.

This sort of technique can transform almost any desk into a reasonably good stand up desk as long as the piano chair owner does not complain too much ;)

This worked for me for quite a while, but lately I have been experiencing discomfort as looking down onto the small laptop screen for extended periods of time is no fun. I have looked at many alternatives, some of which were:
None quite resonated with me. I wanted:
  • reasonably cheap solution
  • easily being able to switch from standing to sitting and vice versa
  • accommodate an external screen
What I came up with is a neat solution that can work with almost any desk and is reasonably affordable. Here is the desk in the sitting down position.


Moving the desk into a standing position takes only about 30 seconds.



Being in a small San Francisco apartment every inch counts :) Here is a list of components used to build this beauty:
The keyboard and mouse desk raiser were simply built with 1x EKBY HEMNES shelf and 4x SULTAN legs. Since these legs were a bit wiggly I used electric tape to get a tight fit around the diameter of the inside leg. This is not necessary, but it will make the raiser table more sturdy.

Note that the LCD Arm can be attached to the desk by drilling, that's what I did, or by mounting it on the edge of a desk. The page below from the manual shows these two options. Be careful when drilling, measuring twice and drilling once is highly advised! I ended up drilling 3 holes and than having to use wooden pegs to fill the other two holes to keep the integrity of the table :)



The other shelf was used to extend the table by placing it on top of the drawer. I have added little metal washers on each side of the shelf to stop if from sliding off the drawer.





 Other tips:
  • if you get a wired mouse get one with a very long cord, I use Mad Catz R.A.T. 7;
  • same for the headset, long cord is important; I use Sennheiser PC141;
  • when standing up, having the keyboard and touch pad flat helps a lot; Apple keyboard and touch pad hang over the edge nicely. 





Monday, February 2, 2015

Google Calendaring

Select calendars to sync to iPhone/iPad/iCal*


Often I find myself wanting to add or remove calendars from my iPhone. Google does a great job allowing you to pick and choose which calendar you want synced to your phone but I keep spending far too much time on looking for the right page to do it on.

https://www.google.com/calendar/syncselect

Since I am on the subject here are couple of tips...

Add Facebook Evens to Google calendar. 

Go to your profile > Home > Events and on the right hand side look for:



Hoover over the Upcoming Events or Birthdays links, you will see a link 

"webcal://www.facebook.com/ical/u.php?uid=..."

Copy the link and add it to your Google Calendar 



Happy Calendaring... :)

Saturday, January 24, 2015

Swapping Keys with AutoHotkey

I have recently purchased a really cool keyboard, the Rapoo KX mechanical keyboard. This keyboard is amazing:

  • it is wireless and wired
  • 5GHz wireless connection
  • it has a backlight
  • compact
  • it is mechanical!
  • looks great :)

...but has one fundamental flaw, the Shift key is very inconveniently located on the right side of the the arrow up key.


To make this keyboard "usable" I have used the AutoHotkey and swapped the right hand Shift key with the Application key located on the left side of the arrow up key.


One can even swap caps on this keyboard but I won't be doing that. I have however installed O-rings :)

Here is the source of my .ahk file:

AppsKey::RShift
RShift::AppsKey

I have also reversed the mouse scrolling for good measure as I prefer the natural OS X scrolling.

WheelUp::
Send {WheelDown}
Return

WheelDown::
Send {WheelUp}
Return

Both the source and the compiled versions are available for download.

Friday, November 9, 2012

Rename File Extensions with OS X Automator

I often have to rename file extensions of files. This can be fully automated.


Open up Automator


This one is easy :). Applications > Automator or just Command + Space and type in Automator

Select Workflow


Build a Workflow

Drag the "Get Specified Finder Items" to the right hand side.



Now drag "Rename Finder Items" under "Get Specified Finder Items". You will be asked: "This action will change the names of the Finder items passed into it.  Would you like to add a Copy Finder Items action so that the copies are changed and your originals are preserved?". I normally select "Don't Add" but if you want to be on a safe side select Add and it will create copies for you by default on Desktop.



Now all you have to do is select "Rename Text" from the drop down where you have "Add Date or Time" and select "extension only" instead of "full name". Specify what you want to find, for example "pdf" and replace with new extension, for example "pdfx".


Now drag some files into the "Get Specified Finder Items" and hit "Run".


Now you can save the Automator Workflow: File > Save.

Tuesday, August 7, 2007

BT Line Test

Since people often mention the 'quiet line test' or ask 'how do I find out how far I'm away from the exchange', here's some simple instructions
The BT line test facility can be accessed from any BT (or WorldOnline) line by dialling 17070.

Quiet Line Test
Unplug any extension phones, extension cables, answer machines or fax (anything except the phone you will use to do the test!).
Plug a normal touch tone phone directly into the BT master socket.
Dial 17070, press option 2 (quiet line test)

You should hear 'Quiet Line Test' and then silence, there should be no pops, clicks, whistles, buzzing etc. If there is noise on the line, make sure it's not your phones connection to the socket (wiggle it about a bit) and that you are using the master socket. If you are sure its the line making the noise then dial BT (or WorldOnline) and report the fault, they should be able to sort it out. Remember that 'mis-reporting' a fault (e.g. if it turns out to be your phone, extension cord etc.) may be charged a call-out fee by BT (/WOL).
Any problems? See It doesn't work? (below)

Distance From Exchange
Dial the same line test number as the quiet line test (17070). Then press option 3 (fast test) then press option 1 (to say you are authorised, don't worry about 'not being officially authorised'). The press option 2 (ring back test). Then put the phone down.

You will get called back by the test facility within about 10 seconds, one of the bits of information given will be distance from exchange (in kilometres).
*The distance result may not be accurate if you have a 'DACs' fitted. It is not 100% accurate but does serve as a guide.
Any problems? see It doesn't work? (below)

It doesn't work?
You need a BT line (or WorldOnline).
You need to use a touch tone phone (don't think it works without one).
You have caller line id (CLI) blocked, if this is the case then on dialling 17070 the message will include 'there is no CLI detected for this circuit'. You can get round this by dialling a prefix before 17070, the prefix is 1470, so the full line test number will be 1470 17070.