funsoft - open source
Overview:
Ssset-Game
- Version: 0.9.3
- Screenshot:
- Download:
- Commands:
- run via scala:
scala -cp setgame.jar setgame.SetGame
- run via java:
java -cp $SCALA_HOME/lib/scala-library.jar:$SCALA_HOME/lib/scala-swing.jar:setgame.jar setgame.SetGame
- Description: Find one or all triples, which have an attribute all in common, od do all differ in this attribute.
Example: They all differ in number (1, 2, and 3 elements), in form ()[]<>, in color and filling (empty, ':' and 'M').
Another solution would be the first column: 3x number=2, 3x color=red, 3 different fillings and forms.
- License: GPL 3.0
- Dependencies:
- Java 1.5 or later
- Scala 2.8, or at least
- scala-library.jar
- scala-swing.jar
which are part of, and come with scala
oetv.sh
- Version: 1.0
- Screenshots:
- Description:a simple, visual tool to start services from /etc/init.d
Pronounciation: Like a german would pronounce ÖTV (eh-te-fau), the famous labour union for public services (and transport, traffic).
The script lists just all services (files, to be precise) which are found in /etc/init.d, and tries to find all options like start, stop, restart, to present them as options to the user - all by zenity.
#!/bin/bash
#
# oetv.sh
# Show all servives in /etc/init.d in a list, and let the user choose how to start it.
#
# (c) 2008 Stefan Wagner, license GPLv3
#
# In /etc/init.d/ nach allen Dateien schauen (besser: allen ausführbaren Dateien)
# Die Anzahl der Dateien und deren maximale Namenslänge ermitteln, um eine angemessene Fenstergröße bereitzustellen
width=0
height=0
# Die verwendeten Schriftgrößen werden die optimale Fenstergröße beeinflussen.
# Womit man die Schriftgrößen auslesen könnte weiß ich nicht - wahrscheinlich ist das
# abhängig von Fenstermanager und Desktop und Userpräferenzen.
function xyFromList
{
anz=0
wmax=0
for file in $1
do
anz=$((anz+1))
len=${#file}
[ $len -gt $wmax ] && wmax=$len
done;
width=$((wmax*9+50))
height=$((anz*26+160))
}
dienstlist=$(ls /etc/init.d/ )
xyFromList "$dienstlist"
dienst=$(zenity --width=$width --height=$height --list --text "Service schalten" --column "Dienst" $dienstlist)
[ "foo"$dienst == "foo" ] && exit
# Optionen für den Dienst auswählen, und ein passendes Fenster zum Auswählen bereitstellen
optionen=$(egrep -h "[a-z]+\)" /etc/init.d/$dienst | sed 's/^[ \t]*//;s/).*/)/;s/#.*//;s/)//g;s/|/ /g' | sort -u)
xyFromList "$optionen"
aktion=$(zenity --width=$width --height=$height --list --text "Service schalten" --column "Befehl" $optionen)
[ "foo"$aktion == "foo" ] && exit
result=$(gksudo /etc/init.d/$dienst $aktion)
zenity --info "$aktion" --text "$result"
License: GPL 3.0
Dependencies: zenity
up_X
- Version: 1.1
- Description:jump X directories up in directory tree
Instead of typing
cd ../../../..
you just type
up 4
and a
cd -
will bring you back
Put the function into your .bashrc to use it.
# (c) 2007 stefan w. GPLv3
function up {
ups=""
for i in $(seq 1 $1)
do
ups=$ups"../"
done
cd $ups
}
License: GPL 3.0
Dependencies: bash (maybe it works in other shells as well. Please tell me.)
Pump Wikipedia Geo-Data into your (Postgre)sql-Database
Download source: GeoXml2sql.java Java source
Description: Pump Wikipedia Geo-Data (kml) into your (Postgre)sql-Database
Notes: You need to get the data yourself via Wikipedia.
Wikipedia (go for download:kml)
It should be easy, to use a different Database with jdbc.
You need to change user/password, and host/driver. It's easy to find.
The name of the location, longitude and latitude are saved.
License: GPL 3.0
Dependencies:
- Java 1.5 jdk
- a database
- wiki-data
View dbf (xbase) files
- Version: 0.10
- Screenshot:
- Download:
- Description: View dbf (dbase, xbase, foxpro) files.
Notes: I don't plan to do further progres to the program.
You may not change values and save the results.
Not all versions of dbf files are supported.
I don't know memo-fields. Perhaps the program doesn't handle them correctly.
- Recent changes
- Ver. 0.10 Added Dbf2csv (another main-class), to allow non-interactive command-line conversion of multiple files.
- Ver. 0.9
- DbfFile.makeDataArray (): treat m like M.
- DBFReader.nextRecord (), continue at: "Failed to parse Number:" with errormessage
- License: GPL 3.0
- Dependencies: Java 1.5
Send a mail with attachment from shell
- Version: 0.1
- Download binary: MailAttach.class Java binary class
- Download source: MailAttach.java Java source
- Description: A program to send a message-text and an attached file.
- License: GPL 3.0
- Dependencies: Java 1.5
Allman-Indentation for Java with SciTE
Sudoku Helper (not solver! [only for easy sudokus])
- Version: 0.1
- Download: Sudoku.jar Java ARchiv with source
- Description: A program to help solving sudokus. Not well documented yet, automatic solving pending, development interrupted (lack of time)
- License: GPL 3.0
- Dependencies: Java 1.5
PasswordCrackProb
- Version: 0.1
- Download: PasswordCrackProb.java source java
- Description: A program to compare the probability of a password being cracked with or without expiration time
- License: GPL 3.0
- Dependencies: Java 1.5
jRuler
- Version: 0.4
- Screenshot:

- Download: jar jruler-0.4.jar runnable jar, containing source
- Download: tar.bz2 jruler-0.4.tar.bz2 tar.bz2, containing runnable jar and source, just smaller packed as above
- Description: A funny java ruler
- Dependencies: Java 1.5
- Changes:
- 0.4: depends on Java 1.5, uses Img from jar
- 0.3: move pixelwise - Credits to Wolfgang Williges for the idea
- 0.2: fix border problem
bitOrgel
- Version: 1.4
- Applet instead of Screenshot: (the download contains Applet as well as a JFrameapplication)
- Download:bitOrgel-1.4.tar.bz2
- Description: Bitorgel is a graphical Javatool to view bitshifting and other bitmanipulation effects.
shift (>> - >>> - <<) or negate a byte, or operate on two bytes (|, &, ^, +)
- License: GPL 3.0
- Dependencies: Java 1.4
jFotos
- Version: 1.1
- Screenshot:
- Download:jfotos-1.1.tar.bz2
- Description:Simple ImageViewer for 640x480 or 480x640 images
- License: GPL 3.0
- Dependencies: Java 1.4
template_java.sh
- Version: 1.0
- Description:create a Java-Main-class-source-file
#!/bin/bash
#
#
NAME=$1
NEW_CLASS=./$NAME.java
function usage {
echo "Eine neue Javaklasse aus einem Tempate erzeugen"
echo ""
echo " usage: " $0 " Classname"
echo " example: " $0 " FooBar"
echo " generiert class FooBar in FooBar.java mit einer main-Methode"
echo ""
echo " (c) GPLv.3 2007 Stefan Wagner, Berlin, Schöneberg"
echo ""
}
function create_class
{
cat << EOF > $NEW_CLASS
// package
// import
/**
$NAME
@author Stefan Wagner
@date `date`
*/
public class $NAME
{
/** */
public $NAME (String param)
{
}
/** */
public static void main (String args[])
{
String param = null;
if (args.length == 1)
{
param = args[0];
}
// usage ();
// System.exit (1);
// $NAME app = new $NAME ();
new $NAME (param);
}
/** */
public static void usage ()
{
System.out.println ("Usage:\tjava $NAME param");
}
}
EOF
}
#
if [[ $# -ne 1 ]]; then
usage
exit
fi
#
if [ -e $NEW_CLASS ]; then
echo $NEW_CLASS "already exists! delete or use other name!"
# prompt for : delete/ cat/ abort
echo "You bloody foolish bastard asshole!"
echo "shutting down CPU[0-8]!..."
exit
fi
echo creating $NEW_CLASS
create_class
if [ -e $NEW_CLASS ]; then
echo "done. nice to meet you"
echo ""
# for debugging:
# cat $NEW_CLASS
else
echo $NEW_CLASS "not found, no write permissions? disk full?"
echo deleting user $USER...
exit
fi
edit $NEW_CLASS &
echo edit $NEW_CLASS
echo javac $NEW_CLASS
License: GPL 3.0
diskrim.sh
#! /bin/bash
#
# (c) GPLv3 Stefan Wagner
#
# I often search files by 'locate'
# As output, I get pages of:
# ...gimp...x.doc
# ...gimp...y.doc
# ...gimp...z.doc
# ...gimp...x.jpg
# ...gimp...y.jpg
# ...gimp...z.jpg
# ..gimp..x.html
# I like to exclude 'jpg' and 'doc' and 10 more, which leads to pipes like:
# #prompt> locate gimp | egrep -v "(jpg|doc|...)"
# This program just saves a few keystrokes
# #prompt> diskrim.sh gimp jpg doc ...
#
function usage
{
echo " Usage: $0 pattern0 pattern1 pattern2 ..."
echo " calls: locate pattern0 | egrep -v \"(pattern1|pattern2|...)\""
}
if [ $# -lt 2 ]
then
usage
exit
fi
#
#
gesucht=$1
cmd="egrep -v \"("
shift
for pattern in $* ; do
cmd=$cmd"$pattern|"
shift
done
cmd=${cmd/%|/)\"}
# set -x
# locate $gesucht | $cmd
# exit
echo locate $gesucht \| $cmd > /tmp/diskrim.sh.tmp
chmod a+x /tmp/diskrim.sh.tmp
/tmp/diskrim.sh.tmp
rm /tmp/diskrim.sh.tmp
License: GPL 3.0
dfc - disk free (color)
- Version: 0.8
- Description: show 'disk free' colorized, whether on cli or xterm
- Screenshot:

#!/bin/bash
# Print used and free space,
# - fitting well on the screen,
# - colorized,
# - normalized to biggest drive
#
# (c) GPL 3.0
#
RED="[1;31m"
NORMAL="[0;39m"
BLUE="[1;34m"
YELLOW="[1;33m"
#
# @1: int how often
# @2: char to print
#
function print_times ()
{
LIMIT=$1
SIGN=$2
for ((a=0; a < $LIMIT; ++a))
{
echo -n $SIGN
}
}
#
# @1: int used space
# @2: int free space
#
function used_free ()
{
USED=$1
FREE=$2
echo -n $YELLOW
print_times $USED 'X'
echo -n $GREEN
print_times $FREE '.'
echo -n $NORMAL
}
#
# dummy variable, to avoid return value
#
UNIT=1
#
# @1: line of Strings a diskFree (df) df line
#
function getUnit ()
{
MAX=$2
COLS=$(tput cols)
# echo $BLUE "Maximum Partition: " $MAX $NORMAL " columns: " $HZ
# -20 um Platz für Text zu haben
UNIT=$(echo "$MAX/($COLS-28)" | bc)
# echo "Unit = " $UNIT
}
#
# @1: String device
# @2: int size
# @3: int used
# @4: int free
# @5: String Percent free
# @6: String Mount Point
#
function printDrive ()
{
DEV=$1
SIZ=$2
USE=$3
FRE=$4
PER=$5
MNT=$6
# echo $BLUE $DEV $SIZ $RED $USE $GREEN $FRE $BLUE $MNT $NORMAL
echo -n $BLUE $DEV " "
PR_USE=$(echo "$USE/$UNIT" | bc)
PR_FRE=$(echo "$FRE/$UNIT" | bc)
used_free $PR_USE $PR_FRE
FREE_GB=$(echo "scale=2; $FRE/(1024*1024)" | bc)
echo $BLUE $MNT $GREEN $FREE_GB "GB" $NORMAL
}
function printDrives ()
{
DEVICES=$(df | colrm 15 | grep dev)
for DEVICE in $DEVICES
do
# echo "Device " $DEVICE " found!"
DEV_DF=$(df $DEVICE | tail -1)
printDrive $DEV_DF
done
}
#
# Processing starts here
#
getUnit $(df | sort -n -r +1 | head -1)
printDrives
find_javaMethod.sh
- Version: 0.8
- Description: search javadocs by method name
- Remark: for linux, needs to be changed for windos; don't know for Mac.
- Remark: You need 'find_javaMethod.sed' too.
#!/bin/bash
# file: find_java_mehtod.sh
#
# Search the javadocs for a mehtod (or constructor) by name
#
# Usage: find_java_method METHOD_NAME
# Example: find_java_method nextToken
# Caution: don't search for "nextToken ()", "String nextToken ()", "String nextToken" or "*nizer.nextToken ()"!
#
# (c) GPL 3.0
#
# here you put the sed-file:
export INSTALL_DIR=/home/foobar/bin
#
#'s/.*HREF=//g' | sed 's/>.*//g' | sed 's/^"..\///g' | sed 's/"$//g' | sed 's/.html#/./g' | sed 's/\//./g'
# A search with '#$1(' would lead to more exact results, but small differences might be helpful here.
#
grep "#$1" $JAVA_HOME/docs/api/index-files/*.html | sed -f $INSTALL_DIR/find_java_method.sed | sort
The sed-file:
# file: find_java_mehtod.sed
#
# for 'find_java_mehtod.sh'
#
# remove HTML-trash, and format output a bit nice.
#
s/.*HREF=//g
s/>.*//g
s/^"..\///g
s/"$//g
s/.html#/./g
s/\//./g
s/(/ (/g
License: GPL 3.0
X-screensaver sedimenter
- Version: 0.8
- Screenshot:

- Download: sedimenter.c
- Description:A modul for the xscreensaver - collection.
- Dependencies: xscreensaver 4.07
License: GPL 3.0