Tuesday, January 31, 2006

MHD

Onehdá si žena kupovala v automatu lístek na MHD za 14 Kč a ta hranatá potvora na dvacku vrátila jenom korunu. To dycky naštve. Tentokrát jsem si ale všiml, že na automatu je nalíplý info, že reklamace se daj vyřizovat přes zelenou linku. Tak jsem tam zavolal, bylo to už v 6 večer => pokecal si se mnou záznamník. Trochu otráveně a bez nějaké naděje jsem nadiktoval číslo automatu, popis problému a adresu, kam mi mají poslat těch 5 korun. No a dneska mi zavolala paní z DP, jakže přesně se píše moje jméno, že to posílaj. To jsem fakt nečekal :-)

Saturday, January 28, 2006

Spam

Prohnal jsem svůj adresář se spamem skriptem a udělal graf počtu spamů za den (trochu jsem ho vyhladil). Vypadá dost znepokojivě.


spamgraf

Thursday, December 22, 2005

BFU = DFU ?


Před časem, myslím na rootu, proběhlo odhalení, že BFU je zkratka ryze českého původu, spáchaná nejspíše redaktory Netmagu blahé paměti. Ale dneska jsem ve Wikipedii narazil na DFU (Dumb Fucking User). Že by BFU byl vlastně jenom překlep?


Wednesday, December 7, 2005

K3B

Jak už jsem psal, K3B nedokáže ověřit zapsaná data, pokud názvy souborů/adresářů obsahují mezinárodní znaky. To je hodně špatný a podle tohoto nového komentáře k bugu se to zřejmě lepšit nebude:


------- Additional Comment #3 From Sebastian Trueg 2005-12-06 20:35 -------
I am only one man on all this and verification does not interest me that much.
That's why I keep moving this bug down the todo list... but I will do it
soon. I promise. :) please close the duplicate bug reports.
Nechtělo se mi tomu věřit, tak jsem se podíval na homepage a skutečně, vývojový tým zásadní aplikace tvoří jenom jeden člověk!




Nenajde se někdo, kdo by to dokázal spravit, vždyť jde jen o to, aby se správně převáděly znaky mezi 2 kódováními, nebo se pletu?




Nabízím 100 Kč formou zaslání na účet tomu, kdo tu chybu opraví.

Wednesday, November 30, 2005

Mandriva 2006 - rozdíl mezi Community a Official

Abych to příště nemusel hledat


Subject: Re: [Expert] Online sources for 2006
Date: středa 30 listopad 2005 20:50
From: Thomas Backlund tmb@mandriva.org
To: expert@mandrivalinux.org
Anne Wilson wrote:
* On Wednesday 30 Nov 2005 14:24, Gary Montalbine wrote:
** Is 2006 community a newer version of 2006 official? As I understand
** the above discussion community can safely be used as an update source
** for 2006 official. Correct?
*
* As I understand it, 2006 Official is the download/CD/DVD version, fully
* supported by Mandriva.  2006 Community has, I believe, updates and
* other packages supported only by the packager - not Mandriva.
2006.0 Official tree (official/2006.0/) is the "Frozen Cooker" from
where the Official ISO's get built.
- the media/main is the only supported part (besides the installer stuff)
- there are more packages here than fits on the DVD's (both in
media/main and even more media/contrib)
2006.0 Official Updates Tree gets the Security Updates for 2006.0
Official Main as per
2006.0 Community tree (devel/12006.0) is 2006.0 Official + 2006.0
Official Updates + ...
- this tree acts as a "Stable tree" for Products to come based on 2006.0
- this also gets other updates/bugfixes that are considered too simple
to go out as a Security Update
- newer versions of some programs are also allowed here as long as _they
don't break_ anything
- here you wont see any packages uploaded that would require many other
packages to be rebuilt,
so for example you wont see the new Firefox 1.5 here, or any of the
libs that is used in half the distro...
- This is the only place (besides Club and Offsite Repos such as SoS,
Thac) where Contributors
can upload bugfixes & security updates for Contrib packages in
media/contrib
* If that is not the case, someone will correct me.  If I am right, then
* it is slightly more risky than Official but a lot less risky than
* Cooker.
*
* Ann
Actually I would say this is the best Release to use as it will provide
a better testbase if more people use it.
And it's not risky, and bugzilla accepts bugreports against if if you
find any, and it will probably be fixed...
--
Regards
Thomas

Saturday, November 26, 2005

Debugování komunikace s klávesnicí

Momentálně si hraju s vylepšováním svojí klávesnice, akorát mi to moc nejde. Už jsem strávil tejdny různým zkoušením (no, nemám na hraní celý dny, proto tolik), až jsem uznal, že je nutný vědět, co se mezi klávesnicí a PC vlastně děje, protože podle teorie to prostě nefungovalo.


Takže jsem vyštrachal obvod MAX232, 5 kondenzátorů a napojil klávesnici na sériový port.

schema


fotka


Šmírovací program jsem obšlehl od sitha. V C totiž vůbec neumím a připadá mi jako totálně nepohodlný a nepřehledný jazyk, takže - vím, že je to napsaný prasácky, ale je to jednoúčelová věc a stačí mi:

#include <stdio.h>
#include <fcntl.h>
#include <termios.h>
#include <sys/ioctl.h>
#include <time.h>
#define SERIAK "/dev/ttyS0"
int openserial ();
void closeserial ();
float mereni ();
int fd;
int
openserial ()   //otevrit seriak
{
if ((fd = open (SERIAK, O_RDWR)) == -1)
{
return 0;
}
return 1;
}
void
closeserial ()   //zavrit seriak
{
close (fd);
}
float
mereni ()   //hlavni fce, mereni napeti
{
int status, hodnota1 = 2, hodnota2 = 3;
while (1!=2)
{
ioctl (fd, TIOCMGET, &status);
hodnota1 = (status & TIOCM_CTS)/TIOCM_CTS; //clock
hodnota2 = (status & TIOCM_RI)/TIOCM_RI; //data
printf ("%i,", hodnota1);
printf ("%i\n", hodnota2);
}
// return (hodnota1);
}
int
main ()
{
if (!openserial ())
{
printf ("Nelze inicializovat port \"s\".", SERIAK);
return 0;
}
mereni();
closeserial ();
return 0;
}

Prostě to vypisuje dvě hodnoty oddělený čárkou, první je stav CLOCK a druhý je stav DATA. Protože PS/2 jede jen na 9600 baudů, stíhá se to krásně:

...
1,0
1,0
1,0
0,0
0,0
0,0
0,0
0,0
0,0
0,0
0,0
0,0
0,0
0,0
0,1
0,1
0,1
...

Update:

A když se to nacpe do OpenOffice, tak se to dá krásně zvizualizovat:


graf



English summary: Spying on the PS/2 keyboard protocol using serial port.