Syndicate content
Aug 31
0

Linux find and replace within file

Tue, 2010-08-31 15:16 — superuser

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

Jun 07
0

Show crontab for all users

Mon, 2010-06-07 15:23 — superuser

To see crontab for all users use the following

for user in $(cut -f1 -d: /etc/passwd); do crontab -u $user -l; done

May 25
0

Snow leopard mail with exchange 2007 attachment size

Tue, 2010-05-25 13:58 — superuser

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

May 14
0

Flush cache on Mac OSX

Fri, 2010-05-14 19:04 — superuser

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

May 29
1

VMWare ESXi and Windows XP Pro

Fri, 2009-05-29 10:52 — rb

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.

May 29
0

Outlook Auto Complete

Fri, 2009-05-29 10:48 — rb

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.

May 29
3

Blackberry Professional Software Express

Fri, 2009-05-29 10:41 — rb

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.

Apr 01
0

Using a HTC Device As A Modem under Apple's OS X

Wed, 2009-04-01 23:13 — budda

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.

Mar 13
0

Exchange 2003 restore to different server name & 0xC7FE1F42

Fri, 2009-03-13 15:07 — superuser

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.

Jan 20
1

Translating Drupal CCK field values

Tue, 2009-01-20 15:19 — budda

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')
);