Earlier this year i wrote a small python script for downloading images from 4chan threads.
It is available now from this page
Credits need to be given to David Tucker for helping out
After a comment i added some changes.
See the usage description for information about v1.1
Small Python script for running a simple ircbot.
A while back I found a small code segment that solves your Sudoku problems.
This code is written for solving the 3×3(blocks) puzzle, where puzzle is an 81 character string representing the puzzle read left-to-right, top-to-bottom, and 0 is a blank.
So, want to show something on your machine to another user? Or want to share a file ?
If you have Python installed (default for most *nix systems) the following trick is awesome.
Create the following alias in your .bashrc
alias webshare=’python -c SimpleHTTPServer’
Now just type the command “webshare” in your terminal, and all files in current folder and beneath will be available at
If you dont want to create an alias, just type the following command in your terminal
python -c “import SimpleHTTPServer;SimpleHTTPServer.test()”
Remember, if you start the webserver in your /home/username; folder, you share everything in the folder !
Ever heard of the Euclidean algorithm??
In mathematics, the Euclidean algorithm[a] (also called Euclid’s algorithm) is an efficient method for computing the greatest common divisor (GCD) of two integers, also known as the greatest common factor (GCF) or highest common factor (HCF).
I have just written a short python program for finding the GCD.. Enjoy..
# Efficient method for computing the greatest common divisor
# X and Y is the two numbers
print "Answer is " + str(a)
I recently came across a situation where i needed a small configuration file in my Java project.
Using XML would in most cases be the way to go, but in this particular situation, using XML would be complete overkill.
I only needed a few variables in my configuration file, and for this, Java has a built-in solution that works great.
Ever heard of .properties files ??
Ever wanted to automatically mount your SMB/Windows shares when you log on your Mac??
Here is a small code example written in AppleScript, that will aid you in the process.
Trying to import your huge SQL dump through phpMyAdmin etc , could sometimes cause huge problems.
BigDump: The staggered MySQL Dumper
Staggered import of large and very large MySQL Dumps (like phpMyAdmin 2.x Dumps) even through the web servers with hard runtime limit and those in safe mode. The script executes only a small part of the huge dump and restarts itself. The next session starts where the last was stopped.
Visit Ozerov for the excellent script….