Tuesday, December 22, 2009

1337 alphabet


A = 4
B = |3
C = (
D = |)
E = 3
F = |=
G = 9 (Suppose to be like a g)
H = |-|
I = 1
J = j (normal since it's dedicated to "j00")
K = |<
L = |_
M = /\/\ or |\/|
N = /\/ or |\|
O = 0
P = p (normal since dedicated to "pwned") or |0
Q = &
R = |2
S = 5
T = 7
U = |_|
V = \/ (slashes)
W = \/\/ (slashes)
X = x (X is already 1337)
Y = %
Z = z (also already 1337)

(source: http://christianv.proboards.com/index.cgi?board=weekly&action=display&thread=24&page=1)

Sunday, December 6, 2009

2D Barcodes tamed

I love open source software. And I don't agree people saying something is impossible. I use Linux so I disagree something is not possible on Linux.
This task was a real catastrophe. Mass Matrix barcodes generation.
iec16022 command-line software is cute but images are too small. Ok, you can specify widthxheight, but there is a side effect (just try it).
So pictures 24x24 pixels and mogrify from ImageMagick to change the size (maybe sharpness is not so high but readers doesn't have any problems with it - and the initial size was just 24x24 pixels !!!).
And than autotrace to convert it to any vector format (SVG in my case - easy to include into the web page).
And voila. I'm home. Ready. Than just a simple command line script with filenames as arguments.
Now I have to prepare script putting all images and descriptions into one PDF.






HTML5

I really like new ideas. There is nothing more exciting for me than getting a new specification of whatever and study it.
But. Previous "But" denotes somehow "Hm. I really don't know" or "I'm sorry, I'm not sure". Hesitation multiplied by million.
I have to verify my sources. w3.org, whatwg.org, mozilla.org. Serious players? And still no clue what HTML5 is for. Few tricky features. Nice, but I don't need any HTML5 to create the same type of content and functionality.
"Tag soup". In many places I've found such a "definition". Well... Another "But". Probably authors doesn't see the difference between complexity and an ordinary mess. It's like saying that billboards are better than books because billboards are more readable.
Anyway - will see the future.  My prediction for HTML5 - it doesn't make any sense now. Maybe the future 'll show I'm wrong. Maybe.

Saturday, November 21, 2009

Karmic Koala

And again system reinstallation. This time Karmic Koala. Thanks to Ubuntu I need about 1 hour to restore all settings - most applications and plugins are placed on my HDD and the only thing I have to do is to restore all symlinks. Nice :)
I'm surprised UbuntuOne integration works out-of-the-box. It's really handy feature.

Tuesday, November 3, 2009

Busy day...

... today... Small jQuery plugin: http://www.ascii.com.pl/switcher/. Than small research on http://one.ubuntu.com/. Nice service.

Thursday, October 29, 2009

jQuery round switcher

Mater artium necessitas
Tired searching for a good jQuery plugin able to rotate images by specified angle I've made a small custom content rotator: http://www.ascii.com.pl/switch.html
Just a background CSS sprite imitating graphical switcher.

http://www.ascii.com.pl/switch.html

For this one I didn't make any tutorial: code is so easy so it doesn't need any.


Thursday, October 15, 2009

How jQuery changes page development

Today I've realized times I've created full featured form, with action and method and so on is already a past. Because of jQuery. It's quicker and more elegant (from my point of view) to use jQuery's selectors to invoke an action rather than with standard forms. And AJAX support, that altogether made a small revolution in UI design.

Wednesday, October 14, 2009

Final solution

Finally I have found solution for all my 'Standards compliance' problems in relation to XSLT and XHTML. Many times it was a problem with jQuery library - and the solution was as simple as I couldn't imagine - I had to put jQuery source link inside XSLT not in source XHTML. And that's all...

Sunday, October 11, 2009

Verification

Whole weekend I was working on PHP/Javascript user authentication system. The goal was to minimize sending any unencrypted data over non-secure connection. So md5 was my best friend. Finally I did it, using AJAX and PHP.
And after few hours - first changes - from md5 to sha algorithm.  Just in case...
I hope anyway - password and session id combined and hashed with sha are secure enough to be transported over non-secure connection...

Saturday, October 10, 2009

md5 of nothing

Creating authentication procedure for php+javascript, I've stacked with one value: d41d8cd98f00b204e9800998ecf8427e. I knew it, and searching google I've found it: md5 of nothing.
Try php md5(null).
Just to let you know, da39a3ee5e6b4b0d3255bfef95601890afd80709 is SHA-1...

Wednesday, October 7, 2009

jQuery and XML <![CDATA[ ]]>

So it's a kind of mystery for me: why jQuery AJAX ignores tags inside CDATA block? Wrong - it process it as HTML tags, XSLT ignores it. Well, I've got nothing against - with XSLT there is a lot of work to recover HTML from inside CDATA and here I've got it as a bonus. Thanks jQuery :)

Tuesday, October 6, 2009

XML, XSLT, Javascript, CSS, PHP in one

It was a real fun to put it all together into one file. Anyway, it works. http://www.ascii.com.pl/xml/details.xml. Ok, I just had to test it, if it is possible, but it is. I didn't make any tutorial, code is self explanatory, maybe .htaccess and php header needs additional explanation:
.htaccess
RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html .xml .xsl


PHP header (for XML file)














and for XSLT file:











And even overall speed is ok:


Sunday, October 4, 2009

Again with Puppy Linux

Well, my SD card is in duty again. This time with the latest Puppy Linux, 4.3 as I remember?
Answer is 'Why not' just in case the question 'Why?'.
Well, some troubles with network manager, but connection using network scanner as usual without any problems (I don't believe anyway I'm the only having problem connecting to WEP  network, doesn't matter).
New system, new challenges.
FF 3.5 runs quite out of the box. It needs two small dbus packages and I could run it from hdd. As well as all extensions (extensions directory as a symlink). And the same with openoffice 3.1.1 as mountable sfs file (sfs file required conversion to sfs v.4 [download link]). And I've got again nice system. Skype also running, I've found an 'old' pet package with skype 2.0.0.72.
BTW one hour to create custom os it's not so bad (with all FF bookmarks/passwords imported from files I left on my hdd)...

Thursday, October 1, 2009

And another one

http://www.rucinski69.yoyo.pl/priv/details.xml - this time it's a page combining XML, XSLT, CSS and jQuery. Just a kind of experiment...

Monday, September 28, 2009

New sample page

http://www.ascii.com.pl/new.html
This time it's a jQuery/AJAX demo.

Sunday, September 27, 2009

Flash is not a web technology

So what is flash? Hm... kind of cancer for me. Flash has nothing to do with www at all. So, why so many flash pages? And it's the most interesting aspect of flash.
Advice for all who want to have a nice looking flash page - educate yourself first :)
[I am wide open for all new technologies, but it has to make any sense]
Why such conclusion?
Well. Five hours long I was playing with two technologies - jQuery AJAX and flash equivalent. And? That's why such a post title.

Thursday, September 24, 2009

System reinstallation

Today. Today I have to reinstall my system. I hate it but there are some problems with Skype and sound, I don't want to investigate it - easier method is to reinstall my Ubuntu.
As usual it will be USB installation to 4GB pendrive. Space is not large but with some tweaks it's enough.
(and after few hours)  - system reinstalled. Anyway, it wasn't Skype problem at all. Pulseaudio. So it was a Skype problem, but after switching sound in/out to hw:Intel,0 everything is ok back again. And I've got a brand new system...
Still working on http://www.ascii.com.pl/.  I wonder why AJAX cannot access files from external domains while PHP does? Where is the clue? I've placed a simple jQuery blog topics' list on my page but what I had to do was getting Atom content using PHP (and mod_alias). Why PHP can do it and JS cant?

Wednesday, September 23, 2009

Next battle with jQuery

Well, to be honest I cannot call it battle. It was a real cooperation.
Using jQuery is a real pleasure. To know everything about everything I've made some tests with mootools and prototype. But jQuery is the best.
Anyway my test site http://www.ascii.com.pl/ will be changed in a couple of days.
It will be AJAX as well, but the content will be placed in RSS (you know RSS and so).
And AJAX caching - it improves performance well.

Monday, September 14, 2009

Skype status (xml file), jQuery and Apache MIME

Well, maybe it was not so scary, but it took me a couple of minutes to solve it.
Skype provides information about user status on-line, for example:
http://mystatus.skype.com/telewizyjna.xml
It's ok, but status file is outside my domain, so browsers (unless you hack them to omit security rules) 'll refuse to process AJAX request.
Solution? Simple php file getting content of external xml just to display it locally.
Straight forward, isn't it? But then came famous MIME type problem, and jQuery couldn't parse my php file, because MIME was sent to browser as text/html, not as text/xml.
Finally what I did:
status.get file, to get xml file content and display it on local server as an xml
(in .htaccess directive AddHandler php5-script .get)
status.get code with header set to text/xml

header ("Content-type: text/xml");
$status = file('http://mystatus.skype.com/telewizyjna.xml');
foreach($status as $display) {
print($display);
}


And that's all. The most important - it works. (tested with Ubuntu Jaunty plus XAMPP and Firefox 3+ and Opera as browsers)

New Skype 4 Linux

It's probably my fault - I didn't have enough time to play with a new Skype 2.1 for Linux. But. I didn't have enough time to test it carefully enough - I had to stay online. The first impression was good, SMS feature integrated with the main application, I couldn't test video, nobody from my friend was online (3 a.m.), but sound - the new version is by default set to pulseaudio for all settings (sound in, sound out, ringing). But I need HDA Intel (hw:Intel,0) as a recording source. So after 20mins brand new Skype was removed and the old one 2.0.0.72 was installed back. Skysentials for SMSes is not so bad.

Sunday, September 13, 2009

Web and Javascript

Tell me about Web interfaces before jQuery. OMG. I don't like horror films.
jQuery - it was just a revolution for me.

Ok, every developer should know JavaScript, but it was such a pain to develop anything - too much time for every simple task.
With jQuery it's a different story. This library changed my way of working. It's so simple to use.