tech stuff.

Archive for the ‘Uncategorized’ Category

Debugging regex from the CLI

leave a comment »

Just stumbled across this obvious solution from the why didn’t I realize this earlier? department. GNU grep makes an great regex debugger!

Read the rest of this entry »

Written by Lee Verberne

2017/02/21 at 12:43

Posted in Uncategorized

Quicktip: Use your own VNC client for Softlayer CloudLayer console

with 3 comments

Contrary to what Softlayer sales would have me believe, Softlayer’s CloudLayer service does, in fact, provide console access. It’s provided via a java VNC applet accessible from https://manage.softlayer.com.

I use Linux on the desktop, though, so anything involving the words “java” and “applet” seems destined for failure. Fortunately, Softlayer is stand-up enough to provide the VNC connection information on the same page, so I thought I might fire up PPtP and give it a shot.

Strangely, I was unable to get Vinagre or gtkvncviewer to work. They would connect and send keystrokes successfully, but the display would remain blank. Bummer. The jtightvncviewer provided by Ubuntu’s tightvnc-java package works, though, and I don’t care enough to figure out why Vinagre didn’t work.

Good Luck, and if you figure out why Vinagre doesn’t work please let me know.

Written by Lee Verberne

2012/02/12 at 13:29

Posted in Uncategorized

Tagged with

Installing Apache modules on Mac OS X Leopard

with 2 comments

Installing mod_python on my mac laptop was surprisingly difficult.  My first attempt of simply compiling it with {LD,C}FLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64" failed in a bit of a strange way.  It appeared to create a universal binary for the DSO, but apache failed to load it with the following error message:

httpd: Syntax error on line 118 of /Volumes/Workplace/pflex/2.1.x/Build/build/ValidationWeb/apache/etc/httpd.conf: Syntax error on line 22 of /Volumes/Workplace/pflex/2.1.x/Build/build/ValidationWeb/apache/etc/platform/i386.Mac OS X/httpd.conf: Can't locate API module structure `python_module' in file /usr/libexec/apache2/mod_python.so: dlsym(0x100201000, python_module): symbol not found

As it turns out, the build process was respecting the LDFLAGS & CFLAGS for processes called directly by make, but it was not passing them on to apxs.  Adding the following to src/Makefile (after the initial INCLUDE declaration) worked to put apxs on the right track:

INCLUDES+= -Wc,-arch -Wc,ppc -Wc,-arch -Wc,ppc64 -Wc,-arch -Wc,i386 -Wc,-arch -Wc,x86_64
INCLUDES+= -Wl,-arch -Wl,ppc -Wl,-arch -Wl,ppc64 -Wl,-arch -Wl,i386 -Wl,-arch -Wl,x86_64

So, the procedure to install mod_python is:

  1. Download source here
  2. ./configure
  3. Add above two lines to src/Makefile
  4. make
  5. sudo make install or sudo make install_dso

Written by Lee Verberne

2008/11/19 at 17:48