Browsing articles in "Off Topic"
Aug
15

SSHFS Symlinks

Using the default settings, symlink on sshfs don’t work.

You can add an option with the -o flag that will get these working properly:

sshfs user@host:/path/to/mount/ ~/mountpoint -oauto_cache,reconnect,volname=mountname,defer_permissions,transform_symlinks,follow_symlinks

Aug
11

MAMP MySQL won’t start

If you use MAMP for local PHP/MySQL development on OS X then you’re likely to come across this problem with MySQL starting once in a while.

MAMP is a great bit of software but every now and then you will see that MySQL has a problem starting. Checking PHPMyAdmin you might see “Error: Could not connect to MySQL server!”.

Don’t despair, there is a very quick fix:

  1. Quit MAMP
  2. Open terminal and type: sudo killall -9 mysqld
  3. Reopen MAMP

That will fix it but if it’s still not working you can try visiting this MAMP forum thread for more details.

Jul
13

SQL command to reset WordPress password

The quickest and easiest way to change your WordPress admin password. Just enter this SQL command directly on your server.

UPDATE wp_users SET user_pass = MD5('newpassword') WHERE user_login = "admin";
Jun
13

Zimbra mail suddenly stopped working

After a couple of days with no mail I decided that something must be wrong. A quick check of the logs showed a problem.

I tailed the log file while I sent myself an email from another account:

tail -f /var/log/mail.log

The mail tried to be delivered but there was an error occurring:

127.0.0.1[127.0.0.1]:10024: Connection refused

It seems the Zimbra mailserver was not accepting connections. This was easily resolved with a quick restart.

zmcontrol stop

zmcontrol start

May
11

CSS Syntax highlighting in nano

If your server’s version of nano doesn’t have syntax highlighting for CSS you can turn it on yourself.

Just edit your nano config file (which may not exist yet):

nano -w ~/.nanorc

And add the following:

syntax “css” “\.css$”
color brightred “.”
color brightyellow start=”\{” end=”\}”
color brightwhite start=”:” end=”[;^\{]“
color brightblue “:active|:focus|:hover|:link|:visited|:link|:after|:before|$”
color brightblue start=”\/\*” end=”\\*/”
color green “;|:|\{|\}”

 

Save and exit. The next time you open a .css file your code will be highlighted.

Tip courtesy of the nanosyntax project where you can also find code for HTML and lots of other file types.

May
7

Moving mail to Zimbra server using imapsync

By Sam  //  Off Topic, Server side  //  1 Comment

If you attempt moving mail using imapsync to a Zimbra server, the first error you are likely to get is:

Host mydomain.com says it has NO CAPABILITY for AUTHENTICATE CRAM-MD5

You can fix this quite quickly by adding –noauthmd5

So, that’s fixed but Zimbra still isn’t going to let you connect. You’ll get another error that says:

Error login: [mydomain.com] with user [user@mydomain.com] auth [LOGIN]: 2 NO cleartext logins disabled

To fix this one you need to enable clear text logins on the Zimbra admin panel. There’s a checkbox under the IMAP section of Server Settings. Except it’s greyed out and doesn’t work.

What you actually need to do is logon to your server, make sure you are running as the Zimbra user (su zimbra) and then execute the following command:

zmprov mcf zimbraImapCleartextLoginEnabled TRUE

Done. Run imapsync again it hopefully it will work.

 

 

Jan
5

This user does not have a Google Account – Analytics problem

If you’re trying to add a new user to one of your Google Analytics profiles, you might get the error:

This user does not have a Google Account.

I found I got this error when trying to add my name@googlemail.com account. I knew the address was definitely valid, it’s an account I use all the time.

In the end, the only way I could get it to work was by changing the part after the at symbol to @gmail.com, even though I use an @googlemail.com address.

Jul
24

Recursively delete .svn files

By Sam  //  Off Topic  //  No Comments

I’m a heavy user of subversion (SVN) for version control and sometimes when I start a new project I begin by copying the structure of an older one.

As everything is under version control I need to then delete all the .svn files from every folder in that project so that I can start afresh.

To do that I use the command:

find . -name ".svn" -exec rm -rf {} \;

It then looks through every folder and removes any folder or file called .svn

Sponsored links