17 Feb 2008

Zap bookmarklet

You can find many different bookmarklets to clean un-readable web pages at:

https://www.squarefree.com/bookmarklets/zap.html. They are all compatible with Firefox and most of them are compatible with Internet Explorer and Opera.

For example, you can remove java, flash, background music, third-party iframes, plugins, colors, cheap effects, event handlers, or timers.

12 Jan 2008

Slackware’s Slackbuilds modified for Slamd64

Here’s what I needed to add/modify to the Program.SlackBuild file downloaded from SlackBuilds:

ARCH=${ARCH:-x86_64} # modified
elif [ "$ARCH" = "x86_64"]; then # added
SLKCFLAGS="-O2 -fPIC" # added
LIBDIR=/usr/lib64 # added
fi

A complete example for libgphoto2:

#!/bin/sh

# Slackware build script for libgphoto2

# Written by Frank Caraballo
# No Guarantees. Use this SlackBuild at your own risk.
# Public Domain

# Modified by Michael Wagner
# (change group ownership for udev rules to plugdev, adjust README)
# Do not blame the original author if anything goes wrong with these changes.

# Modified by Robby Workman to fix a bug in
# the way the fdi files are created (the xml header must be the first line,
# so we can't append the autogenerated rules - they must overwrite the file)
# Thanks to amrit for the report.

PRGNAM=libgphoto2
VERSION=2.4.0
ARCH=${ARCH:-x86_64} # changes from i486
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}

CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

DOCS="ABOUT-NLS ChangeLog HACKING INSTALL MAINTAINERS README.in TESTERS"

if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
elif [ "$ARCH" = "x86_64"]; then # added
SLKCFLAGS="-O2 -fPIC" # added
LIBDIR=/usr/lib64 # added
fi

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP || exit 1
rm -rf $PRGNAM-$VERSION
tar -xvjf $CWD/$PRGNAM-$VERSION.tar.bz2 || exit 1
cd $PRGNAM-$VERSION || exit 1
chown -R root:root .
chmod -R u+w,go+r-w,a-s .

CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--disable-static \
--mandir=/usr/man \
--with-doc-dir=/usr/doc/$PRGNAM-$VERSION \
|| exit 1

make || exit 1

# Make sure udev helper scripts are put in the right place and
# install the other utilities to /usr/bin instead of /usr/lib/libgphoto2/
make \
udevscriptdir=/lib/udev \
utilsdir=/usr/bin \
install-strip DESTDIR=$PKG \
|| exit 1

# Install "dummy" udev rules file so it will be removed later if the package
# is uninstalled; the post-install script will append auto-generated rules
mkdir -p $PKG/etc/udev/rules.d
cat << EOF > $PKG/etc/udev/rules.d/90-libgphoto2.rules
# DO NOT EDIT THIS FILE!
# Any custom changes will be lost if the libgphoto package is upgraded.

EOF

mkdir -p $PKG/usr/share/hal/fdi/information/20thirdparty
touch $PKG/usr/share/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi
touch $PKG/usr/share/hal/fdi/information/20thirdparty/10-camera-libgphoto2-device.fdi

# Compress man pages
( cd $PKG/usr/man
find . -type f -exec gzip -9 {} \;
for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done
)

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh

cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz

21 Dec 2007

Laser Listening Device

The laser snooper

Circuit

Step down transformer

laser warning

Introduction:

This project was based on the project by Chuck Clark and Sam Ralston last Fall. I have been interested by this project when I saw this in the ADSL Open House. I also noticed that their project didn’t work. I remembered that I have seen something like this on TV on one of those shows devoted to science and technology. They were showing how intelligence/reconnaissance has turned to laser for information gathering – or more accurately, eaves dropping. After looking at the Fall’s semester’s design I decided to start from scratch. I had an alternative design in mind which I have found from an electronic hobby enthusiast magazine. Here’s the schematic of the circuit and the step down transformer for the audio device.

Project Goal:

By reflecting any type of laser (with no modification of the emitted light) off of a thin media (like a window plane) the Laser Snooper is to capture the reflected beam. The reflected beam is modulated by the vibrations in the pane from noises on the other side of the window. The receiver detects this modulation and reconstructs the noises and conversations. Also, the device in mind was made with parts that are very cheap and easily obtainable.

The Circuit:

In this circuit, the design achieved the objectives of reconstructing the reflected laser beam into real sounds via an audio output port (HEADPHONE JACK). The design also included a way of detecting (METER JACK) the strength of the laser signal received. This was to be used to align the receiver should an invisible laser beam was used. But the device connected to detect the signal is a separate piece of equipment that wasn’t used in this project since a visible bright red Helium Neon laser was used.

Circuit Theory:

The heart of the circuit is a sensitive photo transistor (Q1). Varying light levels across R2 produce a changing voltage level at (Q1) collector that is capacitively coupled thru (C4) to the base of preamplifier transistor (Q2). Resistor R3 bias the base and sets the gain of Q2. Emitter bias is obtained via R5 with signal current being bypassed by C5. The above combination provides a voltage gain of approximately 40 for this stage. The amplified signal is developed across R4 and is capacitively coupled by C7 to gain control pot R6. Capacitor C6 and C9 stabilizes the circuit by bypassing any unwanted oscillations that could occur. The arm of R6 is now capacitively coupled by C8 to the base of Q3. The gain of this second amplifier to 40 by resistor R8 and R10. Output of Q3 is capacitively coupled to Q4 by C11. The gain of this stage is set to 40 by resistors R13 and R14. R12 provides a small amount of degenerative feedback for the system. Output of Q4 is capacitively coupled by C13 to output jack J1 for driving earphone as shown in the schematic printout. Output is intended to couple to a 1000 to 8 ohm step-down audio transformer. The 8 ohm winding drive standard 8 ohm monophonic headsets or a small speaker. The output of Q4 is also coupled to amplifier Q5 via capacitor C12. This stage has a gain of x10 set by resistors R15 and R16. The output is now rectified and integrated onto capacitor C15 and C16. This DC level drives external meter via jack J2. Resistor R7 limits output current to 1/2 mAmps. Use the chart below as a guide to see if the circuit is working properly.

Test Point Chart

Test Point Chart
Battery–A——B———C——–D——-E
9V——-.5DC–4.5DC–3.3DC–1.1DC–6DC

NOTES:

  • A. The receiver circuit is built using discrete semi conductors rather than
    integrated circuits. This indicates that the circuit is purely reactional to
    the collected laser beam. And the method is more flexible allowing for a
    better approach when debugging.
  • B. Capacitor C4 causes the frequency responses to roll off at below 100 HZ.
    This helps reduce the 60 HZ signal from AC light sources. The 2.2 microfarads
    coupling capacitors provides reasonably good response to voice frequency signals.

Factors Affecting the Design:

First, make sure, when building the circuit, the parts are of exact values. In my first circuit, the resistors were of approximate values and the circuit
left all sorts of cut-off currents disabling the circuit. Going by the bands and printed values on the parts are sufficient.

Second, I have found that when the receiver was centered in the brightest spot (middle) of the reflected laser beam the circuit worked poorly compared to when the receiver was placed off-centered. This probably indicated that the circuit was saturated when the receiver was centered. And when it was off-centered, the circuit was able to analyze the weaker (less saturated) laser signal better. This must show that the lower energized beam was better able to become modulated when the beam was contacting the sound source.

This can be useful in that this can mean that the laser can be sent at a longer distant to work even better. And the thickness of the plane where the sound source is found can also affect the performance of the receivers capability to detect any changes in the signal. The thinner the plane, the easier it will vibrate and the better for the laser to be come modulated.

Future Design Considerations:

Although it was said that the greater the distance the laser and the sound source the better the chance the laser will diverge larger giving a weaker signal (which prevents the over-saturation of the circuit) there will come limitations to this process. So, using lenses to converge a larger area of the reflected beam to the receiver will help increase the range of the laser snooper even more. It was printed that the range may be as large as 300 feet versus the current 30 feet range. Although this isn’t really an electronic project, one way to think about as a future design is to implement Jake Janovetz’s Napoleon 56K DSP board to filter out background noise. Background noise was very present from the receiver, and using the DSP board might have helped out in making the receiver work even better than it was designed for.

Conclusion:

This project has helped me relearn the theories learned from ECE342. Transistors were used to bias currents yielding different voltage levels. And capacitors were used to couple points of the circuit to stabilize. Not only did this project help teach some fundamentals of circuit theory, but it was fun to work on and see the results of the project.

Parts List

R1 1 100 Meg 1/2 Watt Resistor
R2,4,10,15 4 10 K 1/4 Watt Resistor
R3,8 2 390 K 1/4 Watt Resistor
R5,14,16 3 1K 1/4 Watt Resistor
R6/S1 1 10 K Pot and 12 V Switch
R7 1 2.2 K 1/4 Watt Resistor
R12 1 5.6 Meg 1/4 Watt Resistor
R13 1 39 K 1/4 Watt Resistor
R17 1 22 K 1/4 Watt Resistor
R9,11 2 220 Ohm 1/4 Watt Resistor
C1 1 470 Pfd Disc Cap
C2 10 2 100 Mfd 25 V Elect Cap
C3 9 2 1000 Pfd Disc Cap
C4 1 .05 Mfd Mylar Cap
C5 1 10 Mfd 25 V Elect Cap
C6 1 .01 Mfd 25 V Disc Cap
C7,8,11,12,13,14 6 2.2 Mfd 25 V N.P. Cap
C15,16 2 1 Mfd 25 V Elect Cap
Q1 1 L14G3 Ultra High Sen Phototransistor
Q2,3,4,5 4 PN222 NPN Transistor
D1,2 2 IN914 Diode
J1 1 RCA Phono Jack
P1 1 RCA Phono Plug
CL1 1 9 V Battery Clip
T1 1 1 K / 8 Ohm Mini Audo Transformer

Slightly modified mirror from http://www.ews.uiuc.edu/~nshin/PROJECTS/LASERSNOOPER/

19 Dec 2007

Firefox: How to customize your UserAgent

Firefox: How to edit the User Agent string

To change the User Agent string, just enter about:config as an address in the address bar of FireFox, the location where you normally enter a URL (link). I recommend to preserve the original value, which you can get when you enter just about: in the address bar.

Now press the right mouse button to get the context menu and select “String” from the menu entry “New”. Enter the preference name “general.useragent.override”, without the quotes. Next, enter the new User Agent value you want Mozilla Firefox to use. I added my name and a link to my web site to the original value. You can also pick one from the list of User Agent strings. Check the new value by entering about: in the address bar.

Source: http://johnbokma.com/mexit/2004/04/24/changinguseragent.html

13 Nov 2007

Molding Processes

Please let me know if I should include some other popular molding processes.

  • Resin Infusion Molding

    Resin Infusion Molding Diagram

  • Injection Molding

    Injection molding Diagram

  • Compression Molding

    Compression molding Diagram

  • Transfer Molding

    Transfer Molding Diagram

  • Reaction Injection Molding

    Reaction Injection Molding Diagram

  • Extrusion molding

    Extrusion Molding Diagram

  • Blow molding

    Blow Molding Diagram

  • Rotational molding (Rotomolding)

    Roto-molding Diagram

    Roto-molding #2

  • Vacuum forming (one of many thermoforming processes)

    Vacuum Forming Diagram

  • Matched molding

    Press the hot sheet between two matched molds. Using no vacuum or pressure, the parts can be easily formed producing crisp details and textured parts. The matched mold method and/or high pressure mechanical shaping of the hot sheets also enables thermoforming of thermoplastic composite materials.

    Matched Molding

  • Trapped-Sheet Contact-Heat Pressure Forming

    Trapped-Sheet Contact-Heat Pressure Forming Diagram

  • Low Pressure Molding (LPM)

    • Expended Polypropylene Molding (EPP)

      The process uses pre-expanded EPP beads as a substrate. The preformed or non-formed TPO skin is inserted in the tool. The press closes and EPP beads are blown from behind the TPO trim. Steam fuses the beads to each other and also to the trim material. Water is sprayed on both sides of the tool until the part reaches an appropriate removal temperature. This process is developed by JSPI Corporation. One can use TPO bilaminate and steam PP beads behind it to reduce one fabrication step and cost. In mold skin-forming capability will make this process more attractive. The low tool cost investment is also very attractive for low volume applications.

      EPP Manufacturing Process

      Expandable Bead Molding Goes High-Tech

    • Expanded Polystyrene Molding (EPS)

      The mold used consists of two hemispherical parts that fit together forming an empty ball-shaped cavity. The two empty parts of the mold are filled with the pre-foamed eps beads. One part of the mold covered with a plastic plate is put on the other part. After the plastic plate is removed the two parts of the mold are bolt together. The eps-filled mold is placed for 10 minutes into a beaker containing boiling water. After fusing (molding) the mold is cooled down by cold water. Afterwards the mold is opened and carefully the polystyrene ball is taken from the mold.

    • Back-Injection Molding

      This process is performed by injecting a puddle of plastic in a nearly closed injection mold or by using a sequential valve gating system for melt injection. The process sequence follows: A TPO skin or skin/foam laminate is inserted, the mold clamps shut, the injected plastic flows and sets, and the finished part is cycled out.

    • Back-Compression Molding

      The TPO skin or skin/foam laminate is inserted in an open mold, the mold is partially closed and plastic is injected at controlled pressure behind the material followed by compression molding. Another variation of the process consists of 1) inserting the TPO cover stock, 2) deposition of melt strip in an open vertical mold by reciprocating screw extruder having X, Y, Z movement, 3) compression forming and cooling, and 4) demolding. This is known as Extrusion Deposition Compression Molding (EDCM).

  • Vacuum plug assist molding

    Vacuum plug assist molding

  • Pressure plug assist forming

    Pressure plug assist forming

  • Lost Foam Casting

    involves:

    1. Molding foam shapes that are direct replicas of your desired parts.
    2. Coating the shape with a thin layer of ceramic coating.
    3. Embedding the foam shape in dry unbound vibrated sand
    4. Pouring metal into the mold dissipating and replacing the foam shape.

    Lost Foam Casting Diagram

  • Selective Laser Sintering

    Sintering is a method for making objects from powder, by heating the material (below its melting point) until its particles adhere to each other

    Sintering

  • Twin-Sheet Forming

    <img src="/notes/wp-content/uploads/2007/11/90-650x600-150x150.jpg" alt=" title=“Twin-Sheet Forming” width=“150” height=“150” class=“alignnone size-thumbnail wp-image-845” />

07 Nov 2007

Free Download: US zip codes list and more

US Zip Code CSV List

It include the zip code, city, state, latitude, longitude, and county (Last Updated: Sept 20, 2007).

City CSV lists (USA and Canada)

They include city name, state/province, latitude, and longitude (Last Updated: July 31, 2007).

Great to import in a database.

Credits: http://geocoder.ibegin.com/downloads.php

27 Oct 2007

DIY: Build a small stool

Material needed:

  • 3      2x4x8
  • 32    3″ Nails (or wood screws)

Tools needed:

  • Saw
  • Pencil
  • Tape measure
  • Square
  • Hammer (or drill if you choose to go with screws)

View the Drawing.

06 Oct 2007

Free Link Checker

Find bad links, dead links or 404s.

The script displays a “.” for each good link and displays the error code and message for each bad link.

churls_web.pl

#!/usr/bin/perl -wT  
use lib '/home/alexpbco/perl/lib/perl5/site_perl/5.8.7';  
use HTML::LinkExtor;  
use LWP::UserAgent;  
use CGI; # qw(fatalsToBrowser);  
use strict;  
use Encode;

my $cgi = new CGI;  
my $base_url = lc($cgi->param('q'));  
my $ua = LWP::UserAgent->new;

$ua->agent("Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.7");  
$ua->protocols_allowed( [ 'http', 'https' ] );  
$ua->cookie_jar({ file => "cookies.txt" });  
$ua->max_size( 200 * 1024 );  
$ua->timeout( 120 );
  
my $parser = HTML::LinkExtor->new(undef, $base_url);  
my $title  = "Dead Link Finder";
  
($title .= " &#8211; ".$base\_url) if ($base\_url);  
print $cgi->header( "text/html" ),  
$cgi->start_html(-title => $title),  
$cgi->h1( $title ),  
$cgi->start\_form( { -action => "churls\_web.pl",  
                     -enctype => "application/x-www-form-urlencoded",  
                     -method => "post" } ),  
$cgi->input( {  -name => "q",  
                -size => "30",  
                -value => "$base_url",  
                -type => "text"} ),  
$cgi->input( {  -name => "search",  
                -value => "search",  
                -type => "submit"} ),  
$cgi->div(" e.g.: http://www.myurl.com/"),  
$cgi->end_form;  
if ($base_url) {  
  my $response = $ua->get($base_url);  
  if ($response->is_success) {  
    $parser->parse(decode_utf8($response->content));  
  }  
  else {  
    print $cgi->p($response->status_line);  
    print $cgi->end_html();  
    return;  
  }

  my @links = $parser->links;  
  print $cgi->h2("Results:");  
  my ($badlinksnum, $alllinks) = 0;  
  foreach my $linkarray (@links) {  
    my @element = @$linkarray;  
    my $elt_type = shift @element;  
    while (@element) {  
      my ($attr\_name , $attr\_value) = splice(@element, 0, 2);  
      if ($attr_value->scheme =~ /\b(https?)\b/) {  
        sleep 1; #1 second pause between get requests  
        my $response\_temp =$ua->get($attr\_value);  
        unless ($response\_temp->is\_success) {  
          print $cgi->p($attr_value." &#8211; **".$response\_temp->status\_line."**");  
          $badlinksnum++;  
        }  
        else {  
          print $cgi->span("."); # print "." for each good link (to prevent timeouts and show progress)  
          $alllinks++;  
        }  
        $|=1; # send HTML to browser right away to prevent timeouts  
        return if ($alllinks >= 500);  
      }  
    }  
  }  
  print $cgi->h3("Checked $alllinks link(s) and found **$badlinksnum** bad link(s)");  
}  
print $cgi->end_html();

25 Sep 2007

Extract Data From Wordnet

Get a word’s definition(s), synonyms and hyponyms (related words) using perl and WordNet. The word must be specified as a command line argument, but the script could easily be modified to use an html parameter.

What you need:

  1. Download and Install WordNet

  2. Download and Install this Perl interface by Jason Rennie

  3. Download this Perl Script:

  4. usage: perl wordnet.pl word

    #!/usr/bin/perl -w
    use strict;
    use warnings;
    use WordNet::QueryData;

    my $word = $ARGV[0] or exit(usage());
    my $wn = WordNet::QueryData->new;
    my @senses = $wn->querySense("$word#n", “glos”);
    my $i = 1;

    foreach my $sense(@senses) {
    my $temp_sense = join(",", $wn->querySense($sense, “glos”));
    my $temp_synset = join(",", $wn->querySense($sense, “syns”));
    my $temp_hyponyms = join(",", $wn->querySense($sense, “hypo”));
    $temp_synset =~ s/#\w#\d+//g;
    $temp_hyponyms =~ s/#\w#\d+//g;
    $temp_synset =~ s// /g;
    $temp_hyponyms =~ s/
    / /g;
    print $i.". “.$temp_sense."\n”;
    print “Synonyms: “.$temp_synset."\n”;
    print “Related: “.$temp_hyponyms."\n”;
    $i++;
    }

    sub usage{
    print “\n\n\nUsage: “.$0.” word\n\n\n\n”;
    }

25 Sep 2007

Importing Wikimedia Dump File to MySQL

Importing Wikimedia’s (wikipedia) Dump File to MySQL

  1. Create “wiktionary” schema

  2. Import wikimedia’s DB structure using tables.sql

    $ mysql -u root -p wiktionary < tables.sql

  3. Import the dump file to your new database using mwdumper.jar

    $ java -jar mwdumper.jar –format=sql:1.5 enwiktionary-20070914-pages-meta-current.xml.bz2 | mysql -u root -p wiktionary

Optional

Copy the ‘old_text’ column from the ’text’ table to the ‘page’ table

    mysql> UPDATE 'wiktionary'.'page','wiktionary'.'text' SET 'wiktionary'.'page'.'old_text'='wiktionary'.'text'.'old_text' WHERE 'wiktionary'.'page'.'page_latest' = 'wiktionary'.'text'.'old_id'

Delete non-English rows:

    mysql> DELETE FROM 'wiktionary'.'page' where old_text not LIKE '%==English==%'

Remove results not in namespace 0 (see Wiktionary:Namespace):

    mysql> DELETE FROM 'wiktionary'.'page' WHERE 'wiktionary'.'page'.'namespace' != 0

25 Sep 2007

Install a Perl Module on a Shared Host
  1. Setup cpan:

     $ mkdir ~/perl
     $ mkdir -p ~/.cpan/CPAN  
     $ touch ~/.cpan/CPAN/MyConfig.pm  
     $ cpan
     cpan> o conf init
    

    Set the following settings:

     'cpan_home' => q[/home/username/.cpan],  
     'build_dir' => q[/home/username/.cpan/build]  
     'keep_source_where' => q[/home/username/.cpan/sources],  
     'mbuildpl_arg' => q[--install_base /home/username/perl]
    
  2. Get and Install the Module

     $ cpan force install Module::Name           
    
  3. Make sure Perl can find your modules

    Add this line in each of your Perl scripts (change perl version accordingly):

     use lib '/home/your_username/perl/lib/perl5/site_perl/5.8.7';
    

    OR rather than editing all your Perl scripts, in your cgi-bin/.htaccess file:

     SetEnvIf Request\_URI "^/cgi-bin/" PERL5LIB=/home/your_username/perl/lib/perl5/site_perl/5.8.7:/home/your_username/perl/lib/perl5/site_perl/5.8.7/site\_perl
    

    OR in your .bash_profile:

     export PERL5LIB=/home/your_username/perl/lib/perl5/site_perl/5.8.7:/home/your_username/perl/lib:/home/your_username/perl/lib/perl5:/home/your_username/perl/lib/perl5/site_perl
    

It won’t be effective until you log back in, if you want to make it effective in your current session, just type the EXPORT line in your command prompt.

08 Sep 2007

Recording a skype conversation

First, download and install Audacity.

Then, to be able to record both the microphone input and the sound card output at the same time using Audacity, you have to un-mute the microphone playback in the Volume control.

  1. Double click the speaker in the System Tray
  2. Click Options – Properties – Playback – Check Microphone – Click OK
  3. Un-check the microphones mute and raise the volume

You should now be able to hear yourself in the speakers or earphone when you talk in the microphone and also be able to record the output (person you called) and the input (you) in Audacity. Select Stereo Mix on Audacity’s Mixer Toolbar and hit Record.

27 Apr 2007

Change Windows Command Prompt Default Folder

Example: changing default directory to C:\

  • Right click on command prompt shortcut and choose properties
  • Change the Target to: ‘%SystemRoot%\system32\cmd.exe /K cd ....’
  • Click OK and your shortcut is ready.

Note: type “cmd /?” in a command prompt to see all options

25 Apr 2007

Batch Convertion from PDF to jpg

Programs needed for batch converting PDFs to an image file (pdf2jpg, pdf2jpeg, pdf2png):

  1. ImageMagick
  2. Ghostscript Download

Note: Once Ghostscript is installed, you might need to add it to your PATH environment variable. To do this in Windows, go to Control Panel -> System -> Advanced, Environment Variables. Then click “path” variable in System Variables and choose edit. Add Ghostscript’s bin path (ie: ;”c:\program files\gs856\gs8.56\bin”). All paths are semi-colon separated.

Then go to the directory your images are located using command prompt (Windows) or shell (Linux) and type a command like this:

mogrify -rotate 90 -scale 15% -format jpg *.PDF

This command rotates the PDF 90 degrees clockwise, scale it down to 15% of it’s original size and convert it to JPG (great for thumbnails).

WARNING: mogrify can overwrite your original images if you keep the same format, create a backup before pocessing them. See Mogrify Documentation.

20 Apr 2007

Clean Tomato Stain From Plastic Container

To clean tomato sauce stains from a plastic container, lay it in the sun for two to three hours. It really works (in Florida anyways..).

10 Apr 2007

Gimp GIF Animation using Blender’s Generated Frames
  1. Create new new empty image using gimp with the same dimensions as your Blender frames

  2. Press CTRL+ALT+O to open blender frames as layers

  3. Press NAME to sort them by descending alphabetical order to have the layer show up in the right order

  4. Select first frame, hold SHIFT and select last frame and click Open

  5. Click File – Save as.. (or Save a Copy..) and choose a filename ending with .gif

  6. Click Save As Animation – Export and finally OK

10 Apr 2007

Path Too Deep Error Message

It is probably because you have too many sub-directories. For example, move a file located at: X:\dir1\dir2\dir3\dir4\file.ext to X:\dir1\file.ext. Where X would possibly be a network share mounted as a drive (a software limit).

22 Mar 2007

Home Camera Security System

Resources for setting up a motion-detection camera security system controlled from your PC using an analog camera.

  1. Tutorials

  2. Software

    • Dorgem (Free)Supports an unlimited number of simultaneous cameras. It has a built-in webserver for still images and can be used as security camera because of its motion detection. (Windows)
    • Motion (Free)Software motion detector for Linux. Guide or Download
    • ZoneMinder (Free)Set of applications which together provides a complete surveillance solution allowing capture, analysis, recording and monitoring of any cctv cameras attached to a Linux based machine. Documentation or Download
    • Gspy (Free)Special motion detection algorithms are used to reduce the size of the daily movies by eliminating pictures with similar content as well as the mpeg compression. (Linux)
    • VideoLAN (Free)Video streaming server with extended [Resources for setting up a motion-detection camera security system controlled from your PC using an analog camera.
  3. Look for a TV Tuner card or USB capture device with composite(RCA) input if you have an analog camera. Get one which uses one of the following chipset (Should be listed in the product’s specifications):

    You should be able to find something for about $20 to $30 on the internet.

  4. My Setup

    • I have a TV Tuner card with cable, composite and s-video inputs which has an SAA7130 chip (Module SAA7134 from Kernel 2.6.X is required) I couldn’t get it to work with Zone Minder, but it does work pretty well with Motion. I got it from eBay for $15.
    • I also bought an analog wireless camera with receiver for $30 on eBay (composite output).
    • Motion. It is not a GUI program but it is easily setup from the motion.conf file and has many nice features (capture video or pictures on motion detection for example).
    • I use Slackware on a P-III 1Ghz (I get about 5 frame per second while motion is detected)

25 Jan 2007

Digital Camera's digital zoom VS The Gimp zoom

Here are 3 pictures I shot with a Fuji F30 at 6.3 megapixels.

  1. First Picture: No camera zoom and zoomed 18.5x on the computer (using The Gimp).
  2. Second one: 3x optical zoom and 6.2x on the computer.
  3. Third one: 3x optical zoom and 6.2x camera digital zoom.

Conclusion: In the case of the Fuji F30, using your camera’s digital zoom gives better results than what you can achieve with an image editing software zoom (results may vary with a different camera).

Digital Camera - Digital and Optical Zoom Zomparison

19 Jan 2007

Spyware Tips

Spywares, viruses and trojans are everywhere on the Internet, you have to be very careful to avoid them.

Prevention

  1. Keep Windows up-to-date, check for updates at least once a week using windows update, or even better set Windows Update to be launched automatically everyday
  2. Use a firewall preferably with stateful packet inspection, like the one included with Windows XP, ZoneAlarm (Free) or Kerio Winroute Firewall 6 which is a 30 shareware trial.
  3. Use 2 or 3 Spyware removal utilities such as (because none of them can catch them all):
  4. Use an antivirus and keep the virus definition database updated.
  5. Get Firefox to browse the web along with flashblock and adblock extensions to block most of the ads and popups if you wish.
  6. *Be very careful with this* Stop any Windows Services you don’t use (but don’t stop any that you aren’t 115% sure what they do, some are required for your computer to work). See : Windows XP Service Configuration
  7. Never execute a file you don’t expect to receive (ie, by E-mail)
  8. Nothing is free (generally), so don’t accept any deals, softwares or offers that feels too good to be true, they aren’t
  9. Don’t read SPAM E-mails (they can contain viruses or spywares)

Detecting presence of badware (spyware, malware and such)

  1. Many popup windows when Windows starts or when you browse the web
  2. New search bar in Internet Explorer
  3. Can’t change your browser homepage (browser hijacking)
  4. Your computer gets very slow or gives you error messages
  5. Check running programs and verify if they are bad
    • Using Process explorer, you can see all running programs and processes.

    • Then go to Task List Programs or

      Windows Process Library and make sure all programs are

      good and supposed to be running. If you can’t find a process, use Google, you should be able to find some information about it.

    • Then right click on the bad process and Kill it (that doesn’t remove the spyware, it just stop it for now.)