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 news

· linux, software, irail, www

  • Been playing around with nginx vs Apache for iRail. The bottle neck still is the NMBS site (and I'm truly sorry for DoSing you, dearest NMBS. I had to benchmark), but nginx seems to win just slightly over Apache. Maybe it's worth moving irail.be to my nginx webserver. <3 nginx.
  • The iRail (national) mobile website is getting its final touches and should go live tomorrow night.
  • The iRail API seems stable. Special thanks to Pieter.
  • iRail is currently developing a native Qt (Symbian, Maemo and MeeGo) application.
  • There will most likely be a Bada (Samsung) native application as well.
  • Same for the iPhone, native app should be here soonish.
  • If you'd like to help, one way or another, two addresses, Project iRail and mailing list. :)
  • iRail team will attend Apps Marathon on Monday.
  • iRail @ OpenBelgium

SugarCRM: issue saving locales

· errors, software, www

SugarCRM (community edition; version 6.0.2) has been giving me a bunch of issues like being unable to change the locale settings (“Locales” under “Administration”) as well as “Display module icon as favicon” (“System Settings”).

Changing the US format (yyyy/mm/dd) to EU (dd/mm/yyyy) and every other setting on that page wasn’t actually saved/remembered upon hitting save.

Editing it manually in config.php wasn’t an option either, as it got overwritten every single time. I could of course change permission, and make it unwritable by the webserver, but that would make the rest of the admin panel useless (everything else isn’t configurable anymore).

Fwd: Workshop Reprocopy 22 september

· emailed, misc, www

Mail I received in my inbox today.

Posted, because I can’t attend, and, well, someone should. To save the planet. Or something.

To progress, instead of regress.

Begin forwarded message:

From: "Katrien Kiekens" Date: 10 Sep 2010 12:22:35 GMT+02:00 To: "Katrien Kiekens" Subject: Workshop Reprocopy 22 september

Beste

Reprocopy – beheersvennootschap van de Vlaamse krantenuitgevers - nodigt u uit om samen met deze uitgevers de voorwaarden rond dieplinken naar krantencontent te bekijken. Op woensdag 22 september om 10u organiseren we een workshop in de kantoren van Reprocopy, vlakbij het Brusselse Zuidstation.

#BCA4 Flickr set

· misc

[flickr-gallery mode="photoset" photoset="72157624809011083"]

I seem fairly pro at taking people's back. ;)

Set can be found here.