RawDev.net - Just another Zabreznik.si Sites site
Home - Mail - About

Archive for the Category "Scripting"

FxGrounded 1.3.4

Sunday, March 1st, 2009 by Marko Zabreznik

Image representing Firefox as depicted in Crun...
Image via CrunchBase
The Iframe implementation of a navigation failed to work out as planned so a complete rethink of this plugin was in order.

What it does now is let you go

wherever you want, BUT if you go away from the homepage you will get a 5 min limit for inactivity as opposed to 30 min on the homepage. Going completely outside the scope of the homepage will get you only 3 min.

So this turned out to be a remake of the Auto Restart

Firefox plugin I saw long ago but was totally outdated.

But you get a nifty, touchscreen

friendly navigation. Works best with R-Kiosk and FxKeyboard :D

Also, a note:
firefox in standards mode:  body is document.documentElement
firefox in quircks mode : body is document.body
… doh
Edit 2009/6/7 :   This project is currently not public. If you would like a copy please email me (find email in footer).
Tags:
Posted in Comic, Firefox, Scripting - 1 Comment

Touchscreen Kiosk with Firefox vkeyboard Addon

Sunday, January 18th, 2009 by Marko Zabreznik

Image representing Firefox as depicted in Crun...
Image via CrunchBase

Creating a kiosk environment.
The tools:

The requierments:

As you might expect, I tried everything.

R-Kiosk. Perfect.

A inline javascript Keyboard. While it did what was needed, it fails on forms that are on the bottom of the screen and in Iframes. Good side: Language was dependant on the page’s language. But Fail.

xvkbd. While I did manage to place it on top of Firefox and lock it so people cant close or edit it, and change their language.. it was annoying to do so. Moving it around the screen more so. Porting it to win32 impossible. Fail.

Ok, lets try a different aproach.
http://stlouis-shopper.com/~jtjsoftware/software/vkeyboard.xpi is a firefox Addon I found. A simple tweak made it work on Fx3. Here is what I made. The first step in porting the app, is thus in bad shape. ~Win.

If there is enough interest in such a plugin for Fx3, I myself and the original author will continue to work on it. A lot of things are already on my mind that I want to do with this project. Suggestions ?

Tags: ,
Posted in Firefox, Games, Linux, Scripting, Win32 - 2 Comments

Joomla! JoomKey Virtual Keyboard

Thursday, December 4th, 2008 by Marko Zabreznik

JoomKey is a joomla native mootools js virtual keyboard. It can be used on html inputs and textareas.

The language is based on the language of the currently viewed site/article. It comes with English, German and Slovenian keyboard but can be easily be fitted with any additional language. If you do create a language please send it to me so i can add it.

Download Module JoomKey 0.1.0

Tested on Firefox 3. Made in scope of the Institut-Oko Kiosk project.

GPLv3
(C) Marko Zabreznik

Posted in Hacking, JoomKey, Joomla, Scripting - 8 Comments

Away3D 2.0

Saturday, April 19th, 2008 by Marko Zabreznik

Adobe FlashImage via Wikipedia

The Away3d team are pleased to announce the release of the 2.0.0 update to the Away3d engine!

You can download the update from the trunk in the svn repository:
http://away3d.googlecode.com/svn/trunk

or go to the downloads section of away3d.com where a new zip file is available:
http://www.away3d.com/downloads

Highlights of the update (posted on the site together with a new demo):

Tags:
Posted in Art, Scripting - No Comments

mjpg stream + potrace

Friday, April 11th, 2008 by Marko Zabreznik

Working on the same principle as the last mjpg_stream implemenation, here it is: a portace plugin !

(more…)

Tags: ,
Posted in Hacking, Linux, Scripting - No Comments

Biorhythm Calculator

Sunday, April 6th, 2008 by Marko Zabreznik

A advanced Biorhythm calculator i made for a school project some time ago. Works perfectly. But its really how you interpret it :P ( All a bunch of crap if you ask me XD )

Link here.

Tags: ,
Posted in Hacking, Scripting - No Comments

RawGallery, a compact gallery script

Friday, April 4th, 2008 by Marko Zabreznik

Recently i decided to opensource one of my scripts i have been using in the past.

Features:

(more…)

Tags: ,
Posted in Linux, Scripting - No Comments

Mjpg-Stream + libcaca

Saturday, March 22nd, 2008 by Marko Zabreznik

After couple of hours, here is it: A libcaca extension to Mjpg-Stream[singlepic=141,300,200,,][singlepic=140,300,200,,]

You need img2txt from the libcaca-utilities and /dev/shm to be mounted and writable (or change to another location)

/dev/shm is present on most systems and is a mounted filesystem located on the main ram.

The source is in past the page brake.

(more…)

Tags: ,
Posted in Hacking, Linux, Scripting - No Comments

Size of XKCD

Saturday, March 15th, 2008 by Marko Zabreznik

As the last post was about the size of bash.org, this one is about xkcd, the famous comic site, a simple set of scripts and you get the whole set and a few stats:
Use script wisely, it’s a strain on servers.

#!/bin/bash
echo "Downloading 395 pages."
for i in `seq 1 395`;
do
	if [ -s "xkcd/$i" ]; then
		continue
	else
		echo -n "`date +%H:%M:%S`: Trying $i ..."
		lynx --source "http://xkcd.com/$i" > "xkcd/$i"
		echo -n " Done. Image:.. "
		wget -q -p "comics" -nH "http://imgs.xkcd.com/comics/"`awk 'BEGIN{FS="<img src=\"http://imgs.xkcd.com/comics/";RS="\" title="}/<img/{print $2}' "xkcd/$i"`
		echo " Done."
		sleep 2s
	fi
done
echo "All done."

This piece of code does sometihng special, it takes the name of the image and uses wget to download it.

$n=1;
$vse=0;
while ($n < 410) {
	unset ($fajl);
	$fajl=file_get_contents("original/".$n);

	preg_match_all("|
<p class=\"quote\">(.*)<b>#(.*)</b>(.*)
<p class=\"qt\">(.*)

|Us", $fajl, $out);
	$i=0;
	while (isset($out[0][$i])) {
		echo '('.$out[2][$i].")\n".$out[4][$i]."\n";
		echo $out[2][$i]."\n".$out[4][$i]."\n";
		$i++;
		$vse++;
	}
	$n++;
}
echo "\n(".$vse.")";

And a parser that makes the final big file of everything, coincidentally also making the comments easy to read.
Comics make the most part of the download, with ~22 MB.

And as usual, the download link: LINK (22mb), or email me for the data.

Tags: , , ,
Posted in Hacking, Scripting - No Comments

Size of Bash.org

Saturday, March 15th, 2008 by Marko Zabreznik

I spent the last few hours on a simple question, how large is the worlds largest irc quote database (bash.org) ?
Thinking specifically of the quotes themselves.

So first i had to get them all, a simple bash script was sufficient.

#!/bin/bash
echo "Downloading 409 pages."
for i in `seq 1 409`;
do
if [ -s "original/$i" ]; then
continue
else
echo -n "`date +%H:%M:%S`: Trying $i ..."
lynx --source "http://www.bash.org/?browse=$i" > "original/$i"
echo "Done."
sleep 10s
fi
done
echo "All done."

Please, do not use that script, it is a strain on the bash servers, instead you can grab the original files at the end of the article.
After a couple of hours that was done, and i had my next script ready as well;

$n=1;
$vse=0;
while ($n < 410) {
unset ($fajl);
$fajl=file_get_contents("original/".$n);

preg_match_all("|

(.*)#(.*)(.*)

(.*)|Us", $fajl, $out); $i=0; while (isset($out[0][$i])) { echo '('.$out[2][$i].")\n".$out[4][$i]."\n"; echo $out[2][$i]."\n".$out[4][$i]."\n"; $i++; $vse++; } $n++; } echo "\n(".$vse.")";

The last line is to make sure i got all of them, 20440 at the time.
Ran it with shell, and piped to “final”: php parser.php > final

So, the conclusion was, the size of bash.org is ~5 MB
This are the files if you want them: link. (or email me)

Tags: , , ,
Posted in Hacking, Scripting - 2 Comments