Games
2020
Repeat Me
Othello
Freethought
FreeThought
Freethought is graphical window and controls applications library like GTK and QT, but far more primitive. I simply created freethought as a tool I can use to create applications for Linux. FTI, a freethought interface is still in development and I hope for it to be like a Visual C Studio for the Unix family of operating systems.
PIC16F84A real-time RTAI programmer
"prog"(RTAI PC-UNIX [Linux]) PIC16F84A programmer
prog.tar.gz
This program will program PIC16F8X and PIC16F7X Microchip PICs in rtai Linux. I realize this is kind of a specialty, but I thought I would put this out there for anybody that wants a Linux programmer for these popular pics.
Linux RTAI keyboard sampler
"kb" Linux keyboard=sampler
kb.tar.bz2
to unpack use "tar -xvjf".
This program runs in RTAI (PC-UNIX [Linux] real time).
This program lets a person make sound files by playing the computer keyboard like a sampler.
The time (in nanoseconds) and the key pressed are stored in a .sam file
and a .wav file is made from the .sam file.
The program uses the keyboard interrupt (int 1) to record when a key is pressed in real time to within 2 us.
seccam Security cameras program
"seccam" Linux Security Camera program adapted from "Motion"
seccam.tar.bz2
secweb.tar.bz2
to unpack use "tar -xvjf".
seccam: This program stores an image at regular intervals into an ordered directory structure. I use this program to maintain 2 cameras in my apartment, although at one time I was running 5 cameras in and around my apartment. I archive these images (about 2gb/month for each camera) on the first of every month.
secweb: This program uses a modem with a dial up connection to send via FTP seccam images to a web server, so that your security images are safe on a distant computer in the event of destruction at the camera site.
Spam Filter
Very simple but effective spam checker
spam.zip
If you have Squirrelmail, or even if you just want a quick webpage that will delete emails and check for spams that seem to be targeted to you then here is some quick and useful simple PHP code. This does spam checking by reading in text for 1) email addresses, 2) subject lines and 3) text in the message body that is an indication of spam. The beauty of this spam checker is that it's geared to your own personal spam. If somebody has never spammed you, you won't waste time checking for their spam, but ideally probably the best spam checker would reject the email in the postfix or mail program instead of accepting and deleting. You can just as easily move these into a "spam folder" too. One thing that is nice, is that you have control over what the program determines is spam, for example if a friend makes a joke about CIALLIS, you can make it not to simply reject an email with "CIALLIS" but with a phase specifically used that you know is spam. Another technique is to add up words that are usually in spam (like CIALLIS and Viagara) and if an email has a high score delete that email. But this is more straight forward and simple and so far it werks! It would be nice if the MAC address from the original computer sending the email is automatically attached because people use alias emails, my advice is to quote http links from the spam body, since usually there is a link to try and get you to buy something, and that usually traces to the source of the spam. I used to have to log into each of 3 accounts to delete email, and I feel for those people who have to too. Now all those emails are all automatically deleted once I log into my main account. I could make this done at the click of a button too, but so far autodeleting on each page load doesn't take much time. Basically you copy these 4 files into some place in your web server directory as a stand alone or in /var/www/squirrelmail/src/right_main.php Here are my 4 text files so far (you have to replace your email userid, password, and URL. I automatically remove a "/" at the end of any link because copy and paste adds it, but it is usually not the actual exact link in the spam body.
spamemail.txt - has emails to delete, this will match any part of an email, notice the 123inkjets-newsletter.com, this deletes any email from this URL, but not somebody refering to this link in an email (although that is highly unlikely).
spamsubject.txt - this matches subject line
spambody.txt - this matches email body text, my advice is mainly use this, and then to add links in the spam text body (this is good because who is going to send you a URL that spam comes from?)
update 05/17/07
My spam filter is now more automated. By adding this code to read_body.php in squirrelmail, you can simply click a button to add spam URLs, emails, sentences, subjects, etc.
insert this code into read_body.php in /var/www/squirrelmail/src
GS-1200g camera
gs1200g get image and get audio from GadSpot GS-1200g in Linux
ipcam.c
ipcamsnd.c
build with:
"gcc -o ipcam ipcam.c"
"gcc -o ipcamsnd ipcamsnd.c"
12/08/06 update
Linux TCP/IP stack, I don't know why, and I am not an expert, but it does not ACK the HTTP packet from the gadspot cam. For this reason, a SOCK_RAW (raw socket) needs to be used to do the ACKs (and SYN, etc) by hand. But there is an illogical thing in Linux in that the TCP/IP stack ignores sends on a raw socket, but interacts with receives. Probably for a raw socket, I would have the TCP/IP stack ignore reads (but make the data available to user space). So, Linux gets a SYN/ACK from the gadspot cam and sends a RST (reset) because it got the read but didn't know a SYN was sent (perhaps the Linux TCP/IP stack should be aware that a SYN was sent, I dunno, but in RAW mode I would not have the TCP/IP stack sending anything. Maybe I need to use the full raw mode of SOCK_PACKET which makes you do the ethernet layer too). So, there is a way around this and it is to use libipq. With libipq you can use iptables to queue all incoming data and send it to user space to read and then drop or send on. But there are limitations, like only one socket per queue...although there may be a way around it, but that is adding on so many little special things, I wish it could just be solved in Linux. Currently I am getting chksum errors in wireless, but I would try wired. Remember you have to change the IP address for your camera before doing a make.
The code is very messy, it uses some motion code. You will need libjpeg and libipq.
seccamip.c
Makefile
run (to set iptables to queue for port 50000)
end (to undo the iptables)