Menu

  • Home

  • Forums

  • Adamsinfo Blog




  • [Valid RSS]

    Latest Blog Postings at adamsinfo

    UDP Tunneling to avoid hotspot or firewall restrictions

    netfilter/iptables split access with multiple ISPs

    Linux LUKS Crypt HOWTO

    Linux Controlled Door Entry

    PHP Security

    Website Security Scan

    Linux Consultant - Server Management, Basic Housekeeping

    SSHing from a compromised machine

    PHP Programmer - Logical Operators

    PHP Programmer - Numeric Shorthand

    PHP Programmer - Reading from files

    PHP Programmer - strlen, count and substr

    PHP Programmer - strpos, finding the position of a word in a string

    PHP Developer - Serialize

    PHP Developer - Loops in General

    Full NAT, DNAT and SNAT aka 1:1 NAT, 1 to 1 NAT

    UK VPN Hosting

    Freelance PHP Programmer - Managing Estimates

    String replacement with sed

    PHP Developer - Looping through database results

    Easy Reverse Engineering

    Move Xen Guest from loopback filesystem to LVM

    Setting up an LVM filesystem

    Installing and Configuring Xen with guests

    dd progress update

    Xen, LVM and friends

    Copy/Export MySQL User Priviledges

    Linux Consultant - How to recover a compromised server

    Recursive FTP/HTTP Download

    New Rapidswitch Server

    BASH Script - Blank Out CC Details

    Hosting - Users too quick to judge?

    Embedded Linux Programmer

    PHP Programmer - Modulo Operator

    UK VPS

    Hosting

    Linux C setuid setgid tutorial

    Linux Security Freelancer - Securing a node - Where to start?

    Linux Consultant - Disk Speed

    Security Consultant - Man In The Middle Attacks (MITM)

    Self Signed Certificates

    Security Consultant - London Site Visits

    Security Consultant - Scope of work

    Contact Me

    PHP MySQL Developer - A Freelancer in London

    PHP MySQL Developer - Using MySQLi Prepared Statements to Avoid SQL Injection

    Blog fork()s some children

    Shrinking/Resizing ext3 Partitions

    Installing Linux on the Embedded PPC50 Touchscreen

    How to Find and Replace data in MySQL

    Looking for a New Linux Project

    Multithreaded Tunnel Proxy and OpenVPN experiment

    Linux - Exim, Avenger and SpamAssassin Tips

    Linux Color Directory Listings

    Web Application Security Consultant Methodology

    What is my IP?

    Good UK VPS Provider?

    Security Consultant - Ports & Port Knocking

    Shell Return Codes - Ping Monitoring

    Security Consultant - PHP Developer - SQL Injection Attacks

    Security Consultant - PHP Developer - Exploiting Common PHP Code Flaws

    Multithreaded Multi-Connection TCP Proxy Tunnel Update

    Security Consultant

    Security Consultant - Basic NMAP Usage

    Linux NAT Masquerading HOWTO

    Multithreaded TCP Proxy Tunnel Code

    PHP Developer - PHP Sessions

    Using the Phidget Interface Kit under Linux

    Multithreaded TCP Proxy Tunnel

    The Linux Robot - In hindsight

    The Linux Robot - Dancing Beat Recognition

    brctl: Creating a network bridge

    cPanel rebuild all DNS zones

    at, batch scheduling

    Simple text sorting

    shPanel - the Linux System and Hosting Control Panel

    Creating an MD5 on Linux with md5sum

    Admin Management System

    An idea - cPanel like host management

    htop - top on steroids

    Copy files securely from host to host with SCP

    Linux SCREEN Command

    Linux DHCP Server

    Simple MySQL Developer Intro

    umount: device is busy

    How to create a simple disk image formatted to ext3

    Linux piping and redirecting stdin stderr stdout

    BASH Shell Scripting - Sort a string alphabetically

    Linux Command History

    Linux diff and patch

    bc - Linux command line calculator

    How to upgrade from Debian Etch to Lenny

    Local and Remote Kernel Upgrades - Failsafe Grub

    Linux and the Huawei HSDPA 3G E220 modem for mobile broadband

    Linux PPTP (Poptop) VPN Setup with MPPE and MPPC

    Linux Squid Transparent Proxy

    A Beginner's Guide to Object Oriented Programming (OOP) in PHP5 - Classes, Objects and Methods

    DNS based Load Balancing

    How to reset forgotton MySQL root password

    How to recover your Linux root password

    How to remove the tray icon from VNC (RealVNC) with XN Resource Editor

    Linux IP Address Configuration Static or DHCP

    Blackberry Bold - Today Theme

    A rudimentary PHP POP3 example

    PHP - fsockopen, TCP and UDP

    PHP - Ternary Operator

    The Linux Robot - Progress, Software & a Video

    Simple POP3 Communication HOWTO

    Linksys WRT54G Serial Console

    A BIND9 zonefile and commentary

    Debian Lovers - Why I love Voyage Linux

    The Robot - Progress and a Video

    The Robot: Hardware working and ready to go, a few minor glitches

    Using distcc for distributed compiling on an alix 3c2

    The Robot: Independant, moving, talking, and controlled via WiFi

    Linux: AVIT Research USB to TTL Cable

    Some simple filtering and sniffing with tcpdump

    The Robot: Base, Wheels, Motors, and Sabertooth Motor Controllers

    The Robot: A body, Sensors and Good Progress

    The Robot: More good progress

    The Robot: Phidgets USB Interface Board Kit works

    Linuxuk.org - A good resource

    The Robot: Successful installation of Debian onto the Alix 3c2 board

    Robot Update

    rsync over SSH, SSH key login, public keys, automated backups

    mknod tutorial

    Linux on a Mikrotik 532a , Part 5 Final - OpenWRT and Custom Scripts

    Robot: Initial Hardware Order [rev 2]

    Help Debian, today's Linux news.

    Linux on a Mikrotik 532a, Part 4 - Customization, Debian Scripts, Shaping, Firewall, NAT, picoLCD

    The Robot: Hardware List, Wheel Plan, More Ideas, Steps to launch

    Robot

    Linux Robot, more hardware ideas

    Linux Robot - Watch this space

    Diffie-Hellman Key Exchange

    True Infrastructure On Demand

    PHP MySQL Developer

    PHP, MySQL, Apache2 install HOWTO on Debian

    APNIC Box - Linux on a Mikrotik 532a, Part 3 - Installing Debian, Prebuilt Disk Image

    APNIC Box - Linux on a Mikrotik 532a, Part 2 - Hardware Modifications

    APNIC Box - Linux on a Mikrotik 532a, Part 1 - The Device

    Linux Consultant

    Playing poker on Linux

    DNS Hijacking, ISP Packet Modification, Morals and Privacy

    The Legality of Peer to peer software

    APNIC Box

    Linux Benchmark, IO statistics and system statistics with dstat

    Thoughts on "Google denies disassembling Vista code for Chrome"

    Great news for adamsinfo.com

    95th percentile billing explaination

    Wireless Hacking, Problems with WEP, Wireless Security and WPA

    Adam's Custom Kernel

    Going Green, PC Hibernation, Saving Money & Common Sense

    NetCat tutorial for Linux & Windows, HOWTO, nc

    Using picolcd on linux, lcdproc, routerboard, liblcdusb

    Quick Linux and Windows OpenVPN HOWTO and tutorial, including VPN routing

    Linux virtualization, vmware, xen, hosting, and squeezing the most out of your resources

    Extending tc and iproute2. Linux routing split access multiple uplinks multiple isps iptables masquerading

    VMware Time Problems

    Resume & Portfolio

    Bandwidth Limiting HOWTO with linux, tc and iproute2

    Exim, MySQL, Courier IMAP, Courier POP3 & Spamassassin - vdomain and vuser set up.

    LAMP Optimization

    Split access SSH problems

    Custom linux router, routing, split access and more..

    Custom linux router, the story..

    Linux device names & mounting

    Hello world!

    Draw Amazing Graphics & Backgrounds Online with Escape Motion

    In case if your want to make amazing backgrounds using light, fire, neon etc then here are few tools for you to do that. For example the picture on the right was made using the flame tool by escape motion. [...] Continue Reading : Draw Amazing Graphics & Backgrounds Online with Escape Motion. © [...] Related posts:Create Amazing Looking Graphics for your Band, Clan, Creed, Modern Art Amazing Software with Artificial Intelligence – Design, Draw the Impossible Convert Your Photos into Amazing Looking Paintings Online

    Posted on 13 March 2010 | 6:57 am

    A surprising lack: milter clients

    A surprising lack: milter clients

    There's a lot of anti-spam programs and systems, so I'm generally accustomed to being able to find a package to do pretty much any anti-spam job that I want to get done. Which is why I'm all the more surprised that it seems to be impossible to find milter clients or client libraries.

    The milter protocol started out as a Sendmail specific interface, but today they've become essentially the generic way to connect MTAs with various anti-spam filters and services. You can get milter server implementations for lots of languages, including Perl, Python, and Ruby, and people happily write milters in all of them; what you can't seem to get is the other side, the MTA client side, something that will let you talk to milter filters.

    On the surface, this sounds like a strange thing to want. But as I mentioned, the milter interface has become the generic way to talk to spam-filtering services and there are a number of times when you want to check messages without having to shove them through an MTA; for example, if you have a webmail system it might be nice to be able to run anti-spam checks on a message when a user hits the 'send mail' button and then take specific action within your web application if alarms go off (especially these days).

    Also, not all MTAs have built-in milter support but almost every MTA can run external programs during message submission, and writing an external program that just talks to a milter is much simpler (and more maintainable) than hacking milter support into the MTA directly. Well, it would be simpler if there were milter clients or client libraries, especially for scripting languages like Perl, Python, or Ruby.

    (As it is, I have a low priority project of someday going through the milter protocol (via pmilter), and probably the Python milter stuff, to write a milter client module in Python. Then I can write something to connect Exim's content scanning to milter filters.)

    (PS: I'm aware that there is a 2006 patch to add milter support to Exim. Sadly, it doesn't seem to have gone anywhere since 2006, and I can't even find a way to get the source code any more.)

    Posted on 13 March 2010 | 6:49 am

    IE Tab 2 Embed Internet Explorer Extension for Firefox

    IE Tab is popular extension for Firefox that could be used to embed internet Explorer into Firefox. This extension helps the Firefox to opening the compatible websites withing Firefox. you don't need to switch to internet explorer. Web developer need to see the verification of opening the websites in internet explorer for bugs.

    IE Tab is particular designed display pages within the Firefox. As you can see the menu in your right side, Shown the tab of Open Link in IE Tab. It will open the Page in next tab and shows the same results like Internet Explorer. It is very powerful extension. I am also using this extension for checking my projects.



    Another addition, If you notice that , if you opened the Window update page in Firefox It demands for the Internet Explorer , So, this IE Tab provided you the solution within the Firefox. As you can see the preview below, Window update page is opened below.


    There was one limitation for installation of IE Tab, Developer has not been updated the version of IE tab for Compatible with Firefox 3.6 later version.

    Today, They have launched the new version of IE Tab for Firefox 3.6 +. They added the new features and enhancements.

    Developer promised to keep it up-to-date and add new features, you can directly download the IE Tab click here

    Posted on 13 March 2010 | 2:53 am

    Multiple Photo Resizer BatchBlitz

    Might be You use many photoeditor for resized the individual pictures. There is very hard for web developer and blogger to customize each picture again and again. Photo Rezier is easy and better choice for rezied multiple photos. SunlitGreen BatchBlitz is a free, powerful and easy-to-use photo categorize, file filter and batch editor.

    This app lets you categorize your photos by tags (Exif or IPTC metadata). This app provide you more detail and give freedom of instance name , location and regular expression filters. You can choose yourself while overwrite the photos or saved in the new locations.

    Features of SunlitGreen BatchBlitz
    Simple and intuitive user interface Extensive support for regular expression Exif and IPTC metadata accessible through macros Highly customizable batch actions Savable batch task Instant previewDownload SunlitGreen BatchBlitz

    Posted on 13 March 2010 | 2:36 am

    LXC: IPv6? Yes!

    Following up to yesterday's post on LXC: Linux Containers, I had a quick play with 2 ULA subnets (aka RFC4193 addresses - dont forget that site-local was depreciated) - one subnet was dedicated to the LXC containers, one for my normal LAN. Perhaps unsurprisingly IPv6 appears to work perfectly well in this setup.

    I also altered the setup and bridged a container directly to eth0 on the host node, and watched the container assign itself a stateless address based on my prefix, and again everything appeared to work perfectly well out onto the public v6 network (courtesy of Hurricane Electric's Tunnel Broker service).

    So all in all I'd say that LXC is looking pretty good so far. There are a few other things I'd like to test, like how effective iptables are in the context of containers, and whether or not it is secure enough. Unfortunately I'm not going to have time to play with these things this weekend really. Answers on a postcard to the usual address if you already know though!

    Posted on 13 March 2010 | 12:16 am

    gThumb Finally Gets Flickr Support (Latest Build Is Available In The WebUpd8 PPA)




    Today seems to be a very good day for GNOME photo managers. After Shotwell 0.5 release, gThumb got a really nice extension which many of you I'm sure have been waiting for. Read on!


    The gThumb development is getting more and more interesting (if you constantly read WebUpd8, you already know about the great progress gThumb is making) and after getting PicasaWeb support about a month ago, a branch called "flickr" (well, actually "flicker" but that's a typo by the developers) has been merged, meaning gThumb will finally get Flickr support. We couldn't resist so we updated the package in our PPA to the latest GIT so you (and us) can enjoy this cool new feature.

    gThumb 2.11.2.1 now also has a brand new "export-to-disk" extension which allows you to export photos to your CD/DVD-RW; basically gThumb is getting new features every day. Other older changes include a "convert format", a "change date" and "resize image" tools and a lot of other new features and plugins.





    To enable the new Flickr plugin (after installing the latest gThumb photo manager 2.11.2.1-git - see below), go to Edit > Extensions, then check the "Flickr" extension. Then select a photo or multiple photos and go to File > Export to > Flickr. Unfortunately, Flickr import is not supported (well, for now anyway).



    Install the latest gThumb (from GIT as of March 12, 2010) in Ubuntu Karmic and Lucid
    Before installing, please remember that the WebUpd8 PPA publishes some experimental packages (from GIT, SVN, etc.) like VLC 1.1.0, Murrine GTK engine from GIT (to support the latest "Light" Ubuntu themes - by the way, we also have those in our PPA for Karmic and Jaunty, constantly updated and in sync with their release in Lucid!) so check out all our packages before proceeding.

    To add the WebUpd8 PPA to your sources.list, simply paste the following command in a terminal:
    sudo add-apt-repository ppa:nilarimogard/webupd8

    Then to install the latest gThumb in Ubuntu:
    sudo apt-get update && sudo apt-get install gthumb© www.webupd8.org 2009-2010. | What's New on the World Wide Web

    Posted on 12 March 2010 | 10:34 pm

    Shotwell 0.5 (Gnome Photo Manager) Has Been Released




    Just 3 days ago we were telling you that Shotwell (a photo manager for the GNOME desktop) 0.5 will be released soon and now Shotwell 0.5 is available for Ubuntu users in it's official PPA. No news on it's website, but probably it will be updated soon.


    Shotwell 0.5 new features:
    Picasa Web publishing
    Tags as another way of organizing your collectionPrintingAdjust photos dates and times, both to a single moment and shifting several forward and backward in timemore!
    To install Shotwell 0.5 final in Ubuntu (Karmic or Lucid), add the following PPA:

    sudo add-apt-repository ppa:yorba/ppa
    And then install Shotwell 0.5:
    sudo apt-get update && sudo apt-get install shotwell

    © www.webupd8.org 2009-2010. | What's New on the World Wide Web

    Posted on 12 March 2010 | 8:40 pm

    Python Migration Utility for xend Virtual Machines to XCP

    A new python based migration utility for migrating your xend virtual machines to XCP  is now available at: http://www.xen.org/products/cloud_projects.html It can generate XVAs from your xend based HVM and paravirtualised virtual machines. It can also steam your VM directly to a XenServer/XCP host over HTTP or HTTPS. Please read the README for pointers and guidelines on how to [...]

    Posted on 12 March 2010 | 6:49 pm

    SeeSaw TV trials get rave reviews

    Initial feedback on the beta tests of the SeeSaw TV-on-demand platform has been largely positive. The service offers content from BBC Worldwide, Channel 4 and Five for free, though nothing from ITV at the moment. The site began sending out invites for its beta test at the end of January. “The streaming quality is better than Sky Player with no buffering problems so far,” said one tester writing on the Digital Spy forums.

    However, visitors to the TVForum.co.uk site weren’t enamoured with the name. “I don’t suppose there’s any chance of us having enough influence to cause a rethink of the name. It sounds like a programme you’d find on CBeebies,” wrote one forum member. SeeSaw is compatible with Windows, Mac and Linux systems and only requires an up-to-date browser with Adobe’s Flash Player version 10 installed to run. You can sign up to take part in the beta tests on the SeeSaw website.
    www.seesaw.com
    www.digitalspy.co.uk


    Source of Information : WebUser February 11 2010

    Posted on 12 March 2010 | 6:24 pm

    Xen Cloud Platform (XCP) Repositories Available on xen-unstable

    From Vincent Hanquez on xen-devel: I’m please to announce the availability of repositories [1,2] for the xen cloud platform tools [3] on xen-unstable. The goal of these repositories is to make compilation of the XCP platform toolstack: “easier” than in the current form. available with bleeding edge xen (and also libxenlight). integrate with any distributions (potentially creating debian/redhat/etc packages) Dependencies you [...]

    Posted on 12 March 2010 | 6:04 pm

    X2go - Open source terminal server project (alternative to FreeNX)



    x2go is an open source terminal server project offering a comprehensive “server based computing” solution. Combining the advantages of existing systems it features ease of use, ...Full Article

    Posted on 12 March 2010 | 3:18 pm

    Ubuntu as project in Google Summer of Code 2010

    I’m very excited to announce that Ubuntu has applied as participating organisation in the Google Summer of Code 2010!

    We submitted an organisational application, along with suggested ideas for potential projects for students. We also encourage students to come up with their own ideas.

    If you’re a student interested in Open Source (or if you know students who are), now is the ...Full Article

    Posted on 12 March 2010 | 12:40 pm

    Install/Configure SSH in Linux

    Tutorial is here.

    MMA

    Posted on 12 March 2010 | 4:18 am

    Perfect Home Page for your Browser FAV4 or FastDial ?

    Ever thought what a perfect browser homepage would look like ? FAV4 has gained a lot of popularity, for its unique feature providing 4 quick links to your most needed sites. [...] Continue Reading : Perfect Home Page for your Browser FAV4 or FastDial ?. © Debajyoti Das for Snaphow.Com Blog. | Permalink | Post Comment [...] Related posts:Check What Most of your Site Visitors See with Google Browser Size How to Stop Loading Images / Pictures in your Browser ? Take Full Page Screenshots of Blogs & Websites or URLs

    Posted on 12 March 2010 | 3:30 am

    BT’s super-fast products criticized

    BT’s download limits for its new fibre-optic broadband services have drawn fire from consumers. Visitors to the Webuser.co.uk site were unimpressed with the 20GB permonth limit on Option 1 of BT’s Infinity broadband package, which offers download speeds of up to 40Mbps and upload speeds of 2Mbps. “They offer amazing speed and then restrict how much you can use it. I wonder what happens if you go over the 20GB. Does it cut you off, slow you to a dial-up speed or put a penalty fee on your next bill?” wrote one visitor to Webuser.co.uk. Option 1 costs £19.99 per month on an 18-month contract, with a £50 set-up fee. There is no set-up fee for Option 2, which costs £24.99 per month, offers the same download speeds with upload speeds of up to 10Mbps and comes with no download limit, though a fair-usage agreement does apply. BT Infinity products are currently only available in areas where BT has deployed fibre-optic technology. Find out whether you can get the service by using a postcode checker on BT’s site. www.bt.com/infinity


    Source of Information : WebUser February 11 2010

    Posted on 11 March 2010 | 6:20 pm

    Laptop charges only when it’s off

    I came across a new problem, and this time the subject was a laptop. My mission was to repair an ACER Travelmate 2200 laptop that wouldn’t charge and run on AC power. It would run fine on battery, but when you plug in the AC adapter, it does nothing. It keeps running on battery power. The problem gets weird when you [...]

    Posted on 11 March 2010 | 11:02 am

    Twitter have Finally Added Some Security to its Links

    Recently, we warned all the Twitter users about the new scams which were about to hit them : All Twitter Users Be-Aware! Your Account Might be Hacked!. These scams have done a lot of damage to most of the Twitter users! So, to prevent these kinds of attacks, Twitter have introduced a new link scanning strategy! Related Posts All Twitter Users Be-Aware! Your Account Might be Hacked! Twitter : How Many Unfaithful People are You Following? TechHamlet Forums :Latest Forum Topics (25th of February 2010) Facebook to Twitter TechHamlet Forums :Latest Forum Topics (9th of March 2010)

    Posted on 11 March 2010 | 10:24 am

    Force download files using php

    Hello guys here is a simple yet powerful script that allows you guys to force the users download some files with the dialog box Do you want to open or save the file, just copy paste the script below. <?php header(”Content-type:application/octect-stream”); header(’Content-Disposition: attachment; filename=Test_Download_For_’ . date(’Y-m-d’) . ‘.txt’); print “This is the file you downloaded, Its easy rgt [...] Related posts:“Header already sent” in php error and other use of Header function in PHPHow to get your deleted files back using google desktop?Simple Calendar Script Using Javascript

    Posted on 10 March 2010 | 8:28 pm

    Password protect pages using javascript

    Hello guys here is a simple code on how to password protect a webpage using  javascript.This is not a good idea coz it is not at all secure.But simply just like that a webpage which is protected using simple javascript is fun. <script type=“text/javascript”> function passWord() { var testV = 1; var pass1 = prompt(’Please Enter Your [...] Related posts:Check password strength using javascriptDOM elements dynamically using our JAVASCRIPTWords Validation with Javascript

    Posted on 10 March 2010 | 6:54 pm

    Austin Texas - Linux Against Poverty 2010

    It's spring time in Texas.

    The Bluebonnets are fixin' to get ready to bloom, today's temperature is going to be around 80 degrees Fahrenheit and a solid date for the second annual Linux Against Poverty is, with a fair amount of certainty... official.

    June 19th, 2010.

    While we had planned a May event, that date has been changed...read further for us to 'splain.

    For those who may not know what we do, The HeliOS Project takes donated P4 computers, refurbishes or repairs them and then gives them to Austin or Central Texas kids who normally would not be able to afford one.  Linux Against Poverty is an annual event put together by Lynn Bender in order to collect those computers while members of the Austin Tech Community gather to repair and prepare them to be given away.


    We had initially planned a May event but with South By South West happening within that 90 day window, we thought it would be a good idea to let both events have some breathing room.

    With the Upcoming Texas Linux Fest, it's going to be a busy spring in Austin Texas.  Hopefully, we'll be meeting with Robbie Williamson of Canonical on these pages to talk more about that event in particular in the next week or so..

    But for now, let's talk about Linux Against Poverty.

    Lynn Bender, founder of geekaustin.org  and the organizational force behind LAP, called me last night to talk about how this year will be different.

    We had a fair amount of corporate involvement last year.  Many companies donated their decommissioned computers and sundry hardware components, however we didn't see the participation we had hoped for.  Individual donations and drop-offs carried the day.  We gained just over 200 placeable computers by the time the day ended.  Those computers were gone by November that same year.

    This year, we think and hope we might be able to increase that participation.

    With several companies already showing an interest in offering prizes, Lynn has begun to put together a prize drawing to entice equipment donations.  Each computer donated will enter the donor into a drawing at the end of the day and winners will be awarded prizes from the participating businesses. Businesses who donate computers can give their drawing tickets to their employees if they wish to do so.  We have yet to firm up those prizes and companies so watch this blog or the facebook page for LAP for details.

    Many of the people who volunteer for Linux Against Poverty work at large corporations that may have a back room full of these decommissioned computers just waiting for Goodwill or the scrap yard.  You can see our specific needs on our website. If you work for such a company, please let them know that we will put these computers and equipment to good use and their donations are tax deductible.  Oh and again...we cannot accept CRT monitors any more...the liability and storage costs just won't allow it.

    While Union Park is almost certainly available for us as a venue this year, there are a number of other businesses and places that have shown an interest in hosting the event for us.  Lynn will announce the location for Linux Against Poverty 2010 when it is decided and I will pass it along to you via this blog as soon as it is known.

    Other Bid'ness

    While we were able to obtain permission from The Cristo Rey Catholic Church to name our computer learning center after Bruno Knaapen we have not yet been able to raise the funds for the brass plaque for that room.  Unfortunately, response from Bruno's community has not been very good so I thought I would come here to mention it.  If you would like to help us purchase this plaque, you can do so here.

    AND...we are in need of a small flatbed scanner for our operations.  With funding being as tight as it is, we've not been able to allocate the money to buy one so if you have one laying around, we sure could use it.  If I had a wishlist to write to, I would hope that it would be USB-powered.  We don't need anything powerful as much as we need it compact...our administrative space is small.

    We are also humbled to be named as a nominee for the Dewey Winburne Community Service Award.  The party and ceremony will be held at 6 PM on March 15th at Sholtz Garden in Austin during the SXSW Interactive portion of SXSW.  Dewey Winburne was the PowerSource behind SXSW Interactive.

    May God rest him.

    Volunteer sign-up for LAP 2010 is doing extremely well and I want to thank those who are returning for the second event.  I appreciate you more than you know...especially when I know YOU know just how much work last year was.  We hope to streamline some of that this year and make it that much smoother.

    Stay Tooned...

    All-Righty Then
    .

    Posted on 10 March 2010 | 1:17 pm

    openSUSE 11.3 M3 available for download

    Details here.

    MMA

    Posted on 10 March 2010 | 4:32 am

    Google - the Evil Empire?

    According to this video, which portrays Google as being an evil empire, Google serves over 1 billion search results daily from over 450,000 servers, is valued at $200 billion, and has the motto "Do no evil". The video does a good job at shedding light on Google's reach into almost everything. As evil as Google may be, they sure have created some amazing tools and opened up a lot of doors for small business around the world by connecting them with customers through Adsense and search results. What may be unsettling though, is Google's CEO saying, "If you have something that you don't want anyone to know, maybe you shouldn't be doing it in the first place" (See second video). Even though he's right, because of the Patriot Act, Google is legally bound to provide the government with information on their servers. That's probably the real source of the evil if there is any.





    Posted on 9 March 2010 | 5:29 pm

    Fedora 13 Alpha Now Available, What are the features??


    "The Fedora 13 'Goddard' alpha release is Now available.  Now it supports automatic Printer Installation, You can Plug and Play your USB Printers in Fedora 13. It supports  automatic installation of language packs; redesigned user management interface; color management to better set and control your colors for displays, printers, and scanners; NetworkManager improvements include Command Line Interface; experimental 3D extended to free Nouveau driver for NVIDIA cards." Firefox 3.6.1 included. Linux kernel 2.6.32, Greater suport for webcams. Fedora 13 alpha comes with KDE 4.4.

    Download Fedora 13

    Posted on 9 March 2010 | 5:10 pm

    How to Monitor Process on Linux using pidstat

    The pidstat command is used for monitoring individual tasks currently being managed by the Linux kernel. It writes to standard output activities for every task selected with option -p or for every task managed by the Linux kernel if option -p ALL has been used. Not selecting any tasks is equivalent to specifying -p ALL but only active tasks (tasks with non-zero statistics values) will appear in

    Posted on 9 March 2010 | 5:19 am

    Links/Online Guides/Forums for top Linux Distro's

    Here is a huge list of Links/Online Guides/Forums for Linux, These are mainly Official Links which you can find on the respective site========================================== General Linux Guides/LinksThe Linux Documentation Project : – The Linux Documentation Project How-To : – Index of /pub/Linux/docs/HOWTO/other-formats/html Easy Linux : – Main Page - HowtoForge : – HowtoForge – Linux

    Posted on 8 March 2010 | 5:22 am

    Virtual Consoles / Terminals in Ubuntu / Debian Linux

    If you have not configured Ubuntu /Debian  automatically start a graphical environment during startup. If you want to kill a process from a hanged graphical environment, you need to open a virtual console or virtual terminal.
    How to start a Virtual Consoles /  Terminals in ubuntu / Debian
    Just press the following Keys

    Alt+Ctrl+F1 (F1 to F6) . Using F1 to F6 You can open 6 Virtual Terminals.

    this will ask for
    ubuntu 9.10 abc-Desktop tty1 abc-Desktop login:
    Now you can enter your username and password
    Return to Graphical Screen by Pressing

    Alt+Ctrl+F7

    Posted on 7 March 2010 | 5:10 pm

    Change Ubuntu Login Screen

    One of the joys of using Ubuntu is the ability to easily customize even the most obscure features of the operating system and the login screen included with the default GDM theme is no exception. As with most light Linux tweaks, this one is quite straight-forward. There is a utility included with Ubuntu that allows quick [...]

    Posted on 7 March 2010 | 2:12 pm

    The battle of the browsers, part 2

    Not too long ago I wrote a post about the most popular operating systems and browsers on the Internet (read here). I quoted statistics from the w3schools Web site, which gave Firefox the number one spot among all browsers. They collected data for over 5 years and came to this conclusion. Internet Explorer (6, 7 and [...]

    Posted on 7 March 2010 | 3:24 am

    Collapsible Menu with jQuery

    To begin with we need to make a menu, which I've just done a quick temporary 5 items in mine using the HTML lists tags. <pre class="brush:plain;">&lt;menutitle&gt;Main&lt;/menutitle&gt; &lt;ul id=&quot;menu&quot;&gt; &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Item 1&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Item 2&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Item 3&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Item 4&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Item 5&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;</pre> Then in the header of your page, you will need to call your jQuery file. <pre class="brush:plain;">&lt;script type=&quot;text/javascript&quot; src=&quot;jquery.js&quot;&gt;&lt;/script&gt;</pre> Now beneath the line where you're calling your jQuery from, you will need to write some more JavaScript to tell the document to run the later bit of code when the document has loaded. <pre class="brush:jscript;">&lt;script type=&quot;text/javascript&quot;&gt; $(document).ready(function(){ }); &lt;/script&gt;</pre> Now the document is ready for your jQuery code, we need to tell it that when the "title" bit of the menu (which we've tagged as &lt;menutitle&gt;) is clicked, it should slide it closed. <pre class="brush:jscript;">&lt;script type=&quot;text/javascript&quot;&gt; $(document).ready(function(){ $(&quot;menutitle&quot;).click(function () { $(&quot;#menu&quot;).slideToggle(&quot;slow&quot;); }); }); &lt;/script&gt;</pre> The above code will toggle the sliding action of anything we've put <em>id=&quot;menu&quot;</em> on, which is why we've put it on the &lt;ul&gt; bit. Now with everything put together and saved, you should have a menu that toggles closed and open when you press the top bit, which in my example is &quot;Main&quot; <strong>Please Note</strong><br />Please note though, that this is just an example of doing a menu that can open and close. You can use a cookie to saved if you've closed the menu so that when you refresh the page it stays closed or you can style the menu nicely with CSS. You can also use this method for anything if you wanted from showing and hiding an image, paragraphs, forms, buttons, flash applications, etc... You can get hold of the latest copy of jQuery from the <a href="http://jquery.com/" title="jQuery: The Write Less, Do More, JavaScript Library">jQuery website</a>.

    Posted on 6 March 2010 | 11:44 pm

    Setting up nginx as reverse proxy on Linux Centos 5.2 (and Plesk 9)

    Following my blog article on optimizing your web server by using nginx and memcached, I'll now detail the first step: setting up nginx as reverse proxy on your server. This is going to be a bit tricky, and you'll be getting your hands dirty, so be warned.

    What does this consist in?
    Well basically, your website will be served by two daemons: nginx for the static content (images, js, css, html...) and Apache for the dynamic content. Nginx will be listening on port 80, will serve static content to visitors, and redirect any dynamic data query to Apache, running on another port -- in our case we'll be using port 8080.

    What is nginx?
    Nginx is a lightweight open-source http daemon (http server). It is said to be extremely fast, a lot more than Apache, and I have to admit by personal experience this seems to be very true. Using nginx for serving static content dramatically improved the speed of my high traffic website. Actually, some major websites such as Wordpress.com, *cough* Youporn.com, use nginx exclusively for serving web content.

    Major issues
    This configuration is a bit tricky and can be difficult to achieve particularly if you have numerous domains & subdomains. There are several issues with this configuration:
    1) I happen to be using Plesk 9 (admin control panel) for easy domain & subdomain management. Unfortunately it doesn't seem to be compatible with nginx at the moment, it only works with Apache. So we'll run into a few problems very soon.
    2) We'll have to work out the configuration files manually (including vhosts - virtual hosts configurations)  so be careful about what you're doing or you might run into annoying problems.
    3) Plesk rebuilds the virtual hosts configuration files every time you make the slightest change in the web configuration.

    Step 1: download and install nginx
    nginx requires the PCRE library. If it's not installed on your system, run the following command:
    # yum install pcre# yum install pcre-develTry these libraries aswell just in case they aren't on your system already:
    # yum install zlib# yum install openssl# yum install openssl-devel# yum install gcc

    Visit the official nginx website (nginx.net) and find the latest version. From your shell, run this command:
    # wget http://sysoev.ru/nginx/nginx-0.7.62.tar.gzUnzip the files with the following command
    # tar zxvf ./nginx-0.7.62.tar.gzChange directory to the nginx folder
    # cd nginx-0.7.62Run the following commands:
    # ./configureIf you get no errors, you're all set, go on with the next couple of commands. If you get an error, try to make sure all the libraries are installed.
    # make# make install
    2. Nginx base configuration
    Congrats if you've made it this far! Now let's have a look at the base configuration of nginx. By default, the main configuration file should be found here: /usr/local/nginx/conf/nginx.conf or /etc/nginx/nginx.conf
    Open it up and we'll have a look at some of the settings:
    - worker_processes : the amount of processes that will be ran. In most architectures, 1 process = 1 core; so if you want to fully make use of your multi-core CPU, might aswell use as many processes as your CPU has cores. In my case my CPU's a quad-core, so I'll be using 4 worker processes.
    - worker_connections : how many connections a process will accepted simultaneously.
    For more configuration keys, I suggest having a look here ! Excellent article.
    If you can't be arsed, here's the configuration I'll use:
    - user apache apache; # might aswell use the same user and user group as apache! this will allow nginx to have read permissions on the same files as apache
    - #tcp_nopush on -- leave this commented.
    -  tcp_nodelay on; # to be inserted below #tcp_nopush on;
    - keepalive_timeout 30; # should be enough unless your site's really slow- gzip on; # yeah, why disable it? unless you have a really crappy CPU...- gzip_proxied any; # proxied requests will also be gzipped- gzip_comp_level 2; # set gzip compression to 2 (from 1-fast to 9-highly compressed)
    There isn't much more to configure here, so we'll start configuring Apache. But before doing so, there's one little additional configuration directive we'll add to nginx.conf, which will make handling virtual hosts a lot easier. In the nginx configuration folder, create a new folder: sites ( /usr/local/nginx/conf/sites/ ).In the configuration file, below the configuration directives you've put above, insert that new one:include /usr/local/nginx/conf/sites/*.conf; 

    3. Configuring Apache
    This is where it'll get dirty. If like me you run Plesk, you probably already have some vhost configuration files all over. You'll have to edit these configuration files one by one, after having modified the main conf file.

    - Open your main apache configuration file, probably located somewhere like: /etc/httpd/conf/httpd.conf. Find the "Listen" directive at the beginning of your configuration file. It's probably already set to listen on port 80, so change it to port 8080, and add the line below.
    Listen 8080NameVirtualHost X.X.X.X:8080 Replace X.X.X.X by your actual server IP address. Save and close the file.

    - Open your vhosts configuration files one by one, we're going to make some changes. If like me you're using Plesk, the config files for each domain should be located here: /var/www/vhosts/mydomain.com/conf/httpd.include
    Replace all references of port 80 by 8080.
    Example:
    < VirtualHost 49.32.113.160:80 > => < VirtualHost 49.32.113.160:8080 >
    ServerName   mydomain.com:80  =>  ServerName   mydomain.com:8080
    Do the same for all domains and subdomains that use port 80. We can't allow Apache to use port 80 as it'll be used by nginx! No need to edit the 443 references though, we'll still use Apache for all our https content.

    - Once you've edited the configuration files of all your websites, reload your httpd service: service httpd restart.
    An error may (or may not) appear upon restarting: [warn] VirtualHost 49.32.113.160:8080 overlaps with VirtualHost 49.32.113.160:8080, the first has precedence, perhaps you need a NameVirtualHost directive.
    No need to worry, the fix is simple. Pick one of the vhosts configuration file. Find a vhost directive section such as this: , and add below: NameVirtualHost X.X.X.X:8080 where X.X.X.X is your server's IP address. Save the conf file and reload httpd.

    If your httpd reloads without warnings or error, you can proceed to the next section. Otherwise, read carefully the steps I've described above to see if you missed anything.
    You can test your changes by accessing your website on port 8080, for example: http://www.mydomain.com:8080/ . Your website should load, even though there might be some display errors due to the port change.

    Major issue: when you make any change to the web configuration in Plesk, Plesk rebuilds the vhosts configuration files, which means you'll have to make these changes every time you modify the configuration! There may be some way to prevent this, if you know any, please let me know by posting a comment, I'd be very grateful.

    4. Configuring nginx as reverse proxy

    So far, we've only installed nginx, and made Apache listen on port 8080 instead of 80. If you stop here, everything's pretty much broken. So read on.
    The next step is to configure nginx in order to redirect dynamic content requests to Apache, and return them to the user properly. Start by creating a new file in the nginx configuration folder (same folder as your nginx.conf). Name this file proxy.conf. In this file we'll define the proxy settings. I won't detail each of the settings, this would take ages and you might aswell use the settings below as they should be valid for most sites:
    proxy_redirect off;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    client_max_body_size 10m;
    client_body_buffer_size 128k;
    proxy_connect_timeout 90;
    proxy_send_timeout 90;
    proxy_read_timeout 90;
    proxy_buffer_size 4k;
    proxy_buffers 4 32k;
    proxy_busy_buffers_size 64k;
    proxy_temp_file_write_size 64k;Credit: papygeek.com
    Paste the above lines in the proxy.conf file you've created. We'll be using this file to configure the proxy options in each of our virtual hosts. That's not all though, there is a problem introduced by the proxification of our architecture: how is Apache going to know the real client's IP address? Since nginx will forward the http requests, Apache will be receiving the nginx IP address, in other words, your local IP (your server's IP address). In order to fix this problem, an apache module was created: mod_rpaf.

    Begin by installing said module:
    # wget http://stderr.net/apache/rpaf/download/mod_rpaf-0.6.tar.gz# tar zxvf mod_rpaf-0.6.tar.gz# cd mod_rpaf-0.6# make rpaf-2.0 && make install-2.0
    If you run apache2, replace "apxs" by "apxs2" in the command below. If apxs/2 isn't installed on your machine, run this command first: yum install httpd-devel
    # apxs -i -c -n mod_rpaf-2.0.so mod_rpaf-2.0.c
    # a2enmod rpaf
    # service httpd restart

    5. Configuring the virtual hosts

    Let's now see the final part of this tutorial: configuring the virtual hosts for nginx. First go to your "sites" folder, which you created in the nginx configuration folder (default should be /usr/local/nginx/conf/sites/ ). We'll do this the clean way: for each domain hosted on your machine, create a new .conf file.

    Here is the configuration for the "mydomain.com" domain (and thus the content of your mydomain.conf) :
    server {
      listen      80;
      server_name www.mydomain.com;
      access_log      off; # Apache already creates access logs, I'd disable them unless you really need them
      error_log       /var/log/httpd/nginx.errors.mydomain.com.log warn; # error log, level "warn":
      # Forward requests to Apache! This is the key to our system
      location / {
        proxy_pass         http://www.mydomain.com:8080/;
        include  /usr/local/nginx/conf/proxy.conf; # the proxy.conf file
      }
      # Select files to be deserved by nginx
      location ~* ^.+\.(jpg|jpeg|gif|css|png|js|ico|txt|srt|swf|zip|rar|html|htm|pdf)$ {
        root  /var/www/vhosts/mydomain.com/httpdocs; # the httpdocs folder of your domain
        expires           7d; # caching, expire after 7 days
      }
    }
    # same configuration, without the www. server {
      listen      80;
      server_name mydomain.com;
      access_log      off;  error_log       /var/log/httpd/nginx.errors.mydomain.com.log warn;  location / {
        proxy_pass         http://mydomain.com:8080/;
        include  /usr/local/nginx/conf/proxy.conf; # the proxy.conf file
      }
      location ~* ^.+\.(jpg|jpeg|gif|css|png|js|ico|txt|srt|swf|zip|rar|html|htm|pdf)$ {
        root  /var/www/vhosts/mydomain.com/httpdocs;    expires           7d;  }
    }

    # subdomains! replace "mysubdomain" by your subdomain name

    server {
      listen      80;
      server_name mysubdomain.mydomain.com;

        access_log      off;    error_log       /var/log/httpd/nginx.errors.mysubdomain.mydomain.com.log warn;
      location / {
        proxy_pass         http://mysubdomain.mydomain.com:8080/;
        include  /usr/local/nginx/conf/proxy.conf; # the proxy.conf file
      }

      location ~* ^.+\.(jpg|jpeg|gif|css|png|js|ico|txt|srt|swf|zip|rar|html|htm|pdf)$ {
        root  /var/www/vhosts/mydomain.com/subdomains/mysubdomain/httpdocs; # httpdocs folder of your subdomain
        expires           7d;
      }
    }

    Feel free to copy the subdomain section as many times as you have subdomains.
    Try your nginx configuration by running the following command:
    # /usr/local/nginx/sbin/nginx -t
    You should be receiving this message, provided you've done it correctly:
    the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
    configuration file /usr/local/nginx/conf/nginx.conf test is successful


    6. Setting nginx as service & startup
    I've written an init.d script for you to use. Nearly all the credit goes to Slicehost for writing the original Ubuntu one; the one I wrote is for CentOS, although it should work for other systems: download here. Unzip it and place it in your /etc/rc/init.d/ folder. If you have placed the nginx binary in a different folder, you'll have to open up the script and change the $DAEMON path. Give it execute permissions ( chmod +x /etc/rc/init.d/nginx ), after which you'll be able to use the following commands:
    Starting the server: # service nginx start
    Stopping the server: # service nginx stop
    Reloading the configuration: # service nginx reload
    Restarting the server: # service nginx restart

    If you wish, you can add the "service nginx start" command in the /etc/rc.local file, this will allow you service to be ran on startup.

    Well, I guess that's about it!
    The next article will deal with memcached, so stay tuned!
    Clem

    Posted on 6 March 2010 | 7:53 am

    Comment on XCP Tutorial – Building a HVM Guest using Command Lines by Xen.org Weekly Newsletter Vol 10 No 9 – blog.xen.org

    [...] Tutorial – Building a HVM Guest from Command Line Interface – Memory Issues with new VMs – Installing a VM Operating System from [...]

    Posted on 5 March 2010 | 5:49 pm

    Comment on Xen Mascot Contest – Current Voting Results by Xen.org Weekly Newsletter Vol 10 No 9 – blog.xen.org

    [...] Mascot Contest – Three finalists [...]

    Posted on 5 March 2010 | 5:48 pm

    Storing trees in databases

    A tree is a graph which is connected, uni-directed and acyclic. Lets look at different options of storing such trees in databases. Parent - Child Model The most common model for storing hierarchical information is storing the reference of the parent node along with the child node. so for a tree EmployeeBosssalary ANULL1000 BA900 CA950 DC800 EC700 FC600 For this model, the table to be

    Posted on 5 March 2010 | 9:18 am

    Using the Hama MCE remote on Linux with MPlayer

    This blog post describes how to control your MPlayer media playback using the Hama MCE remote control on Linux. The instructions and software were tested on Ubuntu Jaunty, but they should work on any Linux 2.6 system which has sysfs mounted and which has USB HID support compiled to the kernel (can be checked with ls -l /sys/bus/usb/drivers/usbhid).

    The Hama MCE dongle, when connected to the USB port of a Linux machine, registers itself as two USB HID devices: a keyboard and a mouse. Most of its buttons generate regular keyboard events, for example, the numeric keys correspond to numpad keys, and its Enter key corresponds to the Enter key. You can use its mouse controls to move the mouse or click (the left and right buttons). On Ubuntu Jaunty, even the volume buttons work (they adjust the master volume).

    However, if you don't want to use your Hama MCE remote as a regular keyboard or mouse, but you'd like to control MPlayer (and possibly some few other applications you specify) with it, then you need special software. LIRC, the de facto standard remote control driver and server does support USB HID devices in general, but the Hama MCE sends some quite unusual events which LIRC seems to be impossible to make recognize. (For example, the hashmark button sends Shift, 3 and 5, and some other buttons send Shift or Control too, and LIRC doesn't seem to be able to track the Shift and Control state, which would be needed to distinguish some buttons from each other.)

    So I've implemented my own lircd, hama_mce_lircd.py, which can read button presses and other events from the Hama MCE remote, and it can broadcast them to applications via the socket /dev/lircd, using the traditional lircd protocol. The link above contains installation, usage and configuration instructions for controlling MPlayer with Hama MCE, using hama_mce_lircd.py.

    Each button works and can be bound to any MPlayer input.conf command, with the following limitations (of the dongle hardware):the ok and enter buttons are the same;the play and pause buttons are the same;the right click and the info buttons are the same;most buttons don't repeat when held down for a long time.

    An alternative and more generic Python Linux event reading and mangling library with Hama MCE support is available at http://github.com/rmt/pyinputevent/.

    Posted on 5 March 2010 | 8:26 am

    We have a Review Writer Winner

    Well as promised we give away 1 year of free (bought item) downloads to one person per month who writes a review in the Joomla! extention system. As we don’t get 5 reviews per month, (Yet) we just picked one for the month of january. And the winner is…….. Erik of the company Digitivity Have fun downloading Erik ! Well…. [...]

    Posted on 5 March 2010 | 6:53 am

    New version of Calculator Plus Module

    Yesterday i published a new version of my Calculator Plus Module for Joomla! 1.5 and it has everything in it what you need. It’s got : MS M+ M- MR MC, EXP, SQR plus minus divide times clear decimals plus/minus So.. basicly everything. This module is usage free. You can see the demo here. You can download the module here.

    Posted on 5 March 2010 | 6:00 am

    Linux Learning Centers Growing in Central Texas







    Aaron wasn't much interested in what his friends were doing.  They were busy trying to choose a game to play on agame.com.  Aaron wasn't having any of it.  He stood beside me as I coaxed the wireless connection to life on another machine and asked me if there were any math games.




    Arron is 7.

    The Little Ebenezer Baptist Church in Hutto Texas is the newest home to a HeliOS Project Linux Learning Center.  The center is built in a small church annex but all area children are allowed to use the computers, regardless of their affiliation.  Skip Guenter Our Director of System Engineering is the driving force behind  making this happen...because as it happens, Hutto is his home.  Skip knows who is in  need in Hutto and he saw to it that need was met.  While it isn't anywhere near our biggest project, it is going to have an impact.

    "Are there any math games in that computer sir?"

    You bet there are Aaron.

    Skip is working with the manager of the Annex to arrange weekly classes for local people who want to learn how to use a computer.  From what we have seen at The Bruno Knaapen Center, we will have equal numbers of adults to kids.

    That's fine with us.

                                                                             
    While most children Aaron's age are more than happy to make bunnies jump over mushrooms and race little cars around a flash-based gamescreen, kids like Aaron inspire us to get stuff like this done.  As of now, there are only 4 machines in this center.  Judging from the competition between kids vying for computer time, I'm thinking we might have to adjust some table space and install two more.  That will take up the remaining space comfortably available for machines there.

    Flash back 60 minutes that same evening...

    The Bruno Knaapen Technology learning Center is a hub of activity for us on Wedensday nights.  That is the night our Directors go there to teach basic computer and Internet skills to those who need to learn them.  Most of our students are Hispanic and not native English-speakers so we rely upon the good nature of Christine and Ceasar Collazo to translate our lessons into Spanish in real time.  Non-English speakers are clustered into groups of three to make it easier to teach.



    It gets interesting to say the least.

    Tom King, our Network Director is currently working with Caesar and Christina in setting up a project for the summer to teach kids to build their own computers.  We've had a great response from some of the parents in the area for Tom's idea.  As Linux Against Poverty 2010 enters it's hard planning stage, we are hoping to have plenty of machines to work with for this project.

    As of now, we are critically low of both machines and funding so any further efforts are going to rely upon the good nature of this community to get it done.  While we have no shortage of grants that now want to pay for vechicles, office space and computers for our administrative use, we are finding it difficult to nail down funding for day-to-day operations.  We don't want to apply for grants for things we already have...that just makes those resources unavailable to someone that really needs them.  We already have the things they are offering.  If you can give us a hand, it would be greatly appreciated.  As of now, we are to a point where we just can't do much more without some help.

    I will be meeting with Lynn Bender, the creator and force behind Linux Against Poverty this week.  Once we get some things ironed out, I will publish the information here.  We already have a greater number of volunteers to man the triage and repair tables than last year.  Of course, our goal is 100 computers more than the 200 we put into service from Linux Against Poverty 2009.

    ...And that's a good thing.

    All-Righty Then

    Posted on 4 March 2010 | 3:20 pm

    Microsoft Security Advisory --- F1 Key on Web

    A friend of mine from Japan emailed me this interesting article and thought I would share it.
    Microsoft has issued a security advisory warning users NOT to press the F1 key when prompted by a website. This vulnerability could allow a hacker to hijack a computer. This vulnerability affects all versions of Internet Explorer on computers running Windows 2000 and Windows XP operating systems. More information can be found at
    http://www.computerworld.com/s/article/9164038/Microsoft_Don_t_press_F1_key_in_Windows_XP
    DO NOT press the F1 key if prompted by a website. Doing so could allow a hacker to hijack your computer!

    Posted on 3 March 2010 | 11:37 am

    Options available for heating water

    The simplest and easiest way is to get a big utensil and fill it up with water and heat it on the stove. Remember to cover it up, and it gets hot faster. Another option that we used when we were living as tenants was an electric rod. It costs between 200 to 500 INR and depending upon the wattage heats up water fast - a

    Posted on 28 February 2010 | 1:39 pm

    Import and Enable the NFS Service

    Last week we had a little issue with mounting directories from a new Solaris 10 server. It was noted the nfs service was not running on it. We had to import and then enable the service. After that, we were able to mount the required directories from the server.


    # svcs -a | grep nfs
    # cd /var/svc/manifest/network
    # svccfg -v import nfs/server.xml
    # svcadm enable nfs/server

    or

    # svccfg -v import /var/svc/manifest/network/nfs/server.xml
    # svcadm enable nfs/server

    If you want to disable and delete a service, see below.

    # svcadm disable network/nfs/server
    # svccfg delete network/nfs/server

    Posted on 28 February 2010 | 6:16 am

    Error compiling cairomm

    While compiling cairomm i got this error:

    configure.ac:37: error: possibly undefined macro: AC_DISABLE_STATIC
          If this token and others are legitimate, please use m4_pattern_allow.
          See the Autoconf documentation.
    configure.ac:38: error: possibly undefined macro: AC_LIBTOOL_WIN32_DLL
    configure.ac:39: error: possibly undefined macro: AC_PROG_LIBTOOL
    autoreconf: /usr/bin/autoconf failed with exit status: 1

    Solution:
    Install libtool:

    [root@dyn854450 ~]# yum install libtoolLinux system administration and security

    Posted on 26 February 2010 | 5:16 pm

    Badly formed XML, there is no tag

    Using glade-3 i got with this error/warning:


    [walter@talent Projects]$ gtk-builder-convert uno.glade uno.xmlTraceback (most recent call last):File "/usr/bin/gtk-builder-convert", line 772, in
    sys.exit(main(sys.argv))
    File "/usr/bin/gtk-builder-convert", line 760, in main
    conv.parse_file(input_filename)
    File "/usr/bin/gtk-builder-convert", line 161, in parse_file
    self._parse()
    File "/usr/bin/gtk-builder-convert", line 233, in _parse
    assert glade_iface, ("Badly formed XML, there is "
    AssertionError: Badly formed XML, there is no tag.
    Try saving the file as a libglade project and then try again. It work'd for me.

    Linux system administration and security

    Posted on 26 February 2010 | 4:50 pm

    Accessing a Data Source Remotely in FMW 11g (11.1.1.2.0) from JDeveloper 11g (11.1.1.2.0)

    I needed to access a data source remotely on FMW 11g server from JDeveloper 11g. I found that to do this I needed to follow these steps.

    Note: This was done using 11.1.1.2 which is the latest version of FMW 11g and JDeveloper 11g

    1. Edit setDomainEnv script to ensure you set this property to true. By default it's false.

    WLS_JDBC_REMOTE_ENABLED="-Dweblogic.jdbc.remoteEnabled=true"

    2. Re-start your server to pick up the change done at step #1 above.

    3. In your project add the following libraries to allow remote access and the required JDBC driver library.
    Weblogic 10.3 Remote-ClientOracle JDBC4. From JDeveloper access your data source remotely with code as follows making sure you use your connection details and the correct JNDI name for the data source.


    package pas.au.remote.wls11g;

    import java.sql.Connection;

    import java.sql.SQLException;

    import java.util.Date;
    import java.util.Hashtable;
    import java.util.logging.Level;
    import java.util.logging.Logger;

    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;

    import javax.sql.DataSource;

    public class RemoteDataSourceAccess
    {
    private Logger logger = Logger.getLogger(this.getClass().getSimpleName());
    public RemoteDataSourceAccess()
    {
    }

    public void run ()
    {
    logger.log(Level.INFO, "Started RemoteDataSourceAccess at " + new Date());

    InitialContext ctx = null;

    try
    {
    ctx = getInitialContext();
    DataSource ds = (DataSource) ctx.lookup("jdbc/scottDS");
    Connection conn = (Connection) ds.getConnection();
    logger.log(Level.INFO, "Got connection : " + conn);

    logger.log(Level.INFO, "Auto Commit = " + conn.getAutoCommit());
    }
    catch (NamingException e)
    {
    logger.log(Level.SEVERE, "Error occurred", e);
    System.exit(1);
    }
    catch (SQLException e)
    {
    logger.log(Level.SEVERE, "SQLException occurred", e);
    System.exit(1);
    }

    logger.log(Level.INFO, "Ended RemoteDataSourceAccess at " + new Date());
    }

    public static InitialContext getInitialContext() throws NamingException
    {
    String JNDI_FACTORY="weblogic.jndi.WLInitialContextFactory";
    String url = "t3://wayne-p2.au.oracle.com:7003";
    String username = "weblogic";
    String password = "welcome1";

    Hashtable<String,String> env = new Hashtable<String,String>();
    env.put(Context.SECURITY_PRINCIPAL, username);
    env.put(Context.SECURITY_CREDENTIALS, password);
    env.put(Context.INITIAL_CONTEXT_FACTORY, JNDI_FACTORY);
    env.put(Context.PROVIDER_URL, url);
    return new InitialContext(env);
    }

    public static void main(String[] args)
    {

    RemoteDataSourceAccess test = new RemoteDataSourceAccess();
    test.run();
    }
    }

    5. Output as follows.

    25/02/2010 9:22:56 AM pas.au.remote.wls11g.RemoteDataSourceAccess run
    INFO: Started RemoteDataSourceAccess at Thu Feb 25 09:22:56 EST 2010
    25/02/2010 9:23:03 AM pas.au.remote.wls11g.RemoteDataSourceAccess run
    INFO: Got connection : weblogic.jdbc.rmi.SerialConnection_weblogic_jdbc_rmi_internal_ConnectionImpl_weblogic_jdbc_wrapper_PoolConnection_oracle_jdbc_driver_T4CConnection_1032_WLStub@1
    25/02/2010 9:23:03 AM pas.au.remote.wls11g.RemoteDataSourceAccess run
    INFO: Auto Commit = true
    25/02/2010 9:23:03 AM pas.au.remote.wls11g.RemoteDataSourceAccess run
    INFO: Ended RemoteDataSourceAccess at Thu Feb 25 09:23:03 EST 2010http://feeds.feedburner.com/TheBlasFromPas

    Posted on 24 February 2010 | 11:09 pm

    UDP Tunneling to avoid hotspot or firewall restrictions

    UDP tunneling is an attack that is often overlooked when manufacturers design wireless hotspot and other firewall/proxy based devices. When you try and resolve a domain name, you make a request to a name server on UDP port 53. The way that a lot of wireless hotspot, firewalls and proxies work, is that your DNS request [...]

    Posted on 24 February 2010 | 10:16 pm

    Getting detailed logging for Universal Connection Pool (UCP) / Fast Connection Failover (FCF) Testing

    While testing UCP/FCF I was having some issues with the RAC cluster setup. One useful way to determine exactly what is happening or not happening from the FAN events sent from RAC cluster to the pool was to setup logging as described below.

    1. Create a properties file as follows.

    # This is the sample logging properties file that configures
    # loggers of some classes (FCF-related ones) to produce detailed logging
    # (all levels) and just SEVERE and WARNING level messages for the rest
    # of loggers. Console output via UCPFormatter (ODL-like messages).

    handlers = java.util.logging.ConsoleHandler
    java.util.logging.ConsoleHandler.level = ALL
    java.util.logging.ConsoleHandler.formatter = oracle.ucp.util.logging.UCPFormatter

    .level = WARNING

    oracle.ucp.common.FailoverEventHandlerThreadBase.level = ALL

    oracle.ucp.jdbc.oracle.ONSDatabaseEventHandlerThread.level = ALL
    oracle.ucp.jdbc.oracle.ONSDatabaseFailoverEvent.level = ALL
    oracle.ucp.jdbc.oracle.ONSOracleFailoverEventSubscriber.level = ALL
    oracle.ucp.jdbc.oracle.OracleDatabaseInstanceInfo.level = ALL
    oracle.ucp.jdbc.oracle.OracleDatabaseInstanceInfoList.level = ALL
    oracle.ucp.jdbc.oracle.OracleFailoverEventImpl.level = ALL
    oracle.ucp.jdbc.oracle.OracleFailoverEventNotification.level = ALL
    oracle.ucp.jdbc.oracle.OracleFailoverEventSubscriber.level = ALL
    oracle.ucp.jdbc.oracle.OracleFailoverHandler.level = ALL
    oracle.ucp.jdbc.oracle.OracleFailoverablePooledConnection.level = ALL
    oracle.ucp.jdbc.oracle.OracleConnectionConnectionPool.level = ALL
    oracle.ucp.jdbc.oracle.OraclePooledConnectionConnectionPool.level = ALL
    oracle.ucp.jdbc.oracle.OracleXAConnectionConnectionPool.level = ALL
    oracle.ucp.jdbc.oracle.OracleJDBCConnectionPool.level = ALL
    oracle.ucp.jdbc.oracle.OracleUniversalPooledConnection.level = ALL

    2. Add the JVM command line option as follows - -Djava.util.logging.config.file=ucp_fcf_log.properties.

    Then you should see some detailed output as follows. Very useful information in diagnosing UCP/FCF issues with your pool. Just showing small snippet as this is detailed output.

    [java] 2010-02-24T10:44:16.734+1100 UCP FINE seq-103,thread-11 oracle.ucp.jdbc.oracle.ONSDatabaseEventHandlerThread.run event
    triggered: Service name: orcl.apemrac.au.oracle.com, Instance name: orcl1, Unique name: orcl, Host name: apemrac1, Status: down,
    Cardinality: 0, Reason: user, Event type: database/event/service
    [java] 2010-02-24T10:44:16.734+1100 UCP FINEST seq-104,thread-11 oracle.ucp.jdbc.oracle.ONSDatabaseEventHandlerThread.run che
    ck for events
    [java] 2010-02-24T10:44:16.734+1100 UCP FINEST seq-105,thread-11 oracle.ucp.jdbc.oracle.OracleFailoverEventImpl.setEventType
    eventType: database/event/service
    [java] 2010-02-24T10:44:16.750+1100 UCP FINEST seq-106,thread-11 oracle.ucp.jdbc.oracle.OracleFailoverEventImpl.validateEvent
    Type eventType: database/event/service
    [java] 2010-02-24T10:44:16.750+1100 UCP FINEST seq-107,thread-11 oracle.ucp.jdbc.oracle.ONSDatabaseFailoverEvent. event
    Type: database/event/service, eventBody: VERSION=1.0 service=HASERVICE.apemrac.au.oracle.com instance=orcl1 database=orcl host=ape
    mrac1 status=down reason=failure
    [java] 2010-02-24T10:44:16.765+1100 UCP FINEST seq-108,thread-11 oracle.ucp.jdbc.oracle.OracleFailoverEventImpl.setServiceNam
    e serviceName: HASERVICE.apemrac.au.oracle.com
    [java] 2010-02-24T10:44:16.765+1100 UCP FINEST seq-109,thread-11 oracle.ucp.jdbc.oracle.OracleFailoverEventImpl.setInstanceNa
    me instanceName: orcl1
    [java] 2010-02-24T10:44:16.765+1100 UCP FINEST seq-110,thread-11 oracle.ucp.jdbc.oracle.OracleFailoverEventImpl.setDbUniqueNa
    me dbUniqueName: orcl
    [java] 2010-02-24T10:44:16.765+1100 UCP FINEST seq-111,thread-11 oracle.ucp.jdbc.oracle.OracleFailoverEventImpl.setHostName h
    ostName: apemrac1
    [java] 2010-02-24T10:44:16.765+1100 UCP FINEST seq-112,thread-11 oracle.ucp.jdbc.oracle.OracleFailoverEventImpl.setStatus sta
    tus: down
    [java] 2010-02-24T10:44:16.781+1100 UCP FINEST seq-113,thread-11 oracle.ucp.jdbc.oracle.OracleFailoverEventImpl.setReason rea
    son: failure
    [java] 2010-02-24T10:44:16.781+1100 UCP FINEST seq-114,thread-11 oracle.ucp.jdbc.oracle.OracleJDBCConnectionPool.handleFailov
    erEvent failover event: Service name: HASERVICE.apemrac.au.oracle.com, Instance name: orcl1, Unique name: orcl, Host name: apemrac
    1, Status: down, Cardinality: 0, Reason: failure, Event type: database/event/service
    [java] 2010-02-24T10:44:16.796+1100 UCP FINEST seq-115,thread-11 oracle.ucp.jdbc.oracle.OracleJDBCConnectionPool.handleFailov
    erEvent service name HASERVICE.apemrac.au.oracle.com in event does not match that in the pool: haservice.apemrac.au.oracle.com. No
    FCF attempt.
    http://feeds.feedburner.com/TheBlasFromPas

    Posted on 24 February 2010 | 3:10 am

    Atherstone Ball Game 2010

    <div style="float: left; padding: 4px;"><object width="425" height="344"> <param name="movie" value="http://www.youtube.com/v/an2rGMwffNw&hl=en_GB&fs=1&rel=0&color1=0x2b405b&color2=0x6b8ab6"></param> <param name="allowFullScreen" value="true"></param> <param name="allowscriptaccess" value="always"></param> <embed src="http://www.youtube.com/v/an2rGMwffNw&hl=en_GB&fs=1&rel=0&color1=0x2b405b&color2=0x6b8ab6" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed> </object></div>Shrove Tuesday in Atherstone saw another game of the yearly Atherstone Ball Game. Roughly 901 years old now, this game begins with large crowds gathering in the main street (Long St) and await the huge ball to be thrown out of Barclay's Bank window. Once it's thrown out the people in the street boot the ball up and down the street for about an hour and a half, then once that time is up the mayhem erupts and everyone goes for the ball to see who has it when the claxon goes at 5pm. The game does involve violence, so if you're tempted to get the ball around 4.50pm then you more than likely will be punched, kicked or thrown everywhere... that's just how the game is. Anyways, this years winner was Mark Rollinson (I think I've spelt his name correctly). &raquo; <a href="http://en.wikipedia.org/wiki/Atherstone#Shrovetide_Ball_Game" target="_blank">WikiPedia :: Atherstone Ball Game</a>

    Posted on 22 February 2010 | 1:14 pm

    Long Time no post!

    Work, Work, Work! School, School, School! No time to write on my blog but it is nice to see that Failserver has grown ! THANK YOU ALL!

    Posted on 20 February 2010 | 5:20 pm

    Debian Installer

    A Slight Flaw with the Debian Installer A few weeks ago, I noticed some really good e-Bay deals on used, Opteron-based servers. I mean, they were going for less money than I had to pay for old Pentium III-based servers just three years ago. So, I decided that maybe it was time to upgrade. Three [...]

    Posted on 20 February 2010 | 1:17 pm

    How to try the GDM login screen in many resolutions

    This blog post explains how to try the GDM login screen and make screen shots in any, user-specified screen resolution. This can be useful when designing GDM themes. The instructions were tried on Ubuntu Hardy (8.04), but they should work on Ubuntu Intrepid (8.10) and Ubuntu Jaunty (9.04). They won't work on Ubuntu Karmic, because it contains a custom GDM.Installation instructions:(When asked to run a command, run it in a terminal window.)Make sure GDM is your display manager. Since GDM is the default, chances are that it is. To make sure, run sudo dpkg-reconfigure gdm, and select GDM if it asks you.Log in using GDM if you haven't already done so. To do that, run sudo /etc/init.d/gdm restart . (You will lose your X11 session doing so.)Install Xephyr, a modern nested (embedded) X server, similar to Xnest: sudo apt-get install xserver-xephyrInstall ImageMagick for making screen shots in various image file formats: sudo apt-get install imagemagickTry Xephyr: Xephyr :9 -screen 800x600 -extension RANDR . A new window should appear with the usual a black-and-white diagonal background and a diagonal cross-shaped cursor. Abort Xephyr in the terminal window. Try with different -screen sizes.Find your GDM Xnest command line by running grep ^Xnest= /etc/gdm/gdm.conf . You should see something like Xnest=/usr/share/gdm/gdmXnestWrapper -br -audit 0.Create a new xnest wrapper script:echo '#!/bin/sh
    GEOMETRY="`cat /tmp/new-xnest-geometry`"
    GEOMETRY="${GEOMETRY:-800x600}"
    exec Xephyr "$@" -screen "$GEOMETRY" -extension RANDR' |
    sudo tee /usr/local/sbin/gdm-xnest &&
    chmod 755 /usr/local/sbin/gdm-xnestCreate the screenshot helper script: echo '#! /bin/bash --
    # by pts@fazekas.hu at Sat Feb 20 11:09:20 CET 2010
    GOT=($(ps x | perl -ne '\''if (/[ ]Xephyr :/) {
    $c++;
    print"$1 $2\n" if (/[ ]Xephyr :(\d+)(?= ).* -auth (\S+)/)}
    END{die"Xephyr not found\n"if!$c;die"multiple Xephyrs found\n"if$c>1}'\''))
    test "$?" = 0 || exit "$?"
    if test ${#GOT} != 2; then
    echo "Xephyr detection failed" >&2
    exit 90
    fi
    export DISPLAY=":${GOT[0]}" XAUTHORITY="${GOT[1]}"
    exec import -window root "$@"' |
    sudo tee -a /usr/local/bin/xephyr-import &&
    sudo chmod 755 /usr/local/bin/xephyr-import Change the Xrandr= setting in /etc/gdm/gdm.conf to use the new wrapper script: sudo perl -pi -0777 -e 's@^Xnest=.*@Xnest=/usr/local/sbin/gdm-xnest -br -audit 0@gm' /etc/gdm/gdm.confMake sure the Xrandr= setting is changed: check that running grep ^Xnest= /etc/gdm/gdm.conf displays Xnest=/usr/local/sbin/gdm-xnest -br -audit 0Save your work in your X11 session, and restart GDM: sudo /etc/init.d/gdm restart . (You will lose your X11 session doing so.)Usage instructions (how to show the GDM login dialog inside a window, and how to make a screen shot):If not already logged in, login in at the GDM login screen.Run gdmflexiserver --xnest to get the GDM login dialog inside a window of your regular session. You can specify the window size using e.g. echo 1024x768 >/tmp/new-xnest-geometry && gdmflexiserver --xnestTo make a JPEG screen shot, run xephyr-import -quality 75 screenshot.jpg while the Xephyr window with the GDM login screen is still open.To make a PNG screen shot, run xephyr-import screenshot.png .

    Posted on 20 February 2010 | 10:26 am

    Cisco GRE example setup

    Hosts from LAN1 should be able to access hosts at LAN2 and vice-versa through GRE tunnel between R1 and R2. ISP doesn’t care what networks are behind R1 and R2 so the only way to establish connection between LAN1 and LAN2 is to use VPN, in this example we use GRE. GRE setup example topology R1’s startup-config [...]

    Posted on 18 February 2010 | 3:06 pm

    KDE 4.4 is ready for Mandriva

    Run one of these to add KDE-4.4.0 repo (depending on your OS of course):

    32 bits:urpmi.addmedia kde-4.4.0 ftp://ftp.kde.org/pub/kde/stable/4.4.0/Mandriva/2010.0/i586


    64 bits:urpmi.addmedia kde-4.4.0 ftp://ftp.kde.org/pub/kde/stable/4.4.0/Mandriva/2010.0/x86_64
    After adding the KDE 4.4. repository you will need to update, download and install all of KDE 4.4 packages. You can do all of this in one command, but, I, for safety, prefer to do it in two steps. First, update the repositories and download all the packages before installing them to make sure that the installation is possible:
    urpmi --auto-update --auto-select --test
    When all packages finish downloading and you see a message at the end saying that the installation is possible, you can run the same command without the --test parameter to now actually perform the installation:
    urpmi --auto-update --auto-select
    After the package installation finishes, logout and log back in, that's it !! you will have a brand new, shiny, awesome and rocking KDE 4.4 desktop :D

    Enjoy!!

    Credit goes to Juan Luis Baptiste for the info.

    Posted on 17 February 2010 | 7:29 am

    D&D on Microsoft Surface

    This is cool. CNET has an article up, with video, of Dungeons and Dragons being played on the Microsoft Surface. Now, I've never actually played D&D, mostly because all the tables and math and line of sight scares the crap out of me. But if I ever got the chance to play on a Surface, I'd definitely go for it, because the computer handles all the boring crap for you. 

    Considering that Surface costs over $12000 dollars, I doubt I'll ever get the chance to play on it, but if costs come down on similar units in the future, your kids just might be playing D&D on a device similar to it in the future.... of course, that future might be a long ways away if you play D&D :)

    Here's the video.

     

    If you want to read the CNET article, click here.

    Posted on 12 February 2010 | 2:17 am

    Full NAT, DNAT and SNAT aka 1:1 NAT, 1 to 1 NAT

    Full NAT, DNAT and SNAT aka 1:1 NAT, 1 to 1 NAT – this is used when you want to map a dedicated external IP on an external interface to another IP on a separate interface with everything routed between them. EXTERNAL_IP=”87.117.XXX.XXX” EXTERNAL_IF=”eth1″ INTERNAL_IP=”192.168.1.105″ INTERNAL_IF=”eth0″ echo 1 > /proc/sys/net/ipv4/ip_forward iptables -t nat -A PREROUTING -i ${EXTERNAL_IF} -d ${EXTERNAL_IP} -j DNAT –to-destination [...]

    Posted on 10 February 2010 | 3:29 pm

    Bash - find diff based on a field

    Input files:

    $ cat file1.txt
    timestamp,records,attempts
    1264723200,96,6117
    1264809600,856,7298
    1264896000,904,8628
    1264982400,0,0
    1265155200,644,1786

    $ cat file2.txt
    timestamp,records,attempts
    1264723200,96,6117
    1264809600,859,7298
    1264896000,904,8628
    1264982400,0,0
    1265155200,641,1786

    Required:

    If file1.txt and file2.txt do not have same values in the 2nd field (i.e 'records' field) in any one of the lines (both the files are sorted on first field), print "BAD", else "GOOD".

    As the above two files are already sorted based on first field (i.e. timestamp), we can use join command to join the lines of the two files and then use awk to perform the comparison between two fields of the joined output.

    $ join -t, -1 1 -2 1 file1.txt file2.txt

    Output:
    timestamp,records,attempts,records,attempts
    1264723200,96,6117,96,6117
    1264809600,856,7298,859,7298
    1264896000,904,8628,904,8628
    1264982400,0,0,0,0
    1265155200,644,1786,641,1786

    Lines for which the 2nd and 4th fields in the above output do not match.

    $ join -t, -1 1 -2 1 file1.txt file2.txt | awk '$2 != $4' FS=\,
    1264809600,856,7298,859,7298
    1265155200,644,1786,641,1786

    How many lines like that ?

    $ join -t, -1 1 -2 1 file1.txt file2.txt | awk '$2 != $4 {++c} END {print c}' FS=\,
    2

    or you can use 'wc -l' for the count

    $ join -t, -1 1 -2 1 file1.txt file2.txt | awk '$2 != $4' FS=\, | wc -l
    2

    Now based on the above count, you can conclude if there is difference between file1.txt and file2.txt based on the 2nd field (i.e. records).

    $ unmatched_count=$(join -t, -1 1 -2 1 file1.txt file2.txt | awk '$2 != $4 {++c} END {print c}' FS=\,)
    $ [ -z $unmatched_count ] && echo "OK" || echo "BAD"

    Output:
    BAD

    or

    $ unmatched_count=$(join -t, -1 1 -2 1 file1.txt file2.txt | awk '$2 != $4' FS=\, | wc -l)
    $ [ $unmatched_count -eq 0 ] && echo "OK" || echo "BAD"

    Output:
    BAD

    Related posts:

    - Bash join command explained
    - Perform outer join using awk
    - Performing join using awk
    - Search and print output using awk

    Posted on 10 February 2010 | 10:34 am

    Unix - delete file with hyphen at beginning

    Accidentally one of my script created a file named '-1264924755.done' (i.e. filename starting with a hyphen).

    When I tried to remove this file:

    $ rm -1264924755.done

    rm: invalid option -- 1
    Try `rm ./-1264924755.done' to remove the file `-1264924755.done'.
    Try `rm --help' for more information.

    This is because the command line parser treats the filename as a command line switch (because of the hyphen). So commands like mv, rm etc treats the file name itself as a parameter(option) to the command.

    The ways to delete such files:

    1) Referencing the filename to the command via its path location (so that the special character is not the first character after the white space)


    $ rm ./-1264924755.done

    or

    $ rm ~/work/temptest/-1264924755.done

    2) A special way:

    $ rm -- -1264924755.done

    Related posts:

    - Find last modified directory in UNIX
    - Grep and print control character characters in UNIX
    - Find process running time in UNIX
    - Bash - save command in history without executing it
    - Display file permissions in octal in UNIX

    Posted on 31 January 2010 | 8:15 am

    Helping Haiti: With Crystal of the International Medical Corps…

    It has been in the recent news the devastating twin earthquakes that mostly flattened Haiti. While the rest of the world stared with horror and shock many people has lost their home, their family, their near and dear ones in a few minutes of nature’s whims. Help poured in from all quarters and my friends [...]

    Posted on 25 January 2010 | 2:17 pm

    originalip option in dansguardian

    I upgraded my firewall on Mandriva 2009.1 to 2010 and got into problem with dansguardian. Client computers got DansGuardian 400 - Bad Request , url is malformed for certain sites such as google and facebook. I suspected it must be related to new option introduced by newly installed dansguardian (2.10.1.1). In changelog, I got this:


    Jan 21 17:18:39 firewall6 dansguardian[1090]: Destination host of dnl-15.geo.kaspersky.com did not match the original destination IP of 95.211.85.42
    Jan 21 17:18:40 firewall6 dansguardian[1111]: Destination host of www.google-analytics.com did not match the original destination IP of 72.14.213.113
    Jan 21 17:18:40 firewall6 dansguardian[1074]: Destination host of us.bc.yahoo.com did not match the original destination IP of 216.252.124.30
    Jan 21 17:18:40 firewall6 dansguardian[1072]: Destination host of dnl-11.geo.kaspersky.com did not match the original destination IP of 38.117.98.202
    Jan 21 17:18:41 firewall6 dansguardian[1091]: Destination host of dnl-04.geo.kaspersky.com did not match the original destination IP of 38.117.98.199
    Jan 21 17:18:42 firewall6 dansguardian[1083]: Destination host of dnl-07.geo.kaspersky.com did not match the original destination IP of 38.117.98.199
    Jan 21 17:18:42 firewall6 dansguardian[1116]: Destination host of newsrss.bbc.co.uk did not match the original destination IP of 212.58.226.73
    Jan 21 17:18:43 firewall6 dansguardian[1076]: Destination host of dnl-11.geo.kaspersky.com did not match the original destination IP of 38.117.98.202
    Jan 21 17:18:43 firewall6 dansguardian[1086]: Destination host of dnl-02.geo.kaspersky.com did not match the original destination IP of 38.117.98.196
    Jan 21 17:18:49 firewall6 dansguardian[1270]: Started sucessfully.


    After diff'ing between previous dansguardian.conf (currently in use) and the current version of the file (not in use). It turned out that originalip option was the culprit. It was on by default if it wasn't in there. To turn it off, I must tell it off as below:


    # Network Settings
    #
    # the IP that DansGuardian listens on. If left blank DansGuardian will
    # listen on all IPs. That would include all NICs, loopback, modem, etc.
    # Normally you would have your firewall protecting this, but if you want
    # you can limit it to a certain IP. To bind to multiple interfaces,
    # specify each IP on an individual filterip line.
    filterip = 192.168.6.6

    # the port that DansGuardian listens to.
    filterport = 8080

    # the ip of the proxy (default is the loopback - i.e. this server)
    proxyip = 127.0.0.1

    # the port DansGuardian connects to proxy on
    proxyport = 3128

    originalip = off

    This is what changelog says about originalip option:

    Fri 5th June 2009 - DansGuardian 2.10.1.1 - stable
    Add "originalip" option to dansguardian.conf, for determining the original destination IP in transparent proxy set-ups, and ensuring that the destination domain of the request resolves to that IP. This can help to address a particular transparent proxy security vulnerability (US-CERT VU#435052), but because of certain limitations - only implemented on Linux/Netfilter; potential breakage of websites using round-robin DNS - the code is not enabled by default. Enable by passing "--enable-orig-ip" to the configure script. Fix a crash which could occur when dealing with simultaneous incoming connections in configurations using more than one listening socket. Fix a crash when checking time limits on item lists. Fix potential usage of uninitialised memory during phrase filtering.

    Luckily, Mandriva package was built with --enable-orig-ip enabled.

    Cheers.

    Posted on 22 January 2010 | 3:19 am

    Extract Audio (.mp3) from Video Files Like .flv, .mov, .avi and Others with Ubuntu

    It is very easy to extract the audio track from video files using Linux. All you need is ffmpeg and some codecs. Let’s get started… Note: The commands below are for Ubuntu (or Debian derivatives) but you can do the same with any other Linux distribution provided you can install the necessary packages. 1. Add the Medibuntu’s repository [...]

    Posted on 20 January 2010 | 8:49 pm

    Domain management on mobile

    It was pure delight to find out that GoDaddy — arguably the #1 domain registrar in the world — has an app for the iPhone / iPod touch. According to the App Store, it was posted late last year. Sometimes I get an inspiration for a domain name, and it’s now so much easier and [...]

    Posted on 12 January 2010 | 3:05 pm

    My Apostille Woes and Shashi Tharoor…

    My book was published this July and I got my first royalty statement soon after. My contract with Galileo Press was executed in the US and hence this required me to apply for a TIN to get the actual payment as well as claim tax exemption from the Indian Government. The process, it seemed, was [...]

    Posted on 8 January 2010 | 7:54 am

    How to Resume Partial File Transfers

    I work primarily with UNIX and Linux machines and scp is my main choice to transfer files with. It is both convenient, short and secure. Example: scp localfile user@remotecomputer:/path/to/target/dir Recently I was transferring an 8GB file and due to a network issue, the transfer was interrupted at nearly 40%. I found a solution at joen.dk ,which uses rsync to [...]

    Posted on 8 January 2010 | 5:03 am

    FAQ: How to install manual pages in Solaris?

    In order to use install man pages for various commands in Solaris it is necessary to get two packages: SUNWman and SUNWdoc. You can check if they are already installed using commands ‘pkginfo SUNWdoc' and 'pkginfo SUNWman', or just try ‘man man‘. If they are not present in your system you can install them from [...]

    Posted on 25 December 2009 | 12:47 pm

    Banking with Facebook - Probably not the best idea ever

    Mike Bailey at Skeptikal.org wrote up last week about a new Facebook app called MyMoney. MyMoney is an application that according to its creators allows you to:

    Manage your finances right from your Facebook profile, simply and securely! MyMoney is an online home banking application that interacts with a variety of financial institutions, so you can view your account balances, transfer money between accounts, review histories, and much more.  

    Sounds kind of cool? Hold your horses. In a post dripping with sarcasm (letting you know in case your detector is a bit off) he says:

    I know you're thinking this is a bad idea, and are concerned about MyMoney's security. Don't worry, I checked it out. They have "multiple layers of security protecting...data and accounts." The application iframes you into their site (hosted on https://mm.galaxyplus.com). If you forget the URL, they left zone transfers enabled for you, so you can just select from a list of galaxyplus.com subdomains. The iframe's URL has a parameter called "fb_sig_user." If you manipulate this parameter, you get to see the contents of all your friends' accounts (presumably so you can borrow money without all that awkward asking). The only thing I don't like about this application is that they left error reporting on. I don't like seeing those ugly ASP stack traces every time I use an HTML tag as a form parameter. Lol!

    Note to readers: online banking should be done in a virtual machine if at all possible, and that is all that you should do with VM, nothing else. If that is too much of a hassle, at least download and install a browser like Firefox or Chrome and use that browser exclusively for your banking.

    If you'd like to read the entire (hilarious) post, click here. 

    Did you like this article? If you want to get more articles like it, please consider subscribing to the Bud Boy Tech RSS feed by clicking here.

     

     

    Posted on 11 December 2009 | 4:13 am

    Start and Stop Tomcat from within the Eclipse IDE

    Starting and stopping Tomcat from within the Eclipse IDE, once set up, can speed up your Java Web Application development time because you won't have the extra step of opening the terminal to start and stop Tomcat. The following instructions assume you have Eclipse installed and Tomcat installed.

    Step 1: Open up the External Tools Configurations in Eclipse. In Eclipse's toolbar click on the little icon with a run symbol and the toolbox, then External Tools Configurations... .



    Step 2: In the dialog box that pops up, right-click on Program and select "New".



    Step 3: Give the new run configuration a name such as "Stop Tomcat", and in the "Location" text field enter "/Library/Tomcat/bin/shutdown.sh". You need to adjust the path of the shutdown.sh to match the file's location on your computer. Also, if you're using a Windows machine you need to call shutdown.bin instead. Click "Run".



    Step 4: Create another configuration for starting Tomcat be repeating steps 1 through 3.

    From now on, starting and stopping Tomcat as well as building your projects is accessible with a click of the mouse. Just click the little down-arrow next to that icon with a run symbol and the toolbox, and you'll see a list of the run configurations that you have set up.



    Piece of Cake!!

    Posted on 15 November 2009 | 8:20 pm

    Introduction to Computer Vision with the OpenCV Library on Linux

    Author: Lubos Rendek

    Abstract The purpose of this document is to help a reader to get started with Computer Vision library OpenCV on Linux system. OpencCV is a multi-platform library, but this article will be focused only on OpenCV using Linux operating system ( although, just the installation of the OpenCV library and video camera is platform-specific, all examples in this article should compile on any platform where OpenCV is properly installed such as  Mac OS, MS Windows and etc.).  Reader will be guided through a step-by-step guide on how to install and use some of the basic functions of OpenCV library such as displaying images, playing a video or using a video camera to process a video input stream.

    Conventions used in this article:

    $ - execution on the command line by a non-privileged user # - execution on the command line by a superuser the actual command to be executed on the command line or code of program to be compiled
    OUTPUT: output produced on the command line by command execution NOTE: general notes and additional information Introduction In simple words a Computer Vision is a scientific field which attempts to provide a sight to the machine. This scientific field has expanded rapidly in recent years. Among researchers this growth is because of many improvements of vision algorithms and among the computer vision hobbyists this is due to the cheaper hardware components and processing power.  OpenCV library plays a great role in the Computer Vision field as it helps greatly to reduce cost and preparation time of computer vision research environment needed by university students, hobbyists and professionals. OpenCV also provides a simple to use functions to get the work done in a simple, effective and elegant manner.  OpenCV was started by Intel, and later it was transformed to an open source project now available on SourceForge.net. OpenCV library has multi-platform availability,  and it is partially written in C++ and C language. Despite the fact that this library is available on many Linux distributions from its relevant package repositories, in this article we will attempt to install and use OpenCV library compiled from a source code downloaded from SourceForge.net web site.


    The reasons for compiling a source code may include:
    new version 2.0.0 recently released and more features available some bugs fixed which affected Linux OpenCV 1.0.0 versions ( such as cvGetCaptureProperty() etc. ) more support is available for OpenCV 2.0.0 version than for former 1.0.0 version

    This article will start with installation of OpenCV on Debian 5.0 ( Lenny ). Later a reader will be guided through a number of examples on how to use OpenCV to display an image, play a video and use camera to capture the video input stream.

    Posted on 10 November 2009 | 10:58 pm

    Traveling with my Globe T@ttoo

    I’ve been traveling around Mindanao these past few months and, to keep myself connected to the Internet I’ve been bringing along my Globe Tattoo broadband device. No matter where I am, and even if I’m on vacation, I can’t imagine not being able to connect to my email, social networking services, etc., so I don’t [...]

    Posted on 27 October 2009 | 12:36 pm

    Setting up and using memcached & memcache on Linux CentOS 5/Plesk 9

    The second part of my tutorial on optimizing your server for hosting high traffic websites: installing and configuring memcached and the memcache php extension for your server. This is a little easier than the first step (setting up nginx as reverse proxy, see article below) and can be applied to any kind of dynamic website.


    What's the point ?
    On highly dynamic websites such as forums, news sites or any user content based website, the database server load is often very high. The more traffic you get, the more cluttered your database server becomes, sometimes rendering your website completely unavailable to visitors. Using a data caching daemon will allow you to save some data in memory instead of fetching the data from the database every time. You should know that memcached is used by major websites such as Wikipedia, SourceForge, SlashDot... need I say more?

    What is memcached ?
    Memcached is the daemon running on your server. Its usage is extremely simple, there are no configuration files, all you do is start the daemon on a given port, and your websites will connect to this daemon to store data in memory. Yes, the data is stored in your RAM. So when starting memcached you'll have to decide how much RAM memcached will be allowed to use. If you start memcached with a 1GB memory space, memcached will store this much data; when the cache is full some of the older data will begin to disappear from the cache.

    What is memcache ?
    Memcache, in our case, is the PHP extension that will allow us to connect to and make use of Memcached. This PHP extension is not part of the default ones so you'll have to download and install it (see step 2). It provides classes as well as functions that I must admit are very easy to use and understandable. In this article, I provide a mysql+memcache wrapper class for anyone to use.

    What is the difference between memcached and memcache ?
    Well if you've read the two points above, you should already know. In short, memcached is the daemon running on your machine; memcache is the PHP extension allowing you to make use of memcached.


    1. Setting up memcached

    I haven't found memcached in my repositories (might aswell try # yum install memcached just in case?) so I'll download the source and compile it. First go get the latest version from the official website.
    # wget http://memcached.googlecode.com/files/memcached-1.4.1.tar.gz
    # tar zxvf memcached-1.4.1.tar.gz
    # cd memcached-1.4.1
    # ./configure
    If like me you get this message "libevent is missing" or something, you can run this command:
    # yum install libevent-devel
    And then run configure again:
    # ./configure
    Install memcached:
    # make install
    That's it, you're set! That was pretty easy wasn't it? We'll now see the command line arguments for starting memcached:
    # memcached -d -m 1024 -l 127.0.0.1 -p 11211 -u nobody
    The arguments are:
    -d : start as daemon, running in the background
    -m 1024: allow memcached to use up to 1024 MB of RAM (1GB)
    -l 127.0.0.1: listen on local interface
    -p 11211: listen on port 11211
    -u nobody: run as user "nobody"

    If you're not sure how much memory you should allocate to memcached, try running this command first:
    # free
    It will tell you how much free RAM you've got left.
    Note that upon starting memcached, if all is OK, you will see no output message. To see if memcached is correctly started, run this command:
    # ps aux | grep memcached
    You should be seeing something like this:
    nobody   13133  0.0  0.0  43580   732 ?        Ssl  07:11   0:00 memcached -d -m 128 -l 127.0.0.1 -p 11211 -u nobody
    user     13143  0.0  0.0   4152   648 pts/0    R+   07:11   0:00 grep memcached



    2. Setting up memcache PHP extension
    The memcache PHP extension should be found in the classic repositories, so try this command:
    # yum install php-pecl-memcache
    If you're lucky (why should you be unlucky anyway?) the install will work fine and you'll be seeing these messages:
    Installed: php-pecl-memcache.i386 0:2.2.3-1.el5_2
    Dependency Installed: php-pear.noarch 1:1.4.9-4.el5.1
    Complete!
    Just for reference, here's a link to the official memcache website, if you need to grab the sources.

     Let's see if memcache was installed properly. First restart the httpd:
     # service httpd restart
    Then place a simple php file on your website containing the following code:
    phpinfo(); 
    Open the PHP file in your browser (eg. http://mydomain.com/phpinfo.php ) and have a look at the output. If you can find a "memcache" section looking like the following picture, it means memcache was successfully installed.

    We will now have a look at the memcache configuration file. First locate your php module configuration files folder, in my case /etc/php.d/ . You should find the newly installed "memcache.ini" configuration file. Open it up to see a list of configuration keys and their meaning.
    The default options are just fine, but if you're interested, you should know that memcache offers load-balancing features through the "allow_failover" configuration key. I'm not going to make use of this feature so I will not be editing any of the settings.


    3. Using memcache in your code
    Unfortunately, installing both components isn't enough. You'll have to edit your code in order to make use of the caching features. Be reassured though, it couldn't be easier! There are a couple of functions you'll need to use, nothing complex.
    If you want to find out the complete listing of the memcache php functions, visit the official website. Basically we'll be using 5 methods:
    - Memcache::connect($host, $port, $timeout): connect to your daemon
    - Memcache::get($key) : fetch data from your cache
    - Memcache::set($key, $var, $flag, $expire): store data in your cache
    - Memcache::delete($key): remove data from your cache
    - Memcache::close(): disconnect.

    You can cache any data that you want:
    $mc = new Memcache;
    $mc->connect("localhost", 11211);
    $saved_data = $mc->get("saved_data");
    if (!$saved_data) {
      $saved_data = file_get_contents("myfile.txt");
      $mc->set("saved_data", $saved_data, MEMCACHE_COMPRESSED, 60*60*24*7); // store for 7 days
    }
    echo $saved_data;
    $mc->close();

    Applied to MySQL queries:

    $mc = new Memcache;
    $mc->connect("localhost", 11211);
    $news_articles = $mc->get("news_articles");
    if (!$news_articles) {
      $news_articles = array();
      $query = "SELECT * FROM news_articles ORDER BY article_id DESC LIMIT 0,10";
      $result = mysql_query($query);
      while($row = mysql_fetch_assoc($result)) $news_articles[] = $row;
      $mc->set("news_articles", serialize($news_articles), MEMCACHE_COMPRESSED, 60*60*24*7); // store for 7 days, but don't forget to rebuild the cache when a new article is posted!
    } else {
      $news_articles = unserialize($news_articles);
    }
    // Display articles..
    $mc->close();
    As you can see in the example above, I use the "serialize" and "unserialize" php functions. Why is that? The reason is because the Memcache::get() function always returns a string. So if you want to store an array of data (or an object), you'll have to serialize said array, and unserialize it after having read it from the database.
    If you know a better workaround for this problem please feel free to leave a comment.


    4. Wrapper class for memcache & mysql
    I have just written a simple wrapper class for MySQL, making use of the powerful caching system offered by memcache. You can download the class here, I included a simple example for testing the class.
    The principle is very simple: when executing a query, the script will check if the query result is already in the cache. If the data is in the cache, it is returned immediatly (no query executed). if the data is not in the cache, the query is executed, and the results are then placed in the cache with the specified "time to live".

    Here are the wrapper class functions:
    function MySQLMemcache($mysql_info, $memcache_info, $autoconnect=true, $enable_logging=true);
    function connect();
    function disconnect();
    function dataQuery($query, $usecache=true, $ttl=0);
    function nonDataQuery($query);
    function fieldDataQuery($query, $field, $usecache=true, $ttl=0);

    More documentation is provided inside the actual php file.

    Thank you for reading, feel free to leave a comment if this article has been helpful to you.
    I'm finished with my server optimization thematic.
    TTFN!

    Posted on 30 September 2009 | 8:03 am

    Strategie-online.nl – Online Strategie

    Het laatste nieuws op Online Strategisch gebied! Het hebben van een online strategie is tegenwoordig een veel gebruikte marketing term, maar wat houdt het nu in? Geinteresseerd in het laatste nieuws op Online Strategisch gebied? Wat is online strategie? Neem even een kijkje op www.stategie-online.nl of check de MaxServ Twitter http://www.strategie-online.nl

    Posted on 28 September 2009 | 2:27 pm

    C++ : Understanding pointers

    Author: Lubos Rendek

    Date: 10.09.2009

    Update: 04.03.2010 - Section 7.2 created clarify relation between Pointers and Arrays in C++

    Introduction

    This article is intended to all programing enthusiasts on all levels who do wish to understand pointers in C++ language.  All code presented here is not a compiler specific and all examples will be written in plain ANSI C++. Debate about pointers can stretch for miles, and you would need to go really far to master it all. If you really want to run that far, this article gives you a clear understanding of fundamental concepts about pointers and prepares you for that journey. However, those who are new to C++ programming make sure that  you are able to write and run your own C++ “hello world” program, and also it is recommended that you have a basic understanding of C++ functions and classes. If you need to refresh your knowledge about how to compile and run C++ program, use functions and classes, please read an appendix at the end of this document before you continue reading this article.

    What is a Pointer?

    Pointer is a variable that stores a memory address. OK, that is simple ! But, what is a memory address then? Every variable is located under unique location within a computer's memory and this unique location has its own unique address, the memory address. Normally, variables hold values such as 5 or “hello” and these values are stored under specific location within computer memory. However, pointer is a different beast, because it holds the memory address as its value and has an ability to “point” ( hence pointer ) to certain value within a memory, by use of its associated memory address.

    Retrieving a Variable's Memory Address

    OK, enough talking and let's get down to the pointer business. To retrieve a variable's memory address, we need to use address-of operator &.

    #include <iostream>
    int main()
    {
    using namespace std;
    // Declare an integer variable and initialize it with 99
    unsigned short int myInt = 99;
    // Print out value of myInt
    cout << myInt << endl;
    // Use address-of operator & to print out
    // a memory address of myInt
    cout << &myInt << endl;

    return 0;
    }

    OUTPUT:

    99
    0xbff26312

    The first line of the output contains an integer value 99 and on the second line, there is a memory address of myInt printed out. Please note that your output will be different.

     

    Assigning a Variable's Memory Address to a Pointer

    Before we can assign a memory address to a pointer, we need to declare one. Declaring a pointer in C++ is as simple as to declare any other variable with one single difference. Asterix symbol " * " needs to be add and located after variable type and before a variable name. One rule has to be followed when assigning memory address to a pointer: pointer type has to match with variable type it will point to. One exception is a pointer to void, which can handle different types of variables it will point to. To declare a pointer pMark of type unsigned short int a following syntax is to be used:

    #include <iostream>

    int main()
    {
    using namespace std;

    // Declare and initialize a pointer.
    unsigned short int * pPointer = 0;
    // Declare an integer variable and initialize it with 35698
    unsigned short int twoInt = 35698;
    // Declare an integer variable and initialize it with 77
    unsigned short int oneInt = 77;
    // Use address-of operator & to assign a memory address of twoInt to a pointer
    pPointer = &twoInt;
    // Pointer pPointer now holds a memory address of twoInt

    // Print out associated memory addresses and its values
    cout << "pPointer's memory address:\t\t" << &pPointer << endl;
    cout << "Integer's oneInt memory address:\t" << &oneInt << "\tInteger value:\t" << oneInt << endl;
    cout << "Integer's twoInt memory address:\t" << &twoInt << "\tInteger value:\t" << twoInt << endl;
    cout << "pPointer is pointing to memory address:\t" << pPointer << "\tInteger value:\t" << *pPointer << endl;

    return 0;
    }

    OUTPUT:

    pPointer's memory address: 0xbff43314
    Integer's oneInt memory address: 0xbff43318 Integer value: 77
    Integer's twoInt memory address: 0xbff4331a Integer value: 35698
    pPointer is pointing to memory address: 0xbff4331a Integer value: 35698

    The diagram above is a high level visual abstraction of how are variables stored within a computer memory. Pointer pPointer starts at memory address 0xbff43314 and takes 4 bytes. Pointer pPointer holds as a value a memory address of a short int twoInt ( 2 bytes ) which is 0xbff4331a. This address is stored as a binary data within a pointer's memory space allocation. Therefore, dereferencing a pointer with a memory address 0xbff4331a will indirectly access a value of twoInt which is in this case a positive integer 36698.

    Posted on 9 September 2009 | 8:44 pm

    Linux Learning Zone subsidiary of APNIC Solutions Ltd. (c) 2008