Monday, November 27, 2017

out of memory during a gentoo emerge?

If you are running out of memory, you may want to increase your swap memory. 
swapon -s
if it is empty it means you don't have any swap enabled. To add a 1GB swap:
dd if=/dev/zero of=/swapfile bs=1024 count=1024k
mkswap /swapfile
swapon /swapfile

Tuesday, November 9, 2010

lamp config on gentoo

emerge mysql
emerge apache
echo "dev-lang/php apache2" >> /etc/portage/package.use
echo "dev-lang/php mysql" >> /etc/portage/package.use
emerge dev-lang/php

/etc/conf.d/apache2 should have -D PHP5

Tuesday, May 11, 2010

Visual Studio and Silverlight Launch

Just got back from the Visual Studio 2010 and Silverlight 4.0 launch in Vegas.
Man what a learning curve ahead of me as I try and get my head around some totally new concepts.

WPF (Windows Presentation Foundation)
WCF (Windows Communication Framework)

I'll post an update to this once I've settled in.

Tuesday, April 14, 2009

the /dev/socksys disappearing trick

For the past couple of months I’ve been manually creating /dev/socksys on my development virtual machine only for it to disappear when I reboot.

The reason for this is that /dev is now regarded as a virtual directory and is rebuilt by udev from scratch every time the system is rebooted.

The solution to this is to cp -R [device] /lib/udev/devices.

When you reboot you will find the device in /dev.

mknod /dev/socksys c 30 0
chmod 777 /dev/socksys
chmod +s /dev/socksys

cp -R /dev/socksys /lib/udev/devices

Thursday, October 9, 2008

Deleting a Vista Directory you don't have access to.

I use delta copy on Vista ultimate to backup several windows machines as well as my cvs repository on Linux. I inadvertedly configured the service to start as a network service but found I couldn't access the backup at all. I subsequently changed it to start as my user and could access the new directories but was left with a backup directory I couldn't access or delete.

This is how I eventually managed to delete the directory.

Start accessories right click on the command prompt and select run as administrator. At the command line type

takeown /F [directory] /R

cd [directory]

cacls *.* /T /G "[PC NAME\USER NAME]" :F

cd ..

rd [directory] /s

Monday, September 1, 2008

proxy usage?

Quick script to give me usage for a particular url on my proxy server.

usage.sh URL

# !/bin/sh
perl -pe 's/[d.]+/localtime($&)/e' /var/log/squid/access.log.9 | grep -i $1 | awk '{ print $1" "$3"-"$2"-"$5" "$4" "$7" "$11}' > $1.log
perl -pe 's/[d.]+/localtime($&)/e' /var/log/squid/access.log.8 | grep -i $1 | awk '{ print $1" "$3"-"$2"-"$5" "$4" "$7" "$11}' >> $1.log
perl -pe 's/[d.]+/localtime($&)/e' /var/log/squid/access.log.7 | grep -i $1 | awk '{ print $1" "$3"-"$2"-"$5" "$4" "$7" "$11}' >> $1.log
perl -pe 's/[d.]+/localtime($&)/e' /var/log/squid/access.log.6 | grep -i $1 | awk '{ print $1" "$3"-"$2"-"$5" "$4" "$7" "$11}' >> $1.log
perl -pe 's/[d.]+/localtime($&)/e' /var/log/squid/access.log.5 | grep -i $1 | awk '{ print $1" "$3"-"$2"-"$5" "$4" "$7" "$11}' >> $1.log
perl -pe 's/[d.]+/localtime($&)/e' /var/log/squid/access.log.4 | grep -i $1 | awk '{ print $1" "$3"-"$2"-"$5" "$4" "$7" "$11}' >> $1.log
perl -pe 's/[d.]+/localtime($&)/e' /var/log/squid/access.log.3 | grep -i $1 | awk '{ print $1" "$3"-"$2"-"$5" "$4" "$7" "$11}' >> $1.log
perl -pe 's/[d.]+/localtime($&)/e' /var/log/squid/access.log.2 | grep -i $1 | awk '{ print $1" "$3"-"$2"-"$5" "$4" "$7" "$11}' >> $1.log
perl -pe 's/[d.]+/localtime($&)/e' /var/log/squid/access.log.1 | grep -i $1 | awk '{ print $1" "$3"-"$2"-"$5" "$4" "$7" "$11}' >> $1.log
perl -pe 's/[d.]+/localtime($&)/e' /var/log/squid/access.log | grep -i $1 | awk '{ print $1" "$3"-"$2"-"$5" "$4" "$7" "$11}' >> $1.log

Gives the result set in URL.log

Friday, August 8, 2008

Sco binaries on opensuse 11.0

I've got my sco coff files to run on opensuse 11.0 using ibcs-3.7

Yehaw!!