Linux find and replace within file
To find and replace across a file (or files) or a SQLdump you can do something like the following
sed -i 's/sites\/default/sites\/newsite/g' newsite.sql
Note the forward slashes have been escaped in the above examples
Show crontab for all users
To see crontab for all users use the following
for user in $(cut -f1 -d: /etc/passwd); do crontab -u $user -l; done
Snow leopard mail with exchange 2007 attachment size
Whilst on the face of things mail.app in Snow leopard should work out of the box with exchange 2007 it still needs settings changing, in this case to send attachments over 5meg. The following fixes this:
You need to edit web.config in the following 2 files and change maxrequestlength to a size in kilobytes i.e. 50000 for ~50meg:
C:\Program Files\Microsoft\Exchange Server\ClientAccess\exchweb\ews C:\Program Files\Microsoft\Exchange Server\ClientAccess\owa
Then also from a command prompt do the following:
cd \Windows\System32\inetsrv
Flush cache on Mac OSX
If you want to manually force a flush of your local DNS cache on a Mac use the following:
dscacheutil -flushcache
Prior to 10.5.1 you can use:
lookupd -flushcache
VMWare ESXi and Windows XP Pro
I have been installing lots of virtual machines on my FREE VMware ESXi server. Most guest OS's install great but I had a problem with Windows XP Pro 32-bit.
When you go through the install Windows XP does not find any hard disks and therefore will not install.
What you need to do is download a file called vmscsi-1.2.0.4.flp and then in the virtual machine setup make sure the floppy setup looks at the contents of the zip file. Then press F6 during install and it will read the file and then find the virtual hard disk.
Outlook Auto Complete
So you have a new pc or a new Outlook profile. You login to your mailbox, all your data is there but your auto complete list which Outlook auto generates has gone, what a pain.
This is actually easy to get back and is basically just a file stored in your user profile on your pc.
Browse to :
C:\Documents and Settings\USERNAME\Application Data\Microsoft\Outlook
Look for a file called Outlook.NK2
The name might be different to that but will still have the same extension of .NK2
Copy or rename the file to it matches your Outlook profile name.
Blackberry Professional Software Express
I installed the free 1-user version of Blackberry Pro Software Express (BPS) yesterday and was quite straight forward. This was onto the same server as Exchange 2003.
Just two issues arose which stumped me for a bit.
The first was one of the Curve handsets would not activate. This was because the activation email which came from Blackberry was been caught by Outlook's junk mail filter and was the activation only works if the email is in the main inbox. Turning off the junk filter in Outlook solved that problem.
Using a HTC Device As A Modem under Apple's OS X
In the UK T-Mobile provide an unlimited 3G/HSDPA (High-Speed Downlink Packet Access) Internet connectivity on their handsets for just £7.50 a month.
This makes it a superb way to get Internet connectivity for your laptop, almost anywhere in the UK.
A Macbook with bluetooth, paired with my MDA Vario II (aka HTC Hermes) provides a solid data connection.
Exchange 2003 restore to different server name & 0xC7FE1F42
Getting fed up with 0xC7FE1F42? Well you aren't the only one, here's a quick list of reasons I've found that causes this, and more importantly how to get around it.
Firstly make sure the store you are trying to restore too is offline i.e not mounted.
This is done via ADSIEdit (install from the Windows 2003 CD folder SUPPORT\TOOLS\SUPTOOLS.MSI) then c:\program files\support tools\adsiedit.msc
1. Open ADSI Edit.
Translating Drupal CCK field values
In order for a string to get translated it must be passed through the t() function in PHP code.
When defining the CCK field you need to generate the 'Allowed values' list via PHP code. The box for PHP code is just beneath the normal box. Use code similar to:
return array( 'male' => t('Male'), 'female' => t('Female') );