tag:blogger.com,1999:blog-70329971457643398192024-03-19T18:45:25.939+01:00Fighting With (and sometimes against) WebMichal Rucinskihttp://www.blogger.com/profile/12886190100268480695noreply@blogger.comBlogger22125tag:blogger.com,1999:blog-7032997145764339819.post-53715894667811883752010-05-12T16:00:00.003+02:002010-05-12T16:09:33.787+02:00How to move Ubuntu 9.10 to bigger USB driveTired again. Tired searching, tired reading all tutorials found on the net.
So I've discovered my own solution, combined from many sources.
It took me 20 mins to move my Ubuntu from old pendrive to the new one. And it works - that's the most important.
<br />
---
<br />
Old pendrive (sdy): 4GB, fat32 formatted (1 partition), casper-rw (3GB) persistent file<br />
New pendrive (sdx): 8GB<br />
sdx1: fat32, 880 MB (flag boot on)<br />
sdx2: ext2, 5,79 GB (label: casper-rw)<br />
sdx3: ext2, 1 GB (label: home-rw)
<br />
The whole process was made using Puppy Linux (booted from SD card)
<br />
1. Mount casper-rw file from old pendrive:
mkdir /mnt/usb
mount -o loop /mnt/sdy1/casper-rw /mnt/usb
<br />
2. Mount all sdx partitions
<br />
3. Copy casper-rw file content to casper-rw sdx partition
cp -avR /mnt/usb/* /mnt/sdx2
<br />
4. Copy home directory content to home-rw partition
cp -avR /mnt/usb/home/ubuntu /mnt/sdx3
<br />
5. Copy content of old pendrive to the first partition of sdx omiting casper-rw file (this part you can do using midnight commander file manager)
<br />
6. Make new usb bootable: syslinux /dev/sdx1
<br />
---
<br />
That's allMichal Rucinskihttp://www.blogger.com/profile/12886190100268480695noreply@blogger.com2tag:blogger.com,1999:blog-7032997145764339819.post-10024087783000004262009-12-22T21:56:00.003+01:002009-12-22T21:58:14.444+01:001337 alphabet<span style="font-size: normal;"><br />
A = 4<br />
B = |3<br />
C = (<br />
D = |)<br />
E = 3<br />
F = |=<br />
G = 9 (Suppose to be like a g)<br />
H = |-|<br />
I = 1<br />
J = j (normal since it's dedicated to "j00")<br />
K = |<<br />
L = |_<br />
M = /\/\ or |\/|<br />
N = /\/ or |\|<br />
O = 0<br />
P = p (normal since dedicated to "pwned") or |0<br />
Q = &<br />
R = |2<br />
S = 5<br />
T = 7<br />
U = |_|<br />
V = \/ (slashes)<br />
W = \/\/ (slashes)<br />
X = x (X is already 1337)<br />
Y = %<br />
Z = z (also already 1337)</span><br />
<span style="font-size: x-small;">(source: <a href="http://christianv.proboards.com/index.cgi?board=weekly&action=display&thread=24&page=1">http://christianv.proboards.com/index.cgi?board=weekly&action=display&thread=24&page=1</a>) <br />
</span>Michal Rucinskihttp://www.blogger.com/profile/12886190100268480695noreply@blogger.com0tag:blogger.com,1999:blog-7032997145764339819.post-36939444629179877542009-12-06T22:15:00.002+01:002009-12-06T22:19:36.754+01:002D Barcodes tamedI 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.<br />
This task was a real catastrophe. Mass Matrix barcodes generation.<br />
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).<br />
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 !!!).<br />
And than autotrace to convert it to any vector format (SVG in my case - easy to include into the web page).<br />
And voila. I'm home. Ready. Than just a simple command line script with filenames as arguments.<br />
Now I have to prepare script putting all images and descriptions into one PDF.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIqRZ1Qm9S4lMZR2u_mzYsXppx9xR42l73sLfY3FUGjHK9InFxtddxU2qos5zaMoXKw00A1zquE2q3d28kC-uyhWXSATRjGO-BaBo2odobZOsVgcKjepOVKhf8CEDZoJ-m_qK4eyzPbRg/s1600-h/iec.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIqRZ1Qm9S4lMZR2u_mzYsXppx9xR42l73sLfY3FUGjHK9InFxtddxU2qos5zaMoXKw00A1zquE2q3d28kC-uyhWXSATRjGO-BaBo2odobZOsVgcKjepOVKhf8CEDZoJ-m_qK4eyzPbRg/s320/iec.png" /></a><br />
</div>Michal Rucinskihttp://www.blogger.com/profile/12886190100268480695noreply@blogger.com1tag:blogger.com,1999:blog-7032997145764339819.post-83728881155273079242009-12-06T16:14:00.005+01:002009-12-06T16:46:35.469+01:00HTML5I really like new ideas. There is nothing more exciting for me than getting a new specification of whatever and study it.<br />
But. Previous "But" denotes somehow "Hm. I really don't know" or "I'm sorry, I'm not sure". Hesitation multiplied by million.<br />
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.<br />
"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.<br />
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.Michal Rucinskihttp://www.blogger.com/profile/12886190100268480695noreply@blogger.com0tag:blogger.com,1999:blog-7032997145764339819.post-81694469736455199552009-11-21T15:18:00.001+01:002009-11-21T15:22:25.983+01:00Karmic KoalaAnd 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 :)<br />
I'm surprised UbuntuOne integration works out-of-the-box. It's really handy feature.Michal Rucinskihttp://www.blogger.com/profile/12886190100268480695noreply@blogger.com0tag:blogger.com,1999:blog-7032997145764339819.post-79786911484249689782009-11-03T19:58:00.000+01:002009-11-03T19:58:13.901+01:00Busy day...... today... Small jQuery plugin: <a href="http://www.ascii.com.pl/switcher/">http://www.ascii.com.pl/switcher/</a>. Than small research on <a href="http://one.ubuntu.com/">http://one.ubuntu.com/</a>. Nice service.Michal Rucinskihttp://www.blogger.com/profile/12886190100268480695noreply@blogger.com0tag:blogger.com,1999:blog-7032997145764339819.post-2915279024012850472009-10-29T01:37:00.005+01:002009-12-06T16:48:51.183+01:00jQuery round switcherMater artium necessitas<br />
Tired searching for a good jQuery plugin able to rotate images by specified angle I've made a small custom content rotator: <a href="http://www.ascii.com.pl/switch.html">http://www.ascii.com.pl/switch.html</a><br />
Just a background CSS sprite imitating graphical switcher.<br />
<br />
<a href="http://www.ascii.com.pl/switch.html">http://www.ascii.com.pl/switch.html</a><br />
<br />
For this one I didn't make any tutorial: code is so easy so it doesn't need any.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMB-kJmp11lPqb4HmJ802wNXO6g_ugSEnEt4p8KIRX31TfWdX13A4UQe0u-0q3_A46L5-8wtWLl6Ta3vRiF_vT8rElu2is_6Qxpyd6kE3T_lfzt_c0stODuyvKwBAIsSo-DQlUBR94yKA/s1600-h/switch.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMB-kJmp11lPqb4HmJ802wNXO6g_ugSEnEt4p8KIRX31TfWdX13A4UQe0u-0q3_A46L5-8wtWLl6Ta3vRiF_vT8rElu2is_6Qxpyd6kE3T_lfzt_c0stODuyvKwBAIsSo-DQlUBR94yKA/s320/switch.png" /></a><br />
</div>Michal Rucinskihttp://www.blogger.com/profile/12886190100268480695noreply@blogger.com0tag:blogger.com,1999:blog-7032997145764339819.post-74903129462967991082009-10-15T21:42:00.000+02:002009-10-15T21:42:26.978+02:00How jQuery changes page developmentToday I've realized times I've created full featured form, with <i>action</i> and <i>method</i> 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.Michal Rucinskihttp://www.blogger.com/profile/12886190100268480695noreply@blogger.com0tag:blogger.com,1999:blog-7032997145764339819.post-15492928423153265892009-10-14T02:53:00.002+02:002009-10-14T03:11:34.852+02:00Final solutionFinally 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...Michal Rucinskihttp://www.blogger.com/profile/12886190100268480695noreply@blogger.com0tag:blogger.com,1999:blog-7032997145764339819.post-4653989148749626622009-10-11T13:26:00.003+02:002009-10-12T00:33:35.590+02:00VerificationWhole 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.<br />
And after few hours - first changes - from md5 to sha algorithm. Just in case...<br />
I hope anyway - password and session id combined and hashed with sha are secure enough to be transported over non-secure connection...Michal Rucinskihttp://www.blogger.com/profile/12886190100268480695noreply@blogger.com0tag:blogger.com,1999:blog-7032997145764339819.post-20491088007675316372009-10-10T15:31:00.001+02:002009-10-10T17:34:08.703+02:00md5 of nothingCreating 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.<br />
Try php md5(null).<br />
Just to let you know, da39a3ee5e6b4b0d3255bfef95601890afd80709 is SHA-1...Michal Rucinskihttp://www.blogger.com/profile/12886190100268480695noreply@blogger.com0tag:blogger.com,1999:blog-7032997145764339819.post-23280192187546323392009-10-07T13:11:00.002+02:002009-10-07T13:35:02.721+02:00jQuery and XML <![CDATA[ ]]>So it's a kind of mystery for me: why jQuery AJAX ignores tags inside CDATA block? Wrong - it <b>process</b> 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 :)Michal Rucinskihttp://www.blogger.com/profile/12886190100268480695noreply@blogger.com0tag:blogger.com,1999:blog-7032997145764339819.post-40778547447388013282009-10-06T13:03:00.004+02:002009-10-06T13:29:20.155+02:00XML, XSLT, Javascript, CSS, PHP in oneIt was a real fun to put it all together into one file. Anyway, it works. <a href="http://www.ascii.com.pl/xml/details.xml">http://www.ascii.com.pl/xml/details.xml</a>. 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:<br />
.htaccess <br />
<code>RemoveHandler .html .htm<br />
AddType application/x-httpd-php .php .htm .html .xml .xsl</code><br />
<br />
PHP header (for XML file)<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikgu1YlAEC5EJ-nF5UqNH4sYuHN6FKX3Ro123t6Wutmwq294nVmnN7D-QCTHPDfXVHJy_is1SLArEPJCMsdGFy5q6YfRY9-ZuwlyE1Xn0zkxTfYapXTwn3noaHLCjYuuB0Lp4MhlyojCU/s1600-h/headerxml.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikgu1YlAEC5EJ-nF5UqNH4sYuHN6FKX3Ro123t6Wutmwq294nVmnN7D-QCTHPDfXVHJy_is1SLArEPJCMsdGFy5q6YfRY9-ZuwlyE1Xn0zkxTfYapXTwn3noaHLCjYuuB0Lp4MhlyojCU/s320/headerxml.png" /></a><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
and for XSLT file:<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_tCEgYOq8SwETM7Y5-z0jY1Ai5cDtigboAvvG6oUoR_A8FXgoTzx3YtdnXL0DV2sSFpKsCwYfp_TpCnqU3-8h7vyfg4EBYE7WlHaxhDg3Nkut-GQ6pPrGs-iBizAGb3nFJYCiOCx3r3Q/s1600-h/headerxslt.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_tCEgYOq8SwETM7Y5-z0jY1Ai5cDtigboAvvG6oUoR_A8FXgoTzx3YtdnXL0DV2sSFpKsCwYfp_TpCnqU3-8h7vyfg4EBYE7WlHaxhDg3Nkut-GQ6pPrGs-iBizAGb3nFJYCiOCx3r3Q/s320/headerxslt.png" /></a><br />
</div><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
And even overall speed is ok:<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGobEd7AsO_l50ML8lYV5c2mrX3zipJcQnxg5BXjVlfgjcHl5WbcANy0q2txsQnpLyCQNhsn9TgTm1LWNwiUruoq1nQMchV1oXw9GswrtPJouGEEBxdzxIG5SPyGg8Drzx23UTTFXYbA8/s1600-h/net.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGobEd7AsO_l50ML8lYV5c2mrX3zipJcQnxg5BXjVlfgjcHl5WbcANy0q2txsQnpLyCQNhsn9TgTm1LWNwiUruoq1nQMchV1oXw9GswrtPJouGEEBxdzxIG5SPyGg8Drzx23UTTFXYbA8/s320/net.png" /></a><br />
</div>Michal Rucinskihttp://www.blogger.com/profile/12886190100268480695noreply@blogger.com0tag:blogger.com,1999:blog-7032997145764339819.post-49971979968713298032009-10-04T18:16:00.002+02:002009-10-04T23:42:49.654+02:00Again with Puppy LinuxWell, my SD card is in duty again. This time with the latest Puppy Linux, 4.3 as I remember?<br />
Answer is 'Why not' just in case the question 'Why?'.<br />
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).<br />
New system, new challenges. <br />
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 [<a href="http://hotfile.com/dl/14145686/b3b3b30/OpenOffice3.1.1-sfs4.sfs.html">download link</a>]). And I've got again nice system. Skype also running, I've found an 'old' pet package with skype 2.0.0.72.<br />
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)...Michal Rucinskihttp://www.blogger.com/profile/12886190100268480695noreply@blogger.com0tag:blogger.com,1999:blog-7032997145764339819.post-60154019744314036332009-10-01T16:53:00.001+02:002009-10-01T16:54:11.089+02:00And another one<a href="http://www.rucinski69.yoyo.pl/priv/details.xml">http://www.rucinski69.yoyo.pl/priv/details.xml</a> - this time it's a page combining XML, XSLT, CSS and jQuery. Just a kind of experiment...Michal Rucinskihttp://www.blogger.com/profile/12886190100268480695noreply@blogger.com0tag:blogger.com,1999:blog-7032997145764339819.post-71819425975214167842009-09-28T15:15:00.002+02:002009-09-28T15:29:21.071+02:00New sample page<a href="http://www.ascii.com.pl/new.html" class="demo">http://www.ascii.com.pl/new.html</a><br />
This time it's a jQuery/AJAX demo.<br />
<script type="text/javascript">
$('.demo').css({'text-decoration':'none'});
</script>Michal Rucinskihttp://www.blogger.com/profile/12886190100268480695noreply@blogger.com0tag:blogger.com,1999:blog-7032997145764339819.post-74143336027235092662009-09-27T17:08:00.003+02:002009-09-27T17:18:37.295+02:00Flash is not a web technologySo 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.<br />
Advice for all who want to have a nice looking flash page - educate yourself first :)<br />
[I am wide open for all new technologies, but it has to make any sense]<br />
Why such conclusion?<br />
Well. Five hours long I was playing with two technologies - jQuery AJAX and flash equivalent. And? That's why such a post title.Michal Rucinskihttp://www.blogger.com/profile/12886190100268480695noreply@blogger.com0tag:blogger.com,1999:blog-7032997145764339819.post-52677788214220521382009-09-24T11:07:00.004+02:002009-09-25T00:48:54.828+02:00System reinstallationToday. 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. <br />
As usual it will be USB installation to 4GB pendrive. Space is not large but with some tweaks it's enough.<br />
(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...<br />
Still working on <a href="http://www.ascii.com.pl/">http://www.ascii.com.pl/</a>. 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?Michal Rucinskihttp://www.blogger.com/profile/12886190100268480695noreply@blogger.com1tag:blogger.com,1999:blog-7032997145764339819.post-49581723176598314832009-09-23T21:34:00.002+02:002009-09-23T21:37:13.169+02:00Next battle with jQueryWell, to be honest I cannot call it battle. It was a real cooperation. <br />
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.<br />
Anyway my test site <a href="http://www.ascii.com.pl/">http://www.ascii.com.pl/</a> will be changed in a couple of days.<br />
It will be AJAX as well, but the content will be placed in RSS (you know RSS and so).<br />
And AJAX caching - it improves performance well.Michal Rucinskihttp://www.blogger.com/profile/12886190100268480695noreply@blogger.com0tag:blogger.com,1999:blog-7032997145764339819.post-45527393915288692882009-09-14T11:10:00.004+02:002009-09-14T14:06:52.205+02:00Skype status (xml file), jQuery and Apache MIMEWell, maybe it was not so scary, but it took me a couple of minutes to solve it.<br />
Skype provides information about user status on-line, for example:<br />
<code>http://mystatus.skype.com/telewizyjna.xml <br />
</code> 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.<br />
Solution? Simple php file getting content of external xml just to display it locally.<br />
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.<br />
Finally what I did:<br />
status.get file, to get xml file content and display it on local server as an xml<br />
(in .htaccess directive <code>AddHandler php5-script .get</code>)<br />
status.get code with header set to text/xml<br />
<code><br />
header ("Content-type: text/xml");<br />
$status = file('http://mystatus.skype.com/telewizyjna.xml');<br />
foreach($status as $display) {<br />
print($display);<br />
}<br />
</code><br />
<br />
And that's all. The most important - it works. (tested with Ubuntu Jaunty plus XAMPP and Firefox 3+ and Opera as browsers)<br />
<br />
<a name='more'></a>Remark: do not put anything like <code>AddType "text/xml" .get</code> to your .htaccess file. PHP header is enough to determine content type.Michal Rucinskihttp://www.blogger.com/profile/12886190100268480695noreply@blogger.com0tag:blogger.com,1999:blog-7032997145764339819.post-41189303974673832732009-09-14T03:04:00.000+02:002009-09-14T03:04:01.584+02:00New Skype 4 LinuxIt'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.Michal Rucinskihttp://www.blogger.com/profile/12886190100268480695noreply@blogger.com0tag:blogger.com,1999:blog-7032997145764339819.post-56600513713867433012009-09-13T13:57:00.002+02:002009-09-13T17:31:46.541+02:00Web and Javascript<span id="0" title="Click to correct">Tell me about Web interfaces before jQuery. OMG. I don't like horror films.<br />
jQuery - it was just a revolution for me.</span><br />
<span id="0" title="Click to correct">Ok, every developer should know JavaScript, but it was such a pain to develop anything - too much time for every simple task.</span><br />
<span id="0" title="Click to correct">With jQuery it's a different story. This library changed my way of working. It's so simple to use. <br />
</span>Michal Rucinskihttp://www.blogger.com/profile/12886190100268480695noreply@blogger.com0