You are here

Tip

Vim does not respect certain regex character classes during substitutions

Submitted by Druss on Sat, 2013-06-01 07:48

Just now while attempting to perform a substitution in GVim, I found that the regex was not working as expected. Apparently, instead of matching all non-whitespace characters denoted by the shorthand class \S, the engine was matching the letter S instead, which was odd. It turns out that, as usual, I was the one at fault. What I was doing wrong was attempting to use the character class within [] groups.

Vim runs out of memory during a find and replace

Submitted by Druss on Sun, 2013-05-26 07:59

Earlier today, I had to perform a substitution in Gvim within a 2GB file. Unfortunately, after a few thousand operations, Vim ran out of memory with the following error:

  Out of memory!
Out of memory!  (allocating XXX bytes)

Windows too complained about running out of virtual memory and my system slowed down to treacle-like response times.

dpkg cannot install as there's no space left on the device even though there is

Submitted by Druss on Thu, 2012-11-22 23:46

I ran into this issue a couple of days ago and cannot recall the exact error message. However, the problem was effectively that aptitude could not install the new kernel update because my partition had apparently run out of space. An interrupted update to Klipper is one thing and the Linux kernel a whole 'nother kettle of fishies. Thinking that I simply needed to free up some space on my partition, I checked the current status via df.

Scrolling within Screen's buffer

Submitted by Druss on Fri, 2012-10-19 21:05

Since I keep forgetting this shortcut, here it is for posterity. Activating GNU Screen's scrollback feature can be done by pressing CTRL + a + [. This is especially handy when you are using Screen from within PuTTY.

While a number of sites provide additional Vim-esque shortcuts to navigate within the buffer, I've been able to get by fine with just the navigational arrow keys on my keyboard.

Initializing new hard disk: The request could not be performed because of an I/O device error

Submitted by Druss on Fri, 2012-10-12 01:09

I got a new 3TB hard disk. While it's being detected in Windows 7, initializing it has proved to be impossible as I keep running into the following error:

The request could not be performed because of an I/O device error

After testing this one a couple of different systems and in Linux, I have arrived at the conclusion that the drive is screwed. Time to get it replaced.

cannot stat 'rageagainstthecage-arm5.bin': No such file or directory

Submitted by Druss on Sat, 2012-07-14 23:10

Today, I'm trying to root one of my Android phones in order to install Cyanogen Mod 7.2! First issue: while attempting to root the phone (a Motorola Defy running Android 2.2.2 Froyo), I ran into the following error message while following this guide:
C:\Users\foo>adb push rageagainstthecage-arm5.bin /data/local/tmp/
cannot stat 'rageagainstthecage-arm5.bin': No such file or directory

Cron: pam_unix (cron:session): session opened/closed for user root by (uid=0)

Submitted by Druss on Thu, 2012-07-12 02:00

This is my week of playing around with mail servers and I have been keeping an eye on the logs on a regular basis. I noticed that the auth.log was riddled with millions of these pointless (from my POV anyhow) log entries:

CRON: pam_unix(cron:session): session opened for user root by (uid=0)
CRON: pam_unix(cron:session): session closed for user root

Cyrus sasld testsaslauthd connect() : No such file or directory 0

Submitted by Druss on Wed, 2012-07-11 01:22

While trying to debug a postfix authentication issue in Debian 6, I had to use testsaslauthd to test things out:
testsaslauthd -s smtp -u foo@example.com -p test

only to get the following error:
connect() : No such file or directory 0

This is apparently because a lot of people (and authors) follow the same guide for configuring postfix and saslauthd. One of the steps missing is to symlink and saslauthd directory to a location within postfix. To fix:

Pages

Subscribe to RSS - Tip