August 28th, 2008 | apple | No Comments
Currently on my iMac I have a couple of external disks attached that I want to share to the rest of my house. The problem though is that when sharing through Samba I can’t make the shares read only, OS X pretends to accept the permissions change in preferences > sharing, but just changes it right back. After a little bit of poking I’ve got read only shares working.
Open a terminal and replacing {sharename} with the name of the share you set up in Preferences, type:
sudo nano /var/samba/shares/{sharename}
Now append the following line to the end of the file and hit ctrl-o to save.
read only = yes
Finally, reload the Samba config files using this:
sudo /usr/sbin/smbd reload
August 13th, 2008 | development, itunes, www | 1 Comment

Every developer out there is sick to death of the mostrosity that is IE6. As part of a movement to “push” users up from out-dated browsers, pushup is a little script to automatically notify those users and provide them with a link to update their browser.
If you’ve visited this site on an older browser (extremely few do), you would aready have received a notification for this ;)
August 7th, 2008 | www | No Comments
Yusuke Kamiyamane has released another free icon pack called Fugue to follow up his other great Diagona pack. Both these packs make a great alternative to using the beaten-to-death famfamfam silk icon pack.
Update: This guy is a machine, he’s now at 2,800 icons in this amazing pack

August 6th, 2008 | development, php, www | No Comments
It became clear early on in the planning stages of our current project that we were going to need a reliable backup solution. We discussed backing up to another server we already have in the datacenter and backing up to a server in another datacenter. The former was not redundant enough for our liking and the latter would introduce extra costs we could do without so early on.
Enter Amazon S3. You pay for as little as you need and it expands as you do. The S3 docs point to undesigned’s PHP5 library using cURL. Perfect. 15 minutes and about 10 lines of code later we were archiving and backing up user content to S3.
August 1st, 2008 | apache, php, www | 2 Comments
<?php
exec('echo "/usr/bin/sudo /etc/init.d/httpd reload" | /usr/bin/at now');
?>
There’s a couple of steps to follow to get the above code working as Apache runs on port 80, which requires root priviliges to access. These steps are for Redhat/Centos (tested on Centos 5), but can easily be modified for any distro. You should avoid restarting if at all possible. If you absolutely have to, just replace “reload” with “restart” in the instructions below.
- Edit your sudoers file and add the following line ( If you are using suPHP/suexec you’ll need to change apache below to your web user ):
apache ALL= NOPASSWD: /etc/init.d/httpd reload
-
Comment out the following line in your sudoers file
Defaults requiretty
-
Add the web user to /etc/at.allow to give it access to ‘at’.
That’s it, you should now be able to reload Apache from within PHP using the code segment provided.