GalerieBlogUnity3D ExamplesKontaktSitemapFullsitemap

remove packages on osx

Hmm... 
usually you can remove Applications by dragging it to the Trash. But what about pkg files?

I found a blog entry how to remove them:

List identifiers [ID]:

pkgutil --pkgs | grep [name]

Remove package content:

sudo pkgutil --unlink [ID]

Show installed files (files modified by script aren't listed - afaik):

pkgutil --files [ID]

Forget about the package (only do this once you removed all it's content):

sudo pkgutil --forget [ID]
Kommentare (0)  Permalink

iFolder - a Dropbox replacement from Novell

Finally I installed iFolder on a Debian squeeze box.

logged in to the iFolder web interface

Advantages over Dropbox:

  • you can host your files
  • only your server limits the amount of space
  • You can have more the one root folder (no need to use sym- / hardlinks)

Disadvantages over Dropbox:

  • it requires mono to run (only a problem on Linux and OSX)

You can read more about iFolder here.

Kommentare (0)  Permalink

rrd grpahing some data

Just did again some graphing with rrd.
Thinking (googling) some metrics to graph I found some interesting articles:

  • some nice rrd examples: link
  • List of Cacti Scripts and Templates: link (I did not try them out yet!)
  • 20 Linux System Monitoring Tools Every SysAdmin Should Know: link
  • article about graphing spend cpu ticks: link
  • opennms graph gallery: link
  • tool to create color gradient steps: link (mentioned in the link above)
  • pmacct could be used to get protocols out of network traffic: link (will try it, once I have more time)

And here are some pics:
load average

cpu ticks in percentage of total klicks
(as this machine is idleing it graphs only between 0 and 5 %)

temperature reading: system, cpus and harddrives

Btw: am using catcti to graph and some custom code to push metrics to cacti. Will post about it, once it is on github.

Kommentare (0)  Permalink

testdisk - recover your partition table

I just hat the issues that my external WD drive showed no partition to mount.
It contained a timemachine backup.

Luckily I found testdisk which could restore the partition table.
Here are some screen shots:

testdisk log file options

testdisk drive selection

Kommentare (0)  Permalink

iFolder - an opensource alternative to dropbox

I like dropbox and I use it to sync stuff around my different boxes.
Btw. If you don't have dropbox installed, please use me as a referral.

Today I found an open source project sponsored by Novell called iFolder.

There is also a howto install on debian.

Hope I will find some time to play with it, at it allows me to be my own host of my files and still have the ease of "Dropbox" alike behavior.

Kommentare (0)  Permalink

Unity3 beta - my first impressions

Finally I found the time to test some of the new features of the upcoming Unity3d.
So far I am very impressed.

My favorite top 3 features are:

  1. Unified Editor
    Picture of Unity3D's unified editor
    One Editor to build for Standalone, Web, iPhone, Android, XBox 360 and PS3
  2. Working Debugger (MonoDevelop)
    Picture of Unity3D's build in Debugger - stepping trough source in MonoDevelop
    What happens on runtime? Yeah: step over the code. Comes with build in "sync MonoDevelop project" button.
  3. Versioning
    I could not test it with my current project. I fear that it's already grown to much to proper set up subversion as VCS afterwards.

If I would have to give a note: it would be 10 out of 10 points so far.

Kommentare (0)  Permalink

modified version of shiftit

I finished my modifications to shiftit. The modification I made are small.
It supports now the resize window to 1024 x max. height.

It looks like this:
modified shiftit with the resize to 1024 position left

A super helper to find the virtual key code for the letter "C" was Peter Maurer's Key Codes.app.

Kommentare (2)  Permalink

applescript for browser windows resizing

Here is an example apple script which can resize a window to 1024 px wide and use the maximum screen height:

-- script based on:
-- http://stackoverflow.com/questions/273242/is-there-anything-like-winsplit-revolution-for-mac-os-x#2977827

-- hardcoded screen resolution:
property screenWidth : 1280
property screenHeight : 800
-- read screen resolution:
-- comment out next 2 line to speed up the script 
-- if you use always the same screen hight
set screenWidth to (do shell script "system_profiler SPDisplaysDataType | grep Resolution | awk '{print $2}'")
set screenHeight to (do shell script "system_profiler SPDisplaysDataType | grep Resolution | awk '{print $4}'")

tell application "System Events"
	set _everyProcess to every process
	repeat with n from 1 to count of _everyProcess
		set _frontMost to frontmost of item n of _everyProcess
		if _frontMost is true then set _frontMostApp to process n
	end repeat
	
	set _windowOne to window 1 of _frontMostApp
	set position of _windowOne to {0, 0}
	set size of _windowOne to {1024, screenHeight}
end tell

It works from launchbar with "run in Background" or from the AppleScript Menu Bar for the last top most window.

Kommentare (0)  Permalink

Window management on OSX snow leopard

I searched for tools to manage application windows with a short cut.
Thanks to a superuser.com article I found some nice apps.
This is the order in which I would try them out:

  1. shiftit (OOS, shortcuts, but still under heavy development)
  2. optimal-layout (has layouts, resize multiple windows at once)
  3. sizeup (shortcuts, knows spaces and multiple screens)
  4. breeze (shortcuts, settings per app possible)
  5. divvy (draw position rectangle, but uses a fixed grid)
  6. cinch (move window to a "hot" border to position)

I guess that only optimal layout would solve my most use case: browser window "resizeing" to 1024px with maximum of height possible.

There is also an app which remembers not only window positions but also some system settings based on the current location:

  1. airportlocation

Luckily I found also some hints how to the positioning with apple scripts:

Let's see if I can use launchbar with some custom scripts to fit all my needs.

I will blog a new post once I have my scripts ready.

Kommentare (1)  Permalink

Windows XP, Windows 7 and OSX Snowleopard trippleboot

Yes it works and I had it working on my old MacBook.
To follow good habits, I share here, how I did it on my new MacBook Pro.
...crap why didn't I write it down last time ;-)...

0. why?

  1. i can have a native IE6 and IE8 (with IE7 in simulated mode)
  2. i can run demo's in native speed
  3. you name it

1. Requirements

You have already installed OSX on a single Partion on your GUID enabled Volume.
I will use a Windows XP Professional 32bit and a Windows 7 Professional 64bit iso images from msdn.
This tutrial should work fine with retail builds.

2. Prepare installation media

Windows XP does not know about EFI so it will work out of the box.
Windows 7 knows EFI and tries to use it, but only supports Version 2 and will fail on the MacBook.

  1. Mount your iso (on my machine it's mounted on drive x:)
  2. download oscdimg (google for it)
  3. open a cmd prompt and change to the folder where you have oscdimg
  4. run this command: (you can change the target where the iso is created)
    oscdimg -n -m -bX:\boot\etfsboot.com X:\ I:\en_windows_7_professional_x64_dvd_slimed_efi.iso
    oscdimg step by step
  5. burn the iso

3. make some space on your Mac

  1. open Terminal.app and get root with:
    sudo su -
  2. check how many space you have with:
    diskutil list
  3. resize your disk and create two new partitions.
    pea-mbp:~ root# diskutil list
    /dev/disk0
       #:                       TYPE NAME                    SIZE
    IDENTIFIER
       0:      GUID_partition_scheme                        *160.0 GB   disk0
       1:                        EFI                         209.7 MB   disk0s1
       2:                  Apple_HFS OSX_SSD                 159.7 GB   disk0s2
    pea-mbp:~ root# diskutil resizeVolume disk0s2 limits
    For device disk0s2 OSX_SSD:
            Current size:  159.7 GB (159697911808 Bytes)
            Minimum size:  75.6 GB (75631452160 Bytes)
            Maximum size:  159.7 GB (159697911808 Bytes)
    pea-mbp:~ root# diskutil resizeVolume disk0s2 100G "MS-DOS FAT32" Win7
    49G "MS-DOS FAT32" WinXP 10G
    Started partitioning on disk0s2 OSX_SSD
    Verifying disk
    Resizing
    Waiting for disks to reappear
    Formatting disk0s3 as MS-DOS (FAT32) with name Win7
    Formatting disk0s4 as MS-DOS (FAT32) with name WinXP
    Finished partitioning on disk0s2 OSX_SSD
    /dev/disk0
       #:                       TYPE NAME                    SIZE
    IDENTIFIER
       0:      GUID_partition_scheme                        *160.0 GB   disk0
       1:                        EFI                         209.7 MB   disk0s1
       2:                  Apple_HFS OSX_SSD                 100.0 GB   disk0s2
       3:       Microsoft Basic Data WIN7                    49.0 GB    disk0s3
       4:       Microsoft Basic Data WINXP                   10.7 GB    disk0s4
    

4. Format the partitions

You need this steps only if one of your windows partitions is bigger then 32GB.
The installer of Windows XP (even with SP3) can't format FAT32 bigger then 32GB.

  1. download and burn sysrescd
  2. Insert sysrescd and reboot your compouter holding down the c key.
  3. On the bootprompt type:
    freedos
  4. once at the freedos promt, format both c: and d: partitions with:
    format /S c:
    format /S d:
    
  5. type reboot to reboot the machine:
    reboot

5. Install Windows XP

Insert your burned Windows XP image and reboot holding down C to boot the cd.

  1. Install Windows XP on the last partition.
    Here it was labled E:. You can use the size of the partition to identify it.
  2. Windows will reboot
  3. Hold down alt key on the keyboard and choose "Windows" from the boot menu
  4. The system will fail to boot, but that is ok (it's windows after all)

6. Install Windows 7

Insert your burned Windows 7 image and reboot holding down c to boot the dvd.

  1. Accept the license and choose custom (advanced) install method.
  2. Choose the second last partition (should be Disk 0 Partition 3).
    Here it was labled WIN7, the name I used when I formated the partition with freedos.
    You can again use the size as a reference.
    And hit "Format" as we need NTFS for windows 7.
  3. Hit "next" to start the installation
  4. On reboot hold alt key to show the boot menu
  5. choose Windows to finish the installation of Windows 7.
  6. repeat step 4 and 5 a second time
  7. finish the installation

7. Bootloader

Back on OSX install install rEFIt.

  1. Double-click on the “rEFIt.mpkg” package from the downloaded dmg
  2. I had also to run enable.sh
    cd /efi/refit
    ./enable.sh
    

7. Make Window XP bootable

  1. Boot Windows 7 installation CD
  2. Choose "Repair your Computer"
  3. It will find some issues, let it "Repair and restart"
  4. repeat step 1 and 2
  5. This time select "Use recovery tools ..." and click next
  6. Choose "Command Promt"
  7. verify that Windows XP is on drive C:
    dir c:

    (it outputs only one folder: windows)
  8. fix the boot sector with:
    bootsect /nt52 c: /mbr
  9. type exit to quit the command promt
    exit
  10. Choose "reboot" and boot windows 7

8. Fix needed boot files

  1. boot Windows 7 and insert the Windows XP cd.
  2. open a command promt and copy over the needed boot fiels
  3. copy e:\i386\NTLDR d:\
    copy e:\i386\NTDETECT.COM d:\
    
  4. create the needed boot.ini file
    notepad d:\boot.ini
  5. paste in the following
    [boot loader]
    timeout=0
    default=multi(0)disk(0)rdisk(0)partition(4)\WINDOWS
    [operating systems]
    multi(0)disk(0)rdisk(0)partition(4)\WINDOWS="Win XP" /fastdetect
    
  6. change the needed file attributes for boot.ini (again im command prompt)
    attrib +R boot.ini
    attrib +S boot.ini
    attrib +H boot.ini
    

9. Finish the installation of windows XP

Reboot your machine and choose the third boot item

  1. finish the installation

10. Final steps

If you need drivers for your Mac, insert the snowleopard dvd.
I removed the "bootcamp services" as I don't use bootcamp in my setup
Now it's time to install all updates and the programs you need.


list of references:

[1] base for this tutorial
[2] hint about oscdimg
[3] refit
[4] easy boot cd (ebcd): fixing legacy boot blocks
[5] my howto costomize Windows XP
[6] sysresccd

Kommentare (0)  Permalink
Next1-10/26