Archive for the ‘Mac’ Category

Streaming w/ GoPro 3 + *spark d-fuser + Blackmagic Intensity Shuttle Thunderbolt + Boinx TV + FMLE

For I created a setup to switch video streams.

  • GoPro 3
  • *spark d-fuser
  • Blackmagic Intensity Shuttle Thunderbolt
  • Boinx TV
  • iGlasses
  • FMLE (Flash Media Live Encoder)

Things to do:


The GoPro is very picky on settings:
Set resolution to 720p60 (the actual framerate is 59.94 as others found out
(TODO: is NTSC relevant as well?)


Update .ini in the d-fuser to add a gopro entry: 720p 59.94
This is reference number 46 (see the support page for details how to do that)

Name = GoPro 720P60 (1280x720)
Number = 46
EDIDNumber = 5

Boinx TV

Add the BoinxTV Video Sender Package to the setup. This adds syphon output.


This package can pick up the syphon stream ffrom Boinx TV and make it available as a regular QT Camera which van be used in FMLE.

Other options to investigate:

Twitter Screen Saver (a.k.a. a “Stream Saver”)

Just a quick and dirty experiment: A Twitter ScreenSaver.


With the Apple Developer Tools installed, you are able to create your own screensavers with Quartz Composer.
(I’ve been experimenting with this tool a few years ago when it was called PixelShox. Later it was bought by Apple to include it in Quicktime.)

This “StreamSaver” is still a work in progress and sorry; OSX 10.5+ only.

If you have any idea’s, lemme know!

Download/see it here, and place it in ~/Library/Screen Savers.

Terminal scripting in 10.5

Een zeer handig tooltje om je sessies automatisch een kleur te geven als je aan remote ssh doet. (Via The Omni Mouth)

Bewaar deze code in een executable scrip ergens in je path

on run(MySettingsName)
	set MyTTY to do shell script "/usr/bin/tty"
	set TTYTab to my find_tab_for_tty(MyTTY)
	if TTYTab is missing value then
		return -- Bail if we got confused rather than making it worse
	end if
	tell application "Terminal"
			set MySettings to settings set named MySettingsName
		on error
			return -- bailout
--			set MySettings to default settings -- use default settings if the name is bogus
		end try
		set current settings of TTYTab to MySettings
	end tell
on find_tab_for_tty(MyTTY)
	-- Find the window/tab that has this tty.  Could use an application->tab relationship or possibbly a 'find tab by tty' command of some sort.
	tell application "Terminal"
		set MyWindowCount to count of windows
		repeat with MyWindowIndex from 1 to MyWindowCount
			set MyWindow to window MyWindowIndex
				set MyTabCount to count of tabs of MyWindow
			on error
				set MyTabCount to 0 -- a non-Terminal window?
			end try
			repeat with MyTabIndex from 1 to MyTabCount
				set MyTab to tab MyTabIndex of MyWindow
				if MyTTY is (tty of MyTab) then
					return MyTab
				end if
			end repeat
		end repeat
	end tell
	return missing value
end find_tab_for_tty

edit je .bash_profile en voeg de volgende code toe:

# Show remote Terminal sessions with a different style.
# TERM_PROGRAM doesn't get set if we are logged in remotely,
# but then the originating Terminal could have done this (hopefully).
if [ "$TERM_PROGRAM" = "Apple_Terminal" ]; then
  function ssh {
    SetTerminalStyle ssh
    SetTerminalStyle "$@"
    /usr/bin/ssh "$@"
    SetTerminalStyle default

PHP & MySQL on Leopard

Edit /etc/apache/httpd.conf and comment out

LoadModule php5_module # (on line 114)

If you installed the binary mysql5 edit/add /usr/local/mysql/my.cnf and add/change:

socket = /var/mysql/mysql.sock
socket = /var/mysql/mysql.sock

then do (with sudo -s)

/bin/sh /usr/local/mysql/support-files/mysql.server stop
mkdir /var/mysql
chown -R _mysql:wheel /var/mysql/
/bin/sh /usr/local/mysql/support-files/mysql.server start

(update this also in your rails app’s database.yml)

Migration MySQL 4 to 5

Fist a dump of all current databases

mysqldump \
  --all-databases -u httpd -p \
  --default-character-set=latin1 > alldb.tmp_sql

Stop mysql

/bin/sh /usr/local/mysql/support-files/mysql.server stop

and move the old datadir

sudo mv /usr/local/mysql/data /usr/local/mysql/data_4
sudo mkdir  /usr/local/mysql/data
chown -R _mysql /usr/local/mysql/data

Then split the datadump into seperate files

split -p "-- Current Database" alldb.tmp_sql

To prepend special params mysql dump provided, prepend the first file (probably xaa) and edit SET NAMES latin1 to SET NAMES utf8

for file in `ls x*`
 new=`head -1 $file | \
   sed -e 's/-- Current Database: //' -e 's/\`//g' -e 's/ /_/g'`
 cat xaa > $new.sql
 cat "$file" >> $new.sql

Then restart without checking the user privileges (so we can alter the usertable)

/usr/local/mysql/bin/safe_mysqld --skip-grant-tables &

Then finally do the import and watch for errors to fix

for file in `ls *.sql`
 echo "Importing $file"
 cat "$file" | sed -e \
   's/DEFAULT CHARSET=latin1/DEFAULT CHARSET=utf8/' | mysql

Restart the processes:

/bin/sh /usr/local/mysql/support-files/mysql.server restart

Synchroniseren folders op je mac

Omdat ik een beetje paranoide begon te worden over mijn harddisk (Disk Utility gaf enkele fouten) toch maar eens de optie overwogen om een backup strategie in elkaar te zetten…. Maar op welke manier?

Enkele vereisten zijn er natuurlijk wel, het moet eenvoudig en sim-pel zijn. moet niet 10x klikken en het moet snel zonder dat ik er veel last van heb als ik aan het werk ben. Dus op zoek naar de ultieme backup applicatie totdat OSX Leopard (met time machine) om de hoek komt kijken.


Safe boot your mac to repair startupdisk

Just hold the shift key after the startup tone to repair your startupdisk.
What is Safe Boot, Safe Mode? and Starting up in Safe Mode