Preview in Marked mixin for Chocolat

Today I whipped up a quick mixin for Chocolat that opens the current open file for preview in Marked.

You can download it under the Install Mixins menu in Chocolat or from Github.

New Summer Shoes

BBS LM - Red, White & Gold - One of the rear wheels for my 2008 GTI.

OS X: Write to NTFS

Install Homebrew if you do not have it already.

1
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"

Install fuse4x

1
brew install fuse4x

Install ntfs-3g

1
brew install ntfs-3g
  • Follow the on screen instructions after the make install to replace the default OS X automounter.

Configure fuse4x kernel

1
brew info fuse4x-kext
  • Follow the on screen instructions must be installed by the root user.

Done, mount your drive

OS X: Install IMG onto SD Card

I use Raspbian on my Raspberry Pi but this method should work for any major distro.

From Terminal in OS X with the SD card connected

Identify the SD card

1
df -h

Unmount the SD card (use your disk as determined by previous step)

1
sudo diskutil unmount /dev/disk1s1

Apply the image to the SD card

1
sudo dd bs=1m if=/path/to/file.img of=/dev/rdisk1

Project: Smart Garage

My winter project has been to learn enough about small circuits to make use of a Raspberry Pi. Going into this, I know absolutely nothing about building hardware and interfacing software with it. In the end my goal is to build myself a Garage app for my iPhone that will provide me with all the information and tools that I implement. I’m also trying to avoid the ‘common’ way of interfacing with the RPi over HTTP.

Currently my list of features is:

  • Live video feed
  • Current temperature reading
  • Ability to control the furnace
  • Current door status (open / closed)
  • Ability to open and close the garage door

I ordered a RPi and a bunch of parts off eBay, most haven’t shown up yet but some relays have. I wrote up a Python server script that operates over SSL and TCP to receive commands from my iPhone app which operates the garage door.

For now I am stuck waiting on Canada Post to bring more goodies to my door.

OS X: Remove ‘Open With’ Duplicates

Launch Terminal and paste the following snippet:

1
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user

This might take a couple minutes, restart Finder afterwards:

1
killall Finder

Migrate MySQL Databases via SSH

Export the MySQL Database

1
mysqldump -p -u username database_name > database.sql

Import the MySQL Database

  • Create the database first and then run
1
mysql -p -u username database_name < filename.sql