Monday, August 29, 2011

Geekwear

Added another piece of geek wear to the family line. This makes a third men’s accessory that can be created from old computer parts. Always looking for new ways to re-purpose what we have. The first accessory we came up with was the geek belt:

Down where I live bolo’s or a sort of tie substitute are a big thing. so we came up with the geek bolo:

In fact, you could use it to carry around a working network patch cable. Beauty and functionality combined.
The newest member of the group is the Geek cuff links:

Shame I do not have a French cuff shirt to really show them off. Doing all that work sort of makes me hungry.
If you can hack computers, why not get into hacking food. You do not have to depend on the Pizza deliveryman. What is more interesting is that it is a way to fill in down time if you have any. Why not make your own pizzas. Two of my favorite pizzas are soda bread pizza 1, soda bread pizza 2, and good old yeast pizza.

You may want to get into other hacking such as making your own cheese, bread, and tomato sauce.

Last of all, if you are tire of pizza, you can always make your own fast food clones such as the mcmuffin and the homemade quarterpounder (meat weight before cooking).

You can find these and other fine hacks at http://www.instructables.com/member/computothought.

Sunday, August 28, 2011

Odds and ends.

Yep, it was getting near Easter. of course it is another be careful of overeating time. Cheese cake is a big thing at Easter at our house.

Looks store bought, but it is actually home made. Think mom’s hand mixer finally died in the making of this one.
You never know what you can use in a different way. On rare occasions, we will eat at a fast food restaurant. Normally I do not drink coffee, but looking at the coffee stirrers there had to be another use for them. This is what I came up with:

Now when I see a restaurant that has these, I will go in and get just a few for immediate needs.
One program I am beginning to like is jNetMap. Originally I think it was just a java only version. Now it is at least for Debian a packaged version. Great way to see what is on your network especially for newbies like me.

How to set it up.

The map:



My old pads.... and squeeze a video.


Hope to have an Ipad2 soon to show.

Squeeze a video.
I may have talked about this before, but I just wanted to spent a bit more time on it. I hear people complain all the time that they do not have enough space to hold all of their allegedly legitimate movie backups. I am concerned with space also but just for the movies we make ourselves. They are usually .avi format. Usually it takes two commands to get the files to the .ogv (ogg video) format. The .ogv formatted files can be at least 1/3 smaller than the original .avi file. Not only do the .avi files consume space but take a lot longer to upload. Usually it takes two commands to get the job done. I made a special command file to deal with converting one file to save a log of typing.
sv.sh
01echo Squeezing video of $1.avi
02echo --------------------------------------------------
03echo Going from avi to mpeg.
04ffmpeg -i $1.avi -b 100000k -ab 128k -ar 44100 $1.mpeg
05
06echo Avi to mpeg done.
07echo Going from mpeg to ogv
08ffmpeg2theora $1.mpeg
09
10echo Removing unneeded mpeg file to free space.
11rm $1.mpeg
12
13echo Done
14echo ----------------------------------------------------
15echo List ogv file
16ls -al $1.ogv
17echo ====================================================
$ chmod +x sv.sh
To compress a file named p,avi, you would use:
$ ./sv.sh p
But then I thought about it and wanted to automatically do several files at once say late at night so I came up with this:
smv.sh
01for f in *.avi
02do
03clear
04echo "Processing $f file..."
05# take action on each file. $f store current file name
06echo
07echo Squeezing video of $f
08echo --------------------------------------------------
09echo Going from avi to mpeg.
10filename=${f%\.*}
11echo ${filename}
12ffmpeg -i $f -b 100000k -ab 128k -ar 44100 ${filename}.mpeg
13
14echo Avi to mpeg done.
15echo
16echo Going from mpeg to ogv
17ffmpeg2theora ${filename}.mpeg
18
19echo Removing unneeded mpeg and avi file to free space.
20rm ${filename}.mpeg
21# uncomment the following only if the avi files are duplicates..
22# rm $f
23
24echo Done
25echo ----------------------------------------------------
26echo List ogv file
27ls -al ${filename}.ogv
28
29echo appending filename to list of files converted
30echo ${filename} >> filesdone
31echo ====================================================
32done
To run /path/to/command five minutes after midnight, every day, enter:
# crontab -e
5 0 * * * /path/to/smv.sh
Note: I would only put a copy of the avi files in the working directory. The avi files could then be deleted so they would not be reconverted the next night. I did not add the deletion command to the batch file for safety reasons.

Friday, August 19, 2011

Translating from the command line.

This might work on the Mac too if you have wget installed. Goal is to do language translation from te command line. Might be easier to just go to Google translate, but then you can use this program to interface with say not only a speech synthesis program but other software as well. If you have wget and the gnu utilities, you might be able to run it on an MSWindows box.

$ ./lc.sh "el toro" es en
the bull

$

[code]
#!/bin/bash
// remove the previous line on a mac
if test -z $3; then
echo "Usage: $0 \"\" "
echo "Translates string \"\" from to "
echo "(CLI frontend to Google Translate)"
else
wget -qO- "http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q=$1&langpair=$2|${3:-$3}" | sed 's/.*"translatedText":"\([^"]*\)".*}/\1\n/';
fi
echo ""
[/code]


No. Language Name Native Language Name Code
1 Afrikaans Afrikaans af
2 Albanian Shqip sq
3 Arabic عربي ar
4 Armenian Հայերէն hy
5 Azerbaijani آذربایجان دیلی az
6 Basque Euskara eu
7 Belarusian Беларуская be
8 Bulgarian Български bg
9 Catalan Català ca
10 Chinese (Simplified) 中文简体 zh-CN
11 Chinese (Traditional) 中文繁體 zh-TW
12 Croatian Hrvatski hr
13 Czech Čeština cs
14 Danish Dansk da
15 Dutch Nederlands nl
16 English English en
17 Estonian Eesti keel et
18 Filipino Filipino tl
19 Finnish Suomi fi
20 French Français fr
21 Galician Galego gl
22 Georgian ქართული ka
23 German Deutsch de
24 Greek Ελληνικά el
25 Haitian Creole Kreyòl ayisyen ht
26 Hebrew עברית iw
27 Hindi हिन्दी hi
28 Hungarian Magyar hu
29 Icelandic Íslenska is
30 Indonesian Bahasa Indonesia id
31 Irish Gaeilge ga
32 Italian Italiano it
33 Japanese 日本語 ja
34 Korean 한국어 ko
35 Latvian Latviešu lv
36 Lithuanian Lietuvių kalba lt
37 Macedonian Македонски mk
38 Malay Malay ms
39 Maltese Malti mt
40 Norwegian Norsk no
41 Persian فارسی fa
42 Polish Polski pl
43 Portuguese Português pt
44 Romanian Română ro
45 Russian Русский ru
46 Serbian Српски sr
47 Slovak Slovenčina sk
48 Slovenian Slovensko sl
49 Spanish Español es
50 Swahili Kiswahili sw
51 Swedish Svenska sv
52 Thai ไทย th
53 Turkish Türkçe tr
54 Ukrainian Українська uk
55 Urdu اردو ur
56 Vietnamese Tiếng Việt vi
57 Welsh Cymraeg cy
58 Yiddish ייִדיש yi

Monday, August 15, 2011

Kill a virus.

NOTE: Try this at your own risk. I will not be responsible for any issues.

To my knowledge there are no traditional viruses within linux. You do have rootkits, but that is another subject (rtkhunter and chkrootkit can be used). What we want to do here is to be able to defend against Microsoft Windows viruses. This is especially important if you run WINE (wine is not an emulator), Crossover office, or other Microsoft compatible software on linux. It is also important if you need to detect for an MSWindows virus using a machine that normally can not be susceptible to MSWindows viruses. Case in point. I was over at my brothers place spending the night when I brother was frustrated because he could not get rid of an MSWindows virus on MSWindows 7 using the great Microsoft anti-virus product. Here is sort of an outline we did to deal with the problem. Apparently his daughter brought home a thumbdrive that had a Microsoft type virus.

We plan to use Clamav for at least minimal checking/ Some of the features of clamav are:

And just for some entertainment value, here’s a couple features of ClamAV.

* Command-line scanner
* Quick, multi-threaded daemon with support for on-access scanning
* milter interface for sendmail
* Advanced db updater with support for scripted updates and digital signatures
* C library virus scanner
* On-access scanning (Linux® and FreeBSD®)
* Virus db updated multiple times per day
* Built-in support for various archive formats, including RAR, Tar, Gzip, Zip, Bzip2, OLE2, Cabs, CHM, BinHex, SIS and others I dont know
* Built-in support for many mail file formats
* Built-in support for ELF executables and Portable Executable files compressed with UPX, FSG, Petite, NsPack, wwpack32, MEW, Upack and obfuscated with SUE, Y0da Cryptor and others
* Built-in support for popular document formats like MS Office and MacOffice files, HTML, RTF and PDF

If you do not understand what all the features are for, do not worry. Just to say it is good for free.

Installation.

Command line install of Clamav for linux. (you can go to the package manager and install these programs also)

Install ClamAV, the daemon, and freshclam.

$ sudo apt-get install clamav clamav-daemon clamav-freshclam

The daemon allows the software to run in the background.

Update virus definitions after installation.

$ sudo freshclam

if you want the gui, then you might install:
$ sudo apt-get update
$ sudo apt-get install clamtk

You will want to do an update:

$ sudo freshclam

ClamAV update process started at Wed Jul 22 00:31:50 2009
main.cvd is up to date (version: 51, sigs: 545035, f-level: 42, builder: sven)
daily.cvd is up to date (version: 9604, sigs: 56154, f-level: 43, builder: ccordes)

Note: Proxy settings can be added if needed in the file /etc/clamav/freshclam.conf by adding the following info

HTTPProxyServer YOURPROXYIPADDRESS
HTTPProxyPort YOURPROXYPORT

Virus check.

Perform a scan for viruses in your home folder only in verbose mode.

$ sudo clamscan -r /home/YOURHOMEFOLDER

or to perform a scan on all system files, only printing infected files to the screen.

$ sudo clamscan -r -i /

Scan a thumb drive. (This is what I had to do) Most linux boxes will automount a thumb drive.

$ sudo clamscan -r -i /media/[thumbdrivename]

When it completes you should be presented with a Scan Summary similar to the one below. (Your results will vary.)

———– SCAN SUMMARY ———–
Known viruses: 600570
Engine version: 0.95.1
Scanned directories: 1
Scanned files: 14
Infected files: 0
Data scanned: 5.36 MB
Data read: 0.54 MB (ratio 9.94:1)
Time: 3.170 sec (0 m 3 s)

Remove files infected with viruses. Be careful with this one. False positives do exist!

$ sudo clamscan -r –remove /

Schedule clamscan to run with the ‘at’ command

$ sudo at 1:00 tomorrow
at> clamscan -i /home/YOURUSERNAME | mail YOUR@EMAIL.com
at>
job 1 at Wed Jul 22 01:00:00 2009

You could also use crontab, but for simplicity sake I’ve only demonstrated with the ‘at’ command.

This will require that your linux box has Samba installed. Most systems now have it installed by default. (See a linux pro if you need it installed or if needs reconfiguration. as that is not a subject of this instructable.) We are going to do this experiment with an MSWindows XP machine. I do not have MSWindows 7 to test it. Try this at your own risk! MSWindows XP has what is known as an administrative share. (So you will need administrative rights to the XP machine.). If you have your username, password, domain name and etc, it will allow this project to go easier.

Go to (Places > Connect to server) to enter in the information from your MSWindows machine. to see you the windows share.

$ sudo apt-get update
$ sudo apt-get install smbfs

mount -t smbfs -o username=,password= //sambashare /mountpoint

$ sudo mount -t smbfs -o username=adminname,password=adminpassword //192.168.1.133/c /media/smb

You will want to go to Applications > Virus scanner and choose the directory where you have your share set up. Then scan for viruses.

Thursday, August 4, 2011

Moving along.

Can not believe all the spelling errors in the last post. Bear with me on that. So we discussed taking what we already have and putting it to use. Do not get me wrong. If you have the spare funds and need a new system, then go for it.

There are more than three basic parts of a network. But for now, we will discuss just three. There are routers that connect you to your isp (internet service provider) and all the system on the network. They are really a combination bridge/router. Routers are sort of the traffic cop to the network. You have your desktop machines that you use directly to do your computing. The last devices are servers. These are computers you use indirectly. This is where you can store files you have created, files you want to access for say video and audio (movies, music and etcetera ), and lastly applications or software that you can access remotely. A good example is a web server such as the one you are accessing now to read the article. Servers are probably the best area where older computers can be reused.

Just a few uses I have collected: http://www.instructables.com/id/Reuses-for-legacy-computers/



Tuesday, August 2, 2011

New re-uses for old computers, by Eddie

Bobby aka Bob has written several articles already, Maybe it is time for me to do one also. He mentioned that I was into robots. Actually my favorite projects are to re-purpose old computers for new re-uses. Doing robots is certainly one of those ends. Do not think I have bought a completely new computer in over five years. Would love to have a completely new machine.

Several issues have me more and more into older equipment. First is that you can get the items free or very cheap. Despite the argument that older equipment requires more electricity, You can with proper planning not really use that much more in power for a single installation. For the corporate world where you would be using maybe thousands of systems, then you want the new greener equipment (being all things are equal). Secondly you are not really purchasing equipment any more but actually renting it. Look at the fine print of the EULA (End User Licensing agreement) agreement of you newer systems. Companies such as Sony have been know to reduce the capabilities of your equipment without your permission. I.e. the PS3 and the removal of the ability to use Linux. To add even more insult to injury, you could get sued if you modify equipment to better serve your own needs. Dare I say Apple. The question is "Who really owns your equipment?." Software patents is even another issue, but I will get into that in another article. Most older systems are not bound by any Eula, depending on what the time is.

A better reason for using older equipment is unless you are heavy into the latest media or graphics development, your average system will do just fine. The only short coming is that now hardware is changing so quick, it is hard to get parts especially (i.e. hard drives for the older systems). If you take care of your equipment, it should last for a reasonable amount of time. Most people like to use computer equivalents of the traditional office. Typewriter know as a word processor, Filing cabinet known as a database, accountants worksheet plus a calculator known as an electronic spreadsheet, Mail box is now known as email and etc. Those jobs can easily be done on traditional systems. These tools have been used for years even with equipment for less powerful that what we have today.

Where can you get some of these goodies. I like to go to Goodwill computer centers,frequent computer clubs, corporate reject bins, and the generosity of friends who think they need a new computer. They feel like they need a new computer for what ever reason (newer is better), so I will get hand me downs on occasion. The best bet for getting free computer equipment is from couples and marriages breaking up. Partners just want to move on. Some Goodwill computer centers will teach you to put together a system and if you build a certain amount of units, you will get a free one!

One caveat of getting older equipment is that you can get some worthless equipment that truly needs to be disposed of. It takes some experience to know what could be for you to use. When I get equipment, I do not expect it to work or be useful to me in any way. That way there is no let down when you do get a clunker. I do still get a few.

Next time we will look at possibilities of what we can do with older equipment from desktops to all kinds of servers.

New re-uses for old computers, by Eddie

Bobby aka Bob has written several articles already, Maybe it is time for me to do one also. He mentioned that I was into robots. Actually my favorite projects are to re-purpose old computers for new re-uses. Doing robots is certainly one of those ends. Do not think I have bought a completely new computer in over five years. Would love to have a completely new machine.

Several issues have me more and more into older equipment. First is that you can get the items free or very cheap. Despite the argument that older equipment requires more electricity, You can with proper planning not really use that much more in power for a single installation. For the corporate world where you would be using maybe thousands of systems, then you want the new greener equipment (being all things are equal). Secondly you are not really purchasing equipment any more but actually renting it. Look at the fine print of the EULA (End User Licensing agreement) agreement of you newer systems. Companies such as Sony have been know to reduce the capabilities of your equipment without your permission. I.e. the PS3 and the removal of the ability to use Linux. To add even more insult to injury, you could get sued if you modify equipment to better serve your own needs. Dare I say Apple. The question is "Who really owns your equipment?." Software patents is even another issue, but I will get into that in another article. Most older systems are not bound by any Eula, depending on what the time is.

A better reason for using older equipment is unless you are heavy into the latest media or graphics development, your average system will do just fine. The only short coming is that now hardware is changing so quick, it is hard to get parts especially (i.e. hard drives for the older systems). If you take care of your equipment, it should last for a reasonable amount of time. Most people like to use computer equivalents of the traditional office. Typewriter know as a word processor, Filing cabinet known as a database, accountants worksheet plus a calculator known as an electronic spreadsheet, Mail box is now known as email and etc. Those jobs can easily be done on traditional systems. These tools have been used for years even with equipment for less powerful that what we have today.

Where can you get some of these goodies. I like to go to Goodwill computer centers,frequent computer clubs, corporate reject bins, and the generosity of friends who think they need a new computer. They feel like they need a new computer for what ever reason (newer is better), so I will get hand me downs on occasion. The best bet for getting free computer equipment is from couples and marriages breaking up. Partners just want to move on. Some Goodwill computer centers will teach you to put together a system and if you build a certain amount of units, you will get a free one!

One caveat of getting older equipment is that you can get some worthless equipment that truly needs to be disposed of. It takes some experience to know what could be for you to use. When I get equipment, I do not expect it to work or be useful to me in any way. That way there is no let down when you do get a clunker. I do still get a few.

Next time we will look at possibilities of what we can do with older equipment from desktops to all kinds of servers.