Category: Computers

How to extract uniq IPs from apache via grep, cut, and uniq

By , 2010-01-10 19:35

grep ‘Googlebot’ access.log | cut -d' ' -f1 | sort | uniq

Fantastic little command.

via » How to extract uniq IPs from apache via grep, cut, and uniq Dan Collis-Puro.

Novatel U998 turbo stick on Ubuntu

By , 2010-01-07 12:54

http://www.linuxquestions.org/questions/linux-newbie-8/how-do-you-properly-install-a-novatel-turbo-stick-usb-modem-773492/

I used Network MAnager “Mobile Broadband” and entered the APN (“inet.bell.ca”) instead.

These are the important steps:

Step 1:
Connecting the device, it starts as a usb-storage device but at this point the device has the idVendor: 0x1410 and idProduct: 0x5010, Ubuntu recognizes and mounts the device automatically and puts the icon on the desktop

Step 2:
Right-click on the mounted icon named “Mobile Connect” and select Eject, now the device will change its idProduct id from 0x5010 to the more re-assuring 0x7030 but somehow Ubuntu doesn’t know it’s supposed to be a usbserial device…

Step 3:
sudo rmmod usbserial
sudo modprobe usbserial vendor=0x1410 product=0x7030
and /dev/ttyUSB0, /dev/ttyUSB1 etc.. up to /dev/ttyUSB5 should appear on your file system.

No wireless networks and no IP detected on Windows

By , 2009-12-22 10:42

Today I booted up my Windows Server 2003 laptop. All seemed OK, but I couldn’t get an IP address on my wired connection and my wireless card didn’t detect any APs. I thought i would have to reimage my machine, but a quick google brought up this page:

Tech Support Guy Forums – View Single Post – Solved: Wireless networks detected – no wireless networks found.

In a command prompt window,
Reset TCP/IP stack to installation defaults, type: netsh int ip reset reset.log

Reset WINSOCK entries to installation defaults, type: netsh winsock reset catalog

And it works!

Converting Adium XML chat logs to HTML format

By , 2009-12-18 11:39

http://trac.adium.im/ticket/6569

XSLT could be used to transform the .chatlog files to HTML. Attached is an XSLT stylesheet that I have written to do this. The libxslt library is present on all versions of Mac OS X since 10.2, and its command-line tool can be invoked in a sub-shell using system(3):

xsltproc -o 'foobar (2007-03-08T09.19.11-0700).html' format-html.xsl \
            'foobar (2007-03-08T09.19.11-0700).chatlog'

Rooting the PBX

By , 2009-12-14 21:44

My home PBX was installed and working well. However, today I discovered that my VoIP provider started blocking outgoing calls from the Asterisk user agent. The fix is to edit /etc/asterisk/sip.conf and change the useragent line. However, the distro I chose was very much a PBX appliance. No SSH, no shell, only Web UI access. But, I knew it was a Linux box, probably CentOS or RHEL based. So i decided I’d try my hand at retaking control of the system.

First step was to boot into single-user mode. This was quite easy. Just interrupt GRUB and add “single” to the kernel options.

Once at the shell prompt, you might want to add a regular user.

adduser matt

Then, try changing the root password.

passwd root

Unfortunately this does not work. It fails with “Authentication Token Manipulation Error”. To fix this, use pwconv. (Thanks to mohammedz)

Then try passwd root again, it should work this time.

Next, enable ssh. Run chkconfig sshd on.

Now, edit /etc/asterisk/sip.conf and change the useragent. 🙂

Windows Vista

By , 2009-12-02 16:42

I’d forgotten how much Vista sucks… I waited through over 45 minutes of “Preparing you computer” and “Installing software” and “Measuring your computer’s performance” for this?

Well, I suppose there is the spiffy sidebar and flip 3D……

WindowsVista

Or, to be more accurate, I forgot how much garbage OEMs put on your brand new PC. *cough* HPToshibaDell.

OOH COOL! McAfee, Norton, Windows Live OneCare AND ZoneAlarm! Now my computer is quadruple-protected!
But wait, there’s more you say? A copy of Microsoft Works AND a FREE trial of Microsoft Office? and AOL, Yahoo! and Google toolbars, each with pop-up blocking? AWESOME!

-_-

Tim Hortons uses LINUX

By , 2009-11-28 15:16

Early this morning I was at Tim Hortons. I had the opportunity to see this:

Tim Hortons uses LINUX!

tim hortons uses linux on Flickr – Photo Sharing!.

Ultimate NVIDIA® ION™ Netbook Bundle Contest

By , 2009-11-27 14:02

Ultimate NVIDIA® ION™ Netbook Bundle Contest.

My friend Alex Laplante was one of the winners of the NVIDIA ION netbook contest. Congratulations Alex!

System failures à go go

By , 2009-11-26 22:41

Today was quite the day. As the title says, systems were failing all over the place. Our main switch at work (a Cisco 6509) crashed about 3 times this week, causing our vSphere environment to crash repeatedly, taking all the guest VMs with it. We searched for a long while before discovering that a faulty UPS battery was to blame for the switch’s instability. Meanwhile, we’re left with a misconfigured iSCSI SAN and 3 ESX hosts with no storage.

At home, my crazy MythTV/OpenVZ/KVM/PBX/Windows 2003/Seedbox/RADIUS server had to be shut down when my home network started acting up. DHCP stopped working, and the machines that were left had difficulty pinging each other. This time, a Cisco device was to blame. A WRT610N router that I use as an ABGN Access-point running DD-WRT had somehow bricked itself and started broadcasting packets on the network, thus flooding my routers and other computers. Then, I tried booting up my server again. MythTV and OpenVZ started up OK, but the qemu-server/kvm machines didn’t start, throwing “can’t open lock for VM 107 ‘/var/lock/qemu-server/lock-107.conf’ – No such file or directory”. Weird error. The fix is to create the /var/lock/qemu-server folder.

And finally, everything at home is up and running again. We’ll see tomorrow morning how things go at work. David was staying late today on the phone with Dell EqualLogic specialists, so fingers crossed!

Dirty, dirty PCs: The X-rated picture guide • The Register

By , 2009-11-25 11:54

Dirty, dirty PCs: The X-rated picture guide • The Register.

I feel much better about my PC now.

Custom theme by me. Based on Panorama by Themocracy