Syndicate content

peter's blog

Jul 17
0

Fix MAMP Error: "General error: 2006 MySQL server has gone away"

Wed, 07/17/2013 - 19:46 — peter

While working on a local copy of a Drupal site I am helping develop, I ended up hitting the following error:

General error: 2006 MySQL server has gone away: SELECT ff.* FROM {filter_format} ff ...

Ugh! Now what?! We need to change a setting on MySQL that ships with MAMP. As it turns out, the default max_allowed_packet is set to 1M and it needs to be higher. Changing that to 100M did the trick for me. Locate your my.cnf file and add the following setting under the [mysqld] section:

Jul 17
0

quick fix for CentOS locale issue on new virtual environment

Wed, 07/17/2013 - 10:36 — peter

We've just setup a new virtual environment, and upon login found this nice error:

# ✔ peter@endor(ttys002) ~
ssh new-server
Last login: Wed Jul 17 08:27:23 2013 from 192.168.73.37
-bash: warning: setlocale: LC_CTYPE: cannot change locale (en_US.UTF-8): No such file or directory
-bash: warning: setlocale: LC_COLLATE: cannot change locale (en_US.UTF-8): No such file or directory
-bash: warning: setlocale: LC_MESSAGES: cannot change locale (en_US.UTF-8): No such file or directory
-bash: warning: setlocale: LC_NUMERIC: cannot change locale (en_US.UTF-8): No such file or directory
-bash: warning: setlocale: LC_TIME: cannot change locale (en_US.UTF-8): No such file or directory

And...

Jul 17
0

easy way to change the current branch (HEAD) on a remote git repo...

Wed, 07/17/2013 - 10:00 — peter

Just had an interesting problem today where I needed to blast away the remote copy of a git master branch (don't ask!), but I couldn't do that because it was the current branch.

I quick question to a local git guru and the answer was very easy:

git remote set-head <remote> <branch>

Then I was able to delete the rotten origin/master branch, create it again from a good branch, reset it to HEAD and life was good again!

Easy Peasy!

-PCP

Oct 17
12

fix (workaround) the thousands of log entries that logitech solar service creates on osx

Wed, 10/17/2012 - 07:14 — peter

It turns out that you can "instruct" syslogd so that it ignores all messages from Solar Service instead of writing them to /var/log/asl. Here's how:

1. Add the following two lines in /private/etc/asl.conf:

# Ignore messages from Logitech's Solar Service.app
? [CS= Sender Solar] ignore

2. Reboot

OR simply restart syslogd by running:

sudo launchctl unload /System/Library/LaunchDaemons/com.apple.syslogd.plist
sudo launchctl load /System/Library/LaunchDaemons/com.apple.syslogd.plist

Sources where I found all this information:

Oct 14
0

List custom URL Schemes in OS X

Sun, 10/14/2012 - 16:02 — peter

was playing around osx and figured out how to list all the custom url schemes (from the command-line)...

/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister
-dump|egrep "(bindings.*\:$)"|sort

The output is something like this:

Apr 22
0

Adding Software RAID to a Proxmox VE 2.0 Install

Sun, 04/22/2012 - 16:19 — peter

Almost two years ago, I documented the process I went through to get Linux software RAID setup on Proxmox VE because Proxmox didn't officially support software RAID (which Linux does, of course). Now the fine folks at Proxmox released Proxmox VE 2.0 adding even greater features to Prox, like high-availability settings, REST api for management, etc… However, Proxmox VE 2.0 still doesn't officially support software RAID out of the box, so I figured it was time to go find out how to do it on this new version… As it turns out, due to the newer version of debian running under VE 2.0, the process is even easier than it was before! Read on and find out how.

Apr 14
0

Automating software updates on OSX

Sat, 04/14/2012 - 09:23 — peter

The Problem

OSX is fairly secure, however, nothing is impervious to attacks, and following the weakest link theory, the whole system will be as secure as its least secure component. In the recent events relating to the flashback malware, that component is NOT OSX itself, but rather, Java, as this article points out.

Jul 26
14

Compiling Blender svn on OSX Lion (with SCONS and Xcode 4.1)

Tue, 07/26/2011 - 19:11 — peter

The Problem

I upgraded to OSX Lion with the now free again Xcode 4.1 and no longer can compile Blender from SVN... again!

The Solution

To get your SVN Blender-fu back you will need to do 2 somewhat simple things:

May 26
0

Compiling Blender 2.5x on Xcode 4 (with SCONS)

Thu, 05/26/2011 - 15:11 — peter

The Problem

You, like me once, just upgraded to Xcode 4 and now you can't compile blender... This happens because the blender compiler (BTW: I use scons to compile) uses the old sdk 10.5 and/or 10.4u, which is not available on Xcode 4.

If you need help getting the initial setup to compile blender, view this video done by the awesome people at blender cookie.

Feb 01
1

Installing BackupExec Agent for Linux hosts in a 64-bit Fedora 14 system

Tue, 02/01/2011 - 18:20 — peter

The Problem

You got to backup your linux servers to tape. The windows-centric environment you live in uses symantec backupexec (BUE) and it works really well for windows servers. You got a spiffy Fedora 14 box with some CORAID storage attached to it and you need to make it backup to BUE. The linux install package fails, symantec support only recognize RHEL and SUSE as worthy linux distributions (although they used to also recognize Ubuntu), what do you do?