CNet Download.com hosting adware/malware

By , 2011-09-23 12:29

I had noticed this a little while ago, but it seems they’re stepping it up.

Seriously, does CBS have no better revenue generation method than to install crapware on people’s computers?

See for example Pidgin Portable: http://download.cnet.com/Pidgin-Portable/3000-2150_4-10834880.html?tag=mncol;3

and this post on UltraVNC forums

https://forum.ultravnc.net/viewtopic.php?f=6&t=28692

Modified photo.html.php for widewind gallery3 theme

By , 2011-09-20 23:49

This enables dynamic resizing of the photo displayed, and enables the pseudo-lightbox popup to view the “full” resized image for users that can’t view the true full image.

< ?php defined("SYSPATH") or die("No direct script access.") ?>
 
<!-- Use javascript to show the full size as an overlay on the current page -->
<script type="text/javascript">
  $(document).ready(function() {
    full_dims = [< ?= $theme->item()->width ?>, < ?= $theme->item()->height ?>];
    $(".g-fullsize-link").click(function() {
      $.gallery_show_full_size(< ?= html::js_string($theme->item()->file_url()) ?>, full_dims[0], full_dims[1]);
      return false;
    });
    resize_dims = [< ?= $theme->item()->resize_width ?>, < ?= $theme->item()->resize_height ?>];
    $(".g-resized-link").click(function() {
      $.gallery_show_full_size(< ?= html::js_string($theme->item()->resize_url()) ?>, resize_dims[0], resize_dims[1]);
      return false;
    });
    // After the image is rotated or replaced we have to reload the image dimensions
    // so that the full size view isn't distorted.
    $("#g-photo").bind("gallery.change", function() {
      $.ajax({
        url: "< ?= url::site("items/dimensions/" . $theme->item()->id) ?>",
        dataType: "json",
        success: function(data, textStatus) {
          full_dims = data.full;
        }
      });
    });
  });
</script>
<style>
img.g-resize {
        width: 100%;
        height: auto;
}
</style>
<div id="g-item">
  < ?= $theme->photo_top() ?>
 
  < ?= $theme->paginator() ?>
 
  <div id="g-photo">
    < ?= $theme->resize_top($item) ?>
    < ? if (access::can("view_full", $item)): ?>
    <a href="<?= $item->file_url() ?>" title="< ?= t("View full size")->for_html_attr() ?>">
    < ? else: ?>
        </a><a href="<?= $item->resize_url() ?>" title="< ?= t("View full size")->for_html_attr() ?>">
    < ? endif; ?>
    < ?= $item->resize_img(array("id" => "g-item-id-{$item->id}", "class" => "g-resize")) ?>
        </a>
    < ?= $theme->resize_bottom($item) ?>
  </div>
 
  <div id="g-info">
    <h1>< ?= html::purify($item->title) ?></h1>
    <div>< ?= nl2br(html::purify($item->description)) ?></div>
  </div>
 
  < ?= $theme->photo_bottom() ?>
</div>

How to dynamically resize an image using CSS

By , 2011-09-20 23:03
 <style> 
img.g-resize { 
        width: 100%;
        height: auto;
}
</style>

Where g-resize is the class assigned to the img you want to have dynamically resized.

Thanks to http://michelf.com/weblog/2005/liquid-image/

How to recursively delete files matching a pattern

By , 2011-09-13 09:45

cd to the folder, run :

$ find . -name '*attach*' | xargs rm

where attach is the keyword present in all filenames to delete.

3 monitors and Updated xorg mesa drivers for Ubuntu Natty

By , 2011-09-09 14:34

I’m currently running Ubuntu Natty as my primary OS at work.

My setup is a Precision T3500 workstation that came with two NVIDIA Quadro cards which were a nightmare for Linux support. I heard that ATI cards supported 3 monitors on one card, as long as one of them was DisplayPort. I saw a cheap Radeon HD 5450 on sale for about $40, so I picked it up only to notice that it had an HDMI port instead of DisplayPort. I figured I’d try it anyway and was surprised to find that with the open-source radeon driver, 3 monitors work! One is connected by VGA, one HDMI and one DVI.

I had, however been experiencing random X crashes, and I suspect the problem was with the radeon driver.

Currently testing out some updated xorg drivers found at:

http://phoronix.com/forums/showthread.php?50038-Updated-and-Optimized-Ubuntu-Free-Graphics-Drivers

 

My system specs:

$ sudo lshw -short
H/W path         Device      Class       Description
====================================================
                             system      Precision WorkStation T3500 ()
/0                           bus         09KPNV
/0/0                         memory      64KiB BIOS
/0/400                       processor   Intel(R) Xeon(R) CPU           W3530  @ 2.80GHz
/0/400/700                   memory      256KiB L1 cache
/0/400/701                   memory      1MiB L2 cache
/0/400/704                   memory      8MiB L3 cache
/0/1000                      memory      14GiB System Memory
/0/1000/0                    memory      2GiB DIMM DDR3 1333 MHz (0.8 ns)
/0/1000/1                    memory      2GiB DIMM DDR3 1333 MHz (0.8 ns)
/0/1000/2                    memory      2GiB DIMM DDR3 1333 MHz (0.8 ns)
/0/1000/3                    memory      4GiB DIMM DDR3 1333 MHz (0.8 ns)
/0/1000/4                    memory      4GiB DIMM DDR3 1333 MHz (0.8 ns)
/0/1000/5                    memory      DIMM DDR3 Synchronous [empty]
/0/100                       bridge      5520/5500/X58 I/O Hub to ESI Port
/0/100/1                     bridge      5520/5500/X58 I/O Hub PCI Express Root Port 1
/0/100/1/0       eth0        network     82574L Gigabit Network Connection
/0/100/3                     bridge      5520/5500/X58 I/O Hub PCI Express Root Port 3
/0/100/3/0                   display     Cedar PRO [Radeon HD 5450]
/0/100/3/0.1                 multimedia  Manhattan HDMI Audio [Mobility Radeon HD 5000 Series]
/0/100/7                     bridge      5520/5500/X58 I/O Hub PCI Express Root Port 7
/0/100/14                    generic     5520/5500/X58 I/O Hub System Management Registers
/0/100/14.1                  generic     5520/5500/X58 I/O Hub GPIO and Scratch Pad Registers
/0/100/14.2                  generic     5520/5500/X58 I/O Hub Control Status and RAS Registers
/0/100/1a                    bus         82801JI (ICH10 Family) USB UHCI Controller #4
/0/100/1a.1                  bus         82801JI (ICH10 Family) USB UHCI Controller #5
/0/100/1a.2                  bus         82801JI (ICH10 Family) USB UHCI Controller #6
/0/100/1a.7                  bus         82801JI (ICH10 Family) USB2 EHCI Controller #2
/0/100/1b                    multimedia  82801JI (ICH10 Family) HD Audio Controller
/0/100/1c                    bridge      82801JI (ICH10 Family) PCI Express Root Port 1
/0/100/1c.5                  bridge      82801JI (ICH10 Family) PCI Express Root Port 6
/0/100/1c.5/0    eth1        network     NetXtreme BCM5761 Gigabit Ethernet PCIe
/0/100/1d                    bus         82801JI (ICH10 Family) USB UHCI Controller #1
/0/100/1d.1                  bus         82801JI (ICH10 Family) USB UHCI Controller #2
/0/100/1d.2                  bus         82801JI (ICH10 Family) USB UHCI Controller #3
/0/100/1d.7                  bus         82801JI (ICH10 Family) USB2 EHCI Controller #1
/0/100/1e                    bridge      82801 PCI Bridge
/0/100/1f                    bridge      82801JIR (ICH10R) LPC Interface Controller
/0/100/1f.2      scsi0       storage     82801JI (ICH10 Family) SATA AHCI Controller
/0/100/1f.2/0    /dev/sda    disk        250GB ST3250318AS
/0/100/1f.2/0/1  /dev/sda1   volume      101MiB Linux filesystem partition
/0/100/1f.2/0/2  /dev/sda2   volume      4102MiB Linux swap volume
/0/100/1f.2/0/3  /dev/sda3   volume      20GiB EXT4 volume
/0/100/1f.2/0/4  /dev/sda4   volume      208GiB EXT4 volume
/0/100/1f.2/1    /dev/sdb    disk        1500GB WDC WD15EARS-00M
/0/100/1f.2/1/1  /dev/sdb1   volume      499GiB Data partition
/0/100/1f.2/1/2  /dev/sdb2   volume      897GiB Data partition
/0/100/1f.2/2    /dev/cdrom  disk        DVD-ROM TS-H353C
/0/100/1f.2/3    /dev/cdrw   disk        DVD+-RW TS-H653F
/0/100/1f.2/3/0  /dev/cdrw   disk        
/0/100/1f.3                  bus         82801JI (ICH10 Family) SMBus Controller

Strange situation change

By , 2011-09-08 13:47

Just noticed something today.

A few years ago I was living in residence at St. Paul University. The internet access there was managed by an access controller which redirected all new connections to wireless.colubris.com. After some investigation, I realized there was a way to work around the bandwidth limitations and session timeouts with the use of a DNS forwarder, a Web server, MAC address spoofing, a SOCKS proxy server software and a pseudo-keepalive tool, the ever-useful Firefox addon Reloadevery. This allowed for much more effective use of the available network connectivity.

Fast forward to the present, and I now find myself on the other side. We now have installed our own HP ProCurve access controller, technology which HP acquired through the purchase of Colubris Inc.

so, wireless.colubris.com, we meet again. Things look different from this side.

Custom theme by me. Based on Panorama by Themocracy