Apple

80 posts in Apple

Mac OS X lock screen

· Apple, Software

I’m now working at a company with somewhat sensitive data and I’m still using my Macbook Pro.

However, as there is no handy way to lock a screen (like Windows+L on Wintendo machines)… And when I’m at home, I don’t want to fill in my password each time the screensaver jumps on. So I created this AppleScript after some Googling.

Sure, you can use Keychain Access, but that adds yet another icon to my menu bar.

Mounting a RAMFS disk at boot in Mac OS X

· Apple, Hardware, Software

I received a question about creating a RAMFS for Mac OS X’ /tmp folder, so I’ll post my reply here as well.

It’s really simple;

  1. Open Terminal (Applications -> Utilities), type "sudo su" and enter your user's password.
  2. Create a new file in /Library/LaunchDaemons, like this: "nano -w /Library/LaunchDaemons/com.yeri.ramfs.plist" (you can rename yeri to whatever you like)
  3. And insert following content (ctrl+x to save - y - [enter]):
  4. <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" 
    "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
        <dict>
            <key>Label</key>
            <string>com.yeri.ramfs</string>
            <key>ProgramArguments</key>
            <array>
                <string>/var/root/ramfs.sh</string>
            </array>
            <key>RunAtLoad</key>
            <true/>
        </dict>
    </plist>
  5. create a second file in /var/root/, like this: "nano -w /var/root/ramfs.sh"
  6. And insert following content:
  7. #!/bin/bash
    ramfs_size_mb=64
    mount_point=/private/tmp
    

    ramfs_size_sectors=$((${ramfs_size_mb}10241024/512)) ramdisk_dev=hdid -nomount ram://${ramfs_size_sectors} newfs_hfs -v ‘Volatile HD’ ${ramdisk_dev} mkdir -p ${mount_point} mount -o noatime -t hfs ${ramdisk_dev} ${mount_point} chown root:wheel ${mount_point} chmod 1777 ${mount_point}

  8. chmod +x ramfs.sh and reboot. Check in Terminal with “mount” or “df -h” is everything is fine. To hide the disk icon on your desktop, check my old blog post.
  9. In case Mac didn’t do so already, you might want to link /tmp to /private/tmp: “rm -r /tmp && ln -s /private/tmp /tmp”.
  10. Should be it !

iRail.git

· Apple, Linux, Software, iRail, www

iRail source is on Github.

To access the iRail source code;

Be aware you need to be added as contributor before being able to commit changes.

  1. get Git
  2. [browse to some folder] mkdir git
  3. cd git
  4. git clone git@github.com:Tuinslak/iRail.git
  5. cd iRail
  6. git fetch

To edit & commit changes:

  1. git add [file]
  2. git commit -m 'edited [file], added this and that'
  3. git push

To update repo

  1. git fetch
  2. git merge origin/master

To check log

Mac OS X + SSD tweaks

· Apple, Hardware, Software

Came across a pretty cool howto to tweak your SSD on a Mac. Only thing I noticed is setting the hibernate mode to 0 made my mac randomly wake up a few seconds after it went to sleep (and happened most often when closing the lid, less often when clicking the sleep button; randomly closing apps seemed to sometimes fix this problem; usually closing Skype and VLC solved this…) Set it the hibernate mode 7 now (which was the default I think)

QQ

· Apple, Misc

If only it were cheaper :(

And I didn't even pick the SSD :(

Update:

With my education discount... Not much better :(

Fraps to iMovie

· Apple, Software, Windows

How to successfully import a movie recorded using Fraps into iMovie;

  1. Get Fraps, record whatever you want
  2. Get XviD4PSP (freeware) & install
  3. Import your avi files recorded using Fraps into XviD4PSP (drag & drop)
  4. Pick the encoding you want on the left. x264 q21 DXVA-SD-Insane seemed to be an acceptable quality.
  5. Click enqueue (and repeat 3->5 for multiple files)
  6. Click encode
  7. ... wait ...
  8. This will create .mp4 files; transfer those to your Mac
  9. Open iMovie, File -> Import -> Movies -> select the mp4 files
  10. ... wait ... A couple of hours
  11. Your movie should now be in iMovie, and you should be able to edit it
  12. Edit whatever you want to edit, share and export and have fun.
A little hint, if your video is cropped (parts cut off), click your movie sequence -> on the left corner of your sequence a little "gear" will appear -> Cropping & Rotation -> in your right display window click "fit" to make it full size.

Took me quite some time before I managed to do it, but hey, now I know… ;)

iTunes 9 and iPhone OS 3

· Apple, Errors, Software

And the smart playlist syncing issue.

Syncing smart playlists, with “live updating” checked, bugged the playlists on the iPhone (there were songs in the playlist that didn’t belong there). Hoping this bug would be fixed ASAP I tried to ignore it as long as possible… However, it so far hasn’t been fixed.

As I was pretty fed up with unchecking “live updating” for 6 playlists eachtime I synced my iPhone, I tried to play around and find a fix.

iPad

· Apple

All I can say: “Not impressed”.

Too big to be mobile, missing too many key features to be useful.

Actually, I guess Gizmodo said it all.

And besides that, no iPhone OS 4? No working iTunes? Anything truly useful?