Some interesting findings from web-dev land…
I was experiencing this issue with some larger file uploads using the CakePHP Media plugin.
https://bugs.webkit.org/show_bug.cgi?id=5760
Add this to the virtual host declaration in your Apache config file to fix it:
123456<VirtualHost x.x.x.x:x>
# Prevent Safari from hanging on uploads
BrowserMatch Safari nokeepalive
</VirtualHost>
For my own records, had to look this up again today so thought best blog it:
12sudo chmod -R g+s *
# Would set group permissions recursively for all directories at the current location.
If anyone is interested, files in these directories will have the group ownership as the directory, instead of the group of the user that [...]
I had the issue where my MacBook creates files prefixed with ._ while working on a Samba share. I’ve fixed this once before but it was so long ago, I’ve forgotten how!! Anyway, I had a stack of these files in a checked-out svn project and needed to delete them. Rather than do each one [...]
I managed to recompile PHP with some new directives and install it on my live production server with minimal downtime.
I followed these steps:
1) Downloaded the source of PHP. I stuck to the same branch (5.2) as there was nothing I required in 5.3.
2) Backed up my /etc/php.ini file.
3) Compiled PHP with ./configure using my old [...]
You can return the exit/return code of the command you just ran in OSX/Linux using this simple command:
1echo $?
This is handy when debugging scripts that rely on shell command return values.
Been doing some bash scripting of late, been meaning to for ages. Really enjoying it too!
Anyway, today I needed to match an exact string in a directory listing (ls). To check if a volume on my Mac Book was mounted, so I could backup to it. Or any other drive for that matter. I ended [...]
I always used to log-out / log-back-in to shell, to allow changes in my .bash_profile to kick in. I’m guessing this would work in OSX with your .profile file too but I’ve not tested it. Anyways, I discovered you can reload the script on the fly using:
1source ~/.bash_profile
Lots of love going about today! This time, the recipient is SSHFS which allows you to mount a remote filing system onto your local tree over SSH. In a virtual hosting environment (/vhosts/ etc) it’s pure joy to work with.
You’ll need to install SSHFS on the client (the machine you want to mount the remote [...]
This will dump an SQL statement into a file:
1mysql -u username -p database_name -e "SQL_STATEMENT" > file.data
Checks out over an SSH connection if no HTTPS access is available. For my own records:
1svn checkout svn+ssh://your_user@yourdomain.com/usr/local/svn/ReposName/trunk