Google

Campaign0

Saturday, December 6, 2008

Evolution + clamav + ruby

Quite a while ago I tied Evolution to clamav via ruby as an anti-virus measure ( I don't recall, but I most likely based this off of something similar, but not using ruby, that I found via Google ). I recently passed this setup on via the Evolution mailing list in reference to a posted request for examples. After a bit of back and forth, it appears to be working for the requestor. At his suggestion, I'm posting the configuration here also. The filter configuration is shown in the image, and the actual script is listed after. You'll want to make whatever minor adjustments necessary for it to work in your environment and you'll probably want to comment out the segments associated with creating the logfiles -- they will end up eating a lot of disk space( comment out the lines referencing fp and Time).

Click the image to see it clearly.


The script file -- rubyclamav.rb

#!/usr/bin/ruby
#
require 'socket'
fp = File.open("/var/log/rubyclamav/rubyoutclam_#{Process.pid}.log", "a")
START_TIME=Time.now
sendSock = UNIXSocket.open('/var/run/clamav/clamd.sock')
#sendSock = UNIXSocket.open('/var/run/clamav/clamd.ctl')
sendSock.puts("STREAM")
retStr = sendSock.gets
tag, val = retStr.split
sendSock1 = TCPSocket.open('localhost',"#{val}")
#res = $stdin.read
sendSock1.write($stdin.read)
sendSock1.close
retStr = sendSock.gets
pt = Time.now - START_TIME
#puts "#{retStr}"
#fp.write("#{res}\n")
fp.write("#{retStr}\n")
fp.write("ProcessTime = #{pt}\n")
fp.close
if retStr.match("FOUND") then
system("zenity --warning --title=\"Evolution: Virus detected\" --text=\"#{retStr}\" &")
exit 1
else
exit 0
end

Tuesday, April 22, 2008

Cheat Sheet 3

pthread tutorial

A starter tutorial for pthread threaded programming.

Cheat Sheets 2

Cheat Sheets 1

Developer cheat sheets. Web, DB, Language, etc

Looking for UPC database cross reference?

Look no further. Check out the Internet UPC Database

Aptera - $30K hybrid claims +100MPG

Wouldn't it be cool to own one of these...
aptera

Sunday, April 6, 2008

Nathan Asher & The Infantry

A very cool local band. Take a listen.

The Baen Free Library

From the website...
"Baen Books is now making available — for free — a number of its titles in electronic format. We're calling it the Baen Free Library. Anyone who wishes can read these titles online — no conditions, no strings attached. (Later we may ask for an extremely simple, name & email only, registration. ) Or, if you prefer, you can download the books in one of several formats. Again, with no conditions or strings attached. (URLs to sites which offer the readers for these format are also listed. )"

Free Online Linux Books

A listing of free linux related books available online...

Linux Device Drivers, Third Edition

"This is the web site for the Third Edition of Linux Device Drivers,
by Jonathan Corbet, Alessandro Rubini, and Greg Kroah-Hartman. For the
moment, only the finished PDF files are available..."

VIM Color Scheme Test

The vim colorscheme test pages. An exceptional resource for vim users.

The example C pages...

Asterisk - open source PBX

Asterisk and Digium provide a great PBX framework.

eXtended Server Pages (XSP/XSPD) -- C/C++

eXtended Server Pages (XSP/XSPD)
High Performance Web Application Server XSP/XSPD for C/C++, Java and Shell-Scripts

Saturday, April 5, 2008

CPPSERV a web application server -- C++

"CPPSERV is a web application server that provides Servlet-like API and JSP-like functionality to C++ programmers. It consists of stand-alone daemon, listening on TCP socket for requests from web server, and web server module. Currently apache-2.0.x and ligttpd are supported."

Wednesday, March 19, 2008

del.icio.us bulk updater

re-mark -- A great tool. I had 700+ bookmarks that were not shared, using this tool I was able to share all of them in batches of 100.

Linux Kernel module example

Simple easy kernel module example.

Ruport - ruby reports

Need a neat reporting framework, try Ruport.

GnomeFiles

Large repository of Gnome applications. Search and broken out by group.

bogofilter spam filter

I use bogofilter for my evolution mail filter. It works great. If you need a good spam filter give it a whirl.

Linux on a USB drive

Multiple distros available ( including many not listed on this site - just google ).
Grab your USB linux and go.

130 MPG 2 passenger vehicle

If only it were available here and I had $30K
aptera

Sunday, February 24, 2008

Scientific American ( www.sciam.com) - Great magazine

Scientific American is a great read. Lots of great articles and information. Subscribe or give it as a gift.

Cygwin - The best windows application ever


Cygwin is a Linux-like environment for Windows.

Required to use Windows? Need the functionality of *NIX command line tools? Cygwin is the answer. Need a real terminal program -- download rxvt.

Tuesday, February 19, 2008

Cool mandelbrots

Buddhabrot

some cool mandlebrot images.

Monday, February 18, 2008

$115 gets you your own hydrogen powered car

Horizon Fuel Cell Technologies has some cool fuel cell powered cars.

Welcome to 7-zip

7-zip is the file archiver ( compress/decompress ) that I use on windows. Free, and works very well.

Thursday, February 14, 2008

Zim - a desktop wiki and outliner

I like and use Tomboy, but for some things Zim (hierarchical, grouping, etc) seems a better fit. From the website "Zim is a WYSIWYG text editor written in Gtk2-Perl which aims to bring the concept of a wiki to your desktop." I'm using it at work, and I installed it on my son's desktop for school related note taking.

Wednesday, February 13, 2008

Looking for a low cost DIY music player

I've been looking off and on for years for a DIY music player that would allow me to build one 'as good as or better than' those mass produced at an 'extremely reasonable' price. And I'm still looking. :) If anyone has any pointers, please post them.

Tuesday, February 5, 2008

streamtuner -- Find the music you want

a great app for anyone that likes music. allows browsing and searching of multiple online music sources.
streamtuner


Powered by ScribeFire.

Saturday, January 26, 2008

jVi - vi editor plugin for NetBeans

If you use vi[m] you'll want this plugin. Don't know what vim is? See vim.org for the details. In short, once you get past the learning curve, vim is one of the greatest programming editors around.


Powered by ScribeFire.

88.1 WKNC FM Radio -- NC State University Radio -- Tired of the same songs over and over?

When you get sick of hearing the same tunes over and over on the radio, give WKNC a whirl. They have formats for everyone. It really is an exceptional station. Requests taken.

From the website...
"88.1 WKNC is the student-run non-commercial radio of North Carolina State University. We pride ourselves on our unique and adventurous programming and have been named "Best in the Triangle" by the Independent Weekly four years running. Boasting 25,000 watts, WKNC can be heard throughout the Triangle and far beyond via our web stream. Our mission is to provide N.C. State students with the practical knowledge needed for a career in the broadcast industry."

Powered by ScribeFire.

Thursday, January 17, 2008

Project Phobos - modifying the JPA example for PostgreSQL

Ran across Project Phobos the other day. It looks like a promising platform for rapid web application development. In a short while and after some input from the mailing list, I modified the JPA example to use PostgreSQL as the data store. Turned out to be a very easy switch from the builtin Netbeans JAVA DB to Pg.
To alter the JPA example to use PostgreSQL.
File/New Project/Scripting/Samples/Java Persistence APIs (JPA)
sample
Right click on libraries under jpaExample and add the
PostgreSQL JDBC library
Replace the current persistence properties with
( right click image to open in a new window )

verify that the pg_userid and pg_userpasswd can connect to the db
via psql on the command line
right click on jpaexamplesrc and clean and build the project
right click on jpaExample and run project.
I don't think I missed noting anything.
The web page( right click image to open in a new window ):

-------------------------------------------------------------
The correlating terminal capture from Pg.

jake@endpoint:~$ psql test
Welcome to psql 8.2.5, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit

test=# \d
List of relations
Schema | Name | Type | Owner
--------+----------------------+----------+-------
public | author | table | jake
public | author_author_id_seq | sequence | jake
public | book | table | jake
(3 rows)

test=# \d author
Table "public.author"
Column | Type | Modifiers
--------------+------------------------+------------------------------------------------------------
author_id | integer | not null default nextval('author_author_id_seq'::regclass)
organisation | character varying(255) |
name | character varying(255) |
Indexes:
"author_pkey" PRIMARY KEY, btree (author_id)

test=# \d book
Table "public.book"
Column | Type | Modifiers
---------------+------------------------+-----------
book_id | integer | not null
isbn | character varying(255) |
authorid | integer |
publisheddate | date |
title | character varying(255) |
Indexes:
"book_pkey" PRIMARY KEY, btree (book_id)

test=# select * from author;
author_id | organisation | name
-----------+----------------+-----------------
1 | jMaki | Greg Murray
2 | Sun US | Ludo Champenois
3 | Java Inc | James Gosling
4 | Wrox Press Inc | Paul Wilton
5 | O'Reilly | Danny Goodman
6 | JPA Press Inc | Pramod Gopinath
(6 rows)

test=# select * from book;
book_id | isbn | authorid | publisheddate | title
---------+------+----------+---------------+-------
(0 rows)

Wednesday, January 9, 2008

Three apps for a night sky ( astronomy )

Interested in astronomy? Here are three links to check into.

Stellarium
"Stellarium is a free open source planetarium for your computer. It shows a realistic sky in 3D, just like what you see with the naked eye, binoculars or a telescope. It is being used in planetarium projectors. Just set your coordinates and go."

Celestia
"The free space simulation that lets you explore our universe in three dimensions. Celestia runs on Windows, Linux, and Mac OS X."

Wikisky



Powered by ScribeFire.

Tuesday, January 8, 2008

Firefox -- Remove duplicate bookmarks

Bookmark Duplicate Detector makes a good addition to go along with Foxmarks. Clean up all those duplicates created from your manual merges prior to Foxmarks.

https://addons.mozilla.org/en-US/firefox/addon/1553


Powered by ScribeFire.

Foxmarks -- keep all your bookmarks synchronized across all your pc's

No more exporting and importing multiple times to get consistency across all your Firefox instances.

http://www.foxmarks.com/



Powered by ScribeFire.

Gobby -- shared text editing over the internet/network

From the home page "Gobby is a free collaborative editor supporting multiple documents in one session and a multi-user chat. It runs on Microsoft Windows, Mac OS X, Linux and other Unix-like platforms." Home page screenshots link.




Powered by ScribeFire.

Windows IPC examples on THE CODE PROJECT

Example IPC code for windows for Named Pipes, Shared Memory, sockets etc.

http://www.codeproject.com/KB/threads/Win32IPC.aspx


Powered by ScribeFire.

Complete Windows TCP Client and Server code on MSDN

MSDN is huge, and it can be a pain to find what you're looking for. So when you find something, make sure you keep a reference to it.
An example found/located on MSDN:

Complete TCP Client and Server Code


Powered by ScribeFire.

Monday, January 7, 2008

Stick a 54 inch video screen in your pocket

http://www.indicube.com/

Indicube PMP.


Powered by ScribeFire.

Ultra mini PC (UMPC) -- Chinese built LimePC $300

Looks to be a neat little device.

http://www.linuxdevices.com/news/NS6231914514.html


Powered by ScribeFire.

Motorola's new handheldp PMP/wireless TV device

Moto's newest PMP. Wireless TV. LINUX. Slim. "Motorola's Mobile TV DH01 is smaller than a paperback novel". Now all we need is a decent price point.

http://www.linuxdevices.com/news/NS2037776072.html


Powered by ScribeFire.

Wanna know what phase the moon is in?

Quick and easy moon phase via text and picts.

http://www.die.net/moon/

Saturday, January 5, 2008

W3 Schools - free web building tutorials

A great place to get answers. Covers all aspects of web programming. As the site says "Full Web Building Tutorials - All Free
At W3Schools you will find all the Web-building tutorials you need,
from basic HTML and XHTML to advanced XML, SQL, Database, Multimedia and WAP."

http://www.w3schools.com/


Powered by ScribeFire.

Watch The Elegant Universe full-screen version

Block some time out for this. I'm going to.

http://www.pbs.org/wgbh/nova/elegant/program_d.html

Portable Apps are cool

"Now you can carry your favorite computer programs along with all of your bookmarks, settings, email and more with you. Use them on any Windows computer. All without leaving any personal data behind."

Grab a $20 USB stick and set yours up.

http://portableapps.com/


Powered by ScribeFire.

Need a temporary email address?

Occasionally everyone needs one, right?

http://www.guerrillamail.com/


Powered by ScribeFire.

Source Navigator NG - Need to learn an existing code base fast?


Source Navigator NG is the best tool I've found for tracing through and learning a code base. Runs on most OS's. Well worth a look. Note the project is hosted on berlios, the sourceforge projects are unmaintained.

http://sourcenav.berlios.de/

http://sourcenav.berlios.de/screenshots/


Powered by ScribeFire.

Friday, January 4, 2008

ScribeFire - integrated blog publisher and editor for Firefox

Makes blogging about a page an extension of the browser. Very useful for when you're finding new things on the net.
https://addons.mozilla.org/en-US/firefox/addon/1730

Also allows editing of previous posts.

Powered by ScribeFire.

Thursday, January 3, 2008

How to get AT&T DSL for $10 Dollars

For details, see this article.
http://arstechnica.com/news.ars/post/20070618-att-launches-10-dsl-it-hopes-no-one-signs-up-for.html

openmoko

openmoko -- another project that I've been watching for some time. An affordable, open source based mobile phone and developers kit.
http://www.openmoko.com/

Wednesday, January 2, 2008

Bug Labs: An open source, web-enabled modular software and hardware platform

Been following this site for a while. Should be very interesting to see what the end result turns out to be. Hopefully the price point will be low enough to generate good buy in/traction.

http://buglabs.net/

Nice Article About Converting a School District to LINUX

An interesting article about converting a school district over to LINUX. Be sure to go back and read the previous installment also.
http://www.linuxjournal.com/node/1005992

Previous installment:
http://www.linuxjournal.com/article/9688#mpart4

Tuesday, January 1, 2008

Eco Living

I think it would be really cool to someday live in an eco friendly home. Rammed earth homes are really neat and so are Tumbleweed tiny houses. I think something like a Tumbleweed would be great for a college student. Among many other options to consider are cob and straw bale structures.
http://www.simondale.net/house/index.htm <= very nice