random mess

more than $(ls -1| wc -l) feeds filtered for you and more

Servizi a “usel ed gat”

Pubblicato da visik7 su Maggio 4, 2008

ovvero a cazzo di cane

trovate le 3 imprecisioni e schifezze del seguente filmato:

non ce la fate ve le dico io

1 il joypad non e’ della play (oltretutto chi lo ha in mano si muove come uno spastico)

2 la playstation non ha il rumble

3 la pronuncia “oto” ma sai leggere o ti passano la fonetica scritta da uno scimpanze’ ???

bonus: c’era bisogno di fare un collegamento da new york ???

bonus 2: sono davvero 70 milioni le copie vendute o ha inventato un numero a cazzo ??

Pubblicato su astio | Contrassegnato da tag: , , | 4 Commenti »

GT5 Prologue e ps3 firmware 2.10

Pubblicato da visik7 su Aprile 11, 2008

Il sonno non sopraggiunge quindi scrivo 2 post di fila :)

se anche tu hai gt5 prologue comprato sullo store JAP assieme ad una ps3 con firmware 2.10 e non vuoi aggiornare, nella speranza che qualcuno ti faccia smettere di pagare 70 euro per gioco, ma quei burloni di sony buttano fuori un aggiornamento con le formula1 e non poi resiste, quindi modifichi i dns per far credere al tuo monolite che non ci sono aggiornamenti

put this into your openwrt router /etc/hosts
75.125.48.114 feu01.ps3.update.playstation.net

ma finito l’aggiornamento di GT5 convinto di averglielo messo nel culo ti compare un messaggio in giapponese che non capisci e la console non fa assolutamente niente, riavvii e il gioco non parte piu’ dicendo che devi aggiornare

BENVENUTO SEI DEI NOSTRI

cazzo boia stare fermi mai!

Pubblicato su playstation 3 | Non ci sono Commenti »

shell history stats

Pubblicato da visik7 su Aprile 11, 2008

postato da mezzo planet$put_here_your_favourite_community a cadenze regolari di 1 mese e mezzo

visi@lappy64:~$ history|awk ‘{a[$2]++ } END{for(i in a){print a[i] ” ” i}}’|sort -rn|head
1671 ls
1145 cd
941 sudo
695 vim
317 iwconfig
252 python
184 ./manage.py
178 rm
175 ps
174 apt-cache

Pubblicato su bash, codesod | 2 Commenti »

L’informazione è inutile

Pubblicato da visik7 su Dicembre 12, 2007

Da circa 2 anni sono diventato un fanatico dell’informazione.

Leggo 200 feed che generano circa 1000 news al giorno(quando va bene).

Accade però di non trovare riferimenti diretti dalle fonti che consulto ad approfondimenti, quindi per un attimo ripiego su questo arcaico metodo chiamato motore di ricerca, dove le notizie me le devo andare a cercare invece di farmele recapitare :) ma tant’è non posso pretendere di navigare solo attraverso un feed reader (anche se sempre più spesso è così).

Il problema è che l’informazione dopo qualche ora è vecchia dopo qualche giorno è dimenticata e dopo qualche settimana è inutile, o l’inverso ma non ha importanza.

Esempio concreto:

Stavo guardando questo MovableType che è diventato opensource, a parte i soliti commenti del tipo “non vendono più quindi regalano” oppure “è in perl per forza che fa schifo” volevo qualcosina di più .

Quindi ho fatto la mia bella ricerchina so gugol con “movable type vs wordpress” e ne è uscito un articolo pieno di tante belle cosine tra le quali i grossi limiti di questa applicazione per blogging professionale, allora mi dico “ok non mi sono perso niente fin’ora continuerò a non perdermelo”.
Il problema è che l’articolo risale al 2005, ovviamente dal 2005 ad oggi sono cambiate parecchie cose sia per quanto riguarda MT sia per quanto riguarda WP quindi quell’articolo ha perso del tutto la sua rilevanza, troppe cose sono accadute per approvarne la validità di ciò che c’era scirtto.
Mestamente ho chiuso tutto e mi sono tenuti i miei “non lo vendono + quindi lo regalano” e ” è in perl per forza fa schifo” non potendo fare altrimenti.

Da cui la tesi e cioè che l’ informazione diventa inutile ad una velocità impressionante e tutto ha meno senso man mano che passa il tempo, questo detto così sembra banale e ovvio però io fino a qualche anno fa non leggevo feed e la roba che gugol mi trovava era più che sufficientemente nuova per soddisfare le mie necessità, oggi sembra non sia più così.

Pubblicato su digressioni | 1 Commento »

cosa non fare mai con una shell

Pubblicato da visik7 su Novembre 7, 2007

mi serviva un parser html

il meglio che sono riuscito a produrre e’ stato questo :


IFS=$’\n’
for i in $(export IFS=$” \t\n” ; curl -s -d $(for i in $(echo 1 2 3 4 5 6 18 19 20 21 22 23 P1 P2 P3 P4 P5 P6 P7); do echo -n chkG$i=ON\&; done ; echo -n chkGP8=ON) http://www.spaintiles.info/eng/sector/resultados_fabricante_productos.asp ); do echo $i |grep idfab | awk -F ‘> ‘ ‘{var = $2; split(var,a,”<”); print a[1] ; split($1,b,”\”") ; system(”curl -s http://www.spaintiles.info/eng/sector/” b[2] “|grep mailto |awk -F \\\” 47{print $2}47 “) ; print “—-” }’ ; done

orribile vero ? :)

Pubblicato su codesod | Non ci sono Commenti »

Il giorno che i router morirono

Pubblicato da visik7 su Novembre 3, 2007

retroscena:

http://punto-informatico.it/b.aspx?i=2104227

risultato:

testo:

A long long time ago
I can still remember
when my laptop could connect elsewhere.

And I tell you all there was a day
the network card I threw away
had a purpose - and it worked for you and me.

But 18 years completely wasted
with each address we’ve aggregated
the tables overflowing
the traffic just stopped flowing…

And now we’re bearing all the scars
and all my traceroutes showing stars.
The packets would travel faster in cars
the day the routers died.

So bye bye, folks at RIPE 55.
Be persuaded to upgrade it or your network will die.
IPv6 just makes me let out a sigh,
but I s’pose we’d better give it a try.
I suppose we’d better give it a try.

Now did you write an RFC
that dictated how we all should be?
And did we listen like we should that day?

Now were you back at RIPE 54
where we heard the same things months before
and the people knew they had to change their ways?

And we knew that all the ISPs
Could be future-proof for centuries.
But that was then not now.
Spent too much time playing WoW.

Oh there was a time we sat on IRC
making jokes on how this day would be.
Now there’s no more use for TCP
the day the routers died…

So bye bye, folks at RIPE 55.
Be persuaded to upgrade it or your network will die.
IPv6 just makes me let out a sigh,
but I s’pose we’d better give it a try.
I suppose we’d better give it a try.

I remember those old days I mourn
sitting in my room, downloading porn.
Yeah, that’s how it used to be…

When the packets flowed from A to B
via routers that could talk IP.
There was data that could be exchanged between you and me.

Oh but I could see you all ignore
the fact we’d fill up IPv4.
But we all lost the nerve
and we got what we deserved!

And while we threw our network kit away
and wished we’d heard the things they say.
Put all our lives in disarray
the day the routers died…

So bye bye, folks at RIPE 55.
Be persuaded to upgrade it or your network will die.
IPv6 just makes me let out a sigh,
but I s’pose we’d better give it a try.
I suppose we’d better give it a try.

Saw a man with whom I used to peer,
asked him to rescue my career.
He just sighed and turned away.

I went down to the net cafe
that I used to visit everyday.
But the man there said I might as well just leave.

And now we’ve all lost our purpose,
my cisco shares completely worthless…
No future meetings for me
at the Hotel Krasnapolsky.

And the men that make us push and push -
like Geoff Huston and Randy Bush.
Should’ve listened to what they told us
the day the routers died…

So bye bye, folks at RIPE 55.
Be persuaded to upgrade it or your network will die.
IPv6 just makes me let out a sigh,
but I s’pose we’d better give it a try.

fonte: commenti di punto informatico

Pubblicato su humor, internet, ipv6 | 1 Commento »

mx900 driver for linux

Pubblicato da visik7 su Luglio 25, 2007

un paio di settimane fa ho comprato un mouse bluetooth della logitech (mx900)

il mouse in se per se va pero’ ci sono tanti bottoni che non vengono gestiti correttamente

dopo 5 giorni spesi nel cercare di capire come patchare hid del kernel per gestire tali bottoni in una maniera semiseria ho gettato la spugna e scritto questo driver

il risultato e’ ottimo pero’ il modo utilizzato per raggiungerlo abbastanza patetico.

il risultato e’ stato 200 righe di codice con i bottoni hardcoded.

qui il codice


#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <linux/input.h>
#include <linux/uinput.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/socket.h>
#include <bluetooth/bluetooth.h>
#include <bluetooth/l2cap.h>
#include <bluetooth/hci.h>
#include <bluetooth/hci_lib.h>
#define GETBIT(v,n) ((v>>(n))&0×01)
#define SETBIT(v,n) (v |= (0×01<<(n)))
/* Globals */
static int uinp_fd = -1;
struct uinput_user_dev uinp; // uInput device structure
struct input_event event; // Input event structure
/* Setup the uinput device */
int setup_uinput_device () {
// Temporary variable
int i = 0;
// Open the input device
uinp_fd = open (”/dev/input/uinput”, O_WRONLY | O_NDELAY);
if (uinp_fd <= 0)
{
printf (”Unable to open uinput device. Are you root? \n”);
return -1;
}
memset (&uinp, 0, sizeof (uinp)); // Intialize the uInput device to NULL
strncpy (uinp.name, “Logitech Mx 900″, UINPUT_MAX_NAME_SIZE);
uinp.id.version = 4;
uinp.id.bustype = BUS_USB;
// Setup the uinput device
ioctl (uinp_fd, UI_SET_EVBIT, EV_KEY);
ioctl (uinp_fd, UI_SET_EVBIT, EV_REL);
ioctl (uinp_fd, UI_SET_RELBIT, REL_X);
ioctl (uinp_fd, UI_SET_RELBIT, REL_Y);
ioctl (uinp_fd, UI_SET_RELBIT, REL_WHEEL);
for (i = 0; i < 256; i++)
ioctl (uinp_fd, UI_SET_KEYBIT, i);
ioctl (uinp_fd, UI_SET_KEYBIT, BTN_MOUSE);
ioctl (uinp_fd, UI_SET_KEYBIT, BTN_LEFT);
ioctl (uinp_fd, UI_SET_KEYBIT, BTN_MIDDLE);
ioctl (uinp_fd, UI_SET_KEYBIT, BTN_RIGHT);
/* Create input device into input sub-system */
write (uinp_fd, &uinp, sizeof (uinp));
if (ioctl (uinp_fd, UI_DEV_CREATE))
{
printf (”Unable to create UINPUT device.”);
return -1;
}
return 1;
}
void move_mouse (int x, int y) {
memset (&event, 0, sizeof (event));
gettimeofday (&event.time, NULL);
event.type = EV_REL;
event.code = REL_X;
event.value = x;
write (uinp_fd, &event, sizeof (event));
event.type = EV_REL;
event.code = REL_Y;
event.value = y;
write (uinp_fd, &event, sizeof (event));
event.type = EV_SYN;
event.code = SYN_REPORT;
event.value = 0;
write (uinp_fd, &event, sizeof (event));
}
void report_button_and_wheel (char button_byte, char wheel) {
memset (&event, 0, sizeof (event));
gettimeofday (&event.time, NULL);
event.type = EV_KEY;
event.code = BTN_LEFT;
event.value = GETBIT(button_byte,0);
write(uinp_fd, &event, sizeof (event));
event.type = EV_KEY;
event.code = BTN_RIGHT;
event.value = GETBIT(button_byte,1);
write(uinp_fd, &event, sizeof (event));
event.type = EV_KEY;
event.code = BTN_MIDDLE;
event.value = GETBIT(button_byte,2);
write(uinp_fd, &event, sizeof (event));
event.type = EV_KEY;
event.code = KEY_ESC;
event.value = GETBIT(button_byte,3);
write(uinp_fd, &event, sizeof (event));
event.type = EV_KEY;
event.code = KEY_LEFTALT;
event.value = GETBIT(button_byte,4);
write(uinp_fd, &event, sizeof (event));
event.type = EV_KEY;
event.code = KEY_F12;
event.value = GETBIT(button_byte,5);
write(uinp_fd, &event, sizeof (event));
event.type = EV_KEY;
event.code = KEY_K;
event.value = GETBIT(button_byte,6);
write(uinp_fd, &event, sizeof (event));
event.type = EV_KEY;
event.code = KEY_J;
event.value = GETBIT(button_byte,7);
write(uinp_fd, &event, sizeof (event));
if (GETBIT(button_byte,6)==0 && GETBIT(button_byte,7)==0){
event.type = EV_REL;
event.code = REL_WHEEL;
event.value = wheel;
write(uinp_fd, &event, sizeof (event));
}
event.type = EV_SYN;
event.code = SYN_REPORT;
event.value = 0;
write (uinp_fd, &event, sizeof (event));
}
int main () {
struct sockaddr_l2 s_addr = { 0 };
struct sockaddr_l2 t_addr = { 0 };
int s, t, s_status, t_status, bytes_read;
char dest[18] = “00:07:61:09:59:46″;
start:
s = socket(AF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_L2CAP);
t = socket(AF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_L2CAP);
s_addr.l2_family = AF_BLUETOOTH;
s_addr.l2_psm = htobs(0×0013);
str2ba( dest, &s_addr.l2_bdaddr );
t_addr.l2_family = AF_BLUETOOTH;
t_addr.l2_psm = htobs(0×0011);
str2ba( dest, &t_addr.l2_bdaddr );
s_status = connect(s, (struct sockaddr *)&s_addr, sizeof(s_addr));
if ( s_status != 0){
fprintf(stderr,”unable to find the bluetooth device, retring …\n”);
goto start;
}
t_status = connect(t, (struct sockaddr *)&t_addr, sizeof(t_addr));
fprintf(stderr,”Connected, start reading…\n”);
if (setup_uinput_device () = 0){
short int rel_x, rel_y, temp_x, temp_y;
temp_x = buf[4];
temp_x = temp_x <>4;
temp_y = temp_y&0×000f;
rel_y = buf[5];
rel_y = rel_y << 4;
rel_y = rel_y & 0×0ff0;
rel_y = rel_y + temp_y;
if (GETBIT(rel_x,11)==1)
rel_x = rel_x | 0xf000;
if (GETBIT(rel_y,11)==1)
rel_y = rel_y | 0xf000;
move_mouse (rel_x,rel_y);
report_button_and_wheel(buf[2],buf[6]);
}
else {
printf(”somethings wrong, or everything is ok\n”);
goto start;
}
}
close(s);
close(t);
return 0;
}

modificare il mac address del mouse

compilare con

gcc -Wall -o mx900driver mx900driver.c -lbluetooth

sudo mx900driver

freccia laterale avanti = Alt

freccia laterale indietro = Esc

Tasto centrale con 2 quadrati disegnati dentro = F12

Freccia su (sopra alla rotella) = k

Freccia giu (sotto alla rotella) = j

gli ultimi 2 servono per scorrere gli item su google reader (o su altri siti se usate jackassify)

il resto dei tasti hanno una funzione normale

per modificare il comportamento modificate la funzione report_button_and_wheel cambiano l’event.code

il tutto e’ molto grezzo , se a qualcuno interessa miglioro le cose e faccio qualcosa di un po’ + usabile

p.s. per ora non ho idea se questa roba funzioni su installazioni a 64bit

Pubblicato su guide, linux, logitech | 2 Commenti »

Altri esperimenti di integrazione windows e linux

Pubblicato da visik7 su Luglio 19, 2007

questo e’ ottenuto usando rdesktop e seamlessrdp

ubuntu + windows

Pubblicato su remote desktop, seamless | 3 Commenti »

SecondLife meets Ajax born AjaxLife

Pubblicato da visik7 su Luglio 10, 2007

Katharine Berry, a student in the UK, has created an in-browser AJAX application that allows you to log into the virtual world of Second Life, but without all of the laggy graphics.

read more | digg story

Pubblicato su Uncategorized | Non ci sono Commenti »

Niente adsl

Pubblicato da visik7 su Luglio 9, 2007

Sabato mattina mi sono svegliato con una bella sorpresina:

Flat line
telecom mi ha staccato la linea
non c’è più portante il modem non ci prova neanche ad allinearsi, come se neanche ci attaccassi il cavo del telefono…

chiamo telecom(187):
premo 2
premo 2
compongo il mio numero
attendo un operatore:

IO: si salve il modem non si allinea
OP: ha installato il cd di alice ?
sono 4 anni che ho l’adsl no, non e’ mai entrato in casa non sono tanto stupido.
IO: No guardi e 4 anni che ho l’adsl non è la prima installazione il modem non si allinea.
OP: Un attimo che controllo…
<dopo 5 minuti di silenzio radio>
OP: Si ci sono dei problemi entro martedì sera e’ tutto a posto.

MARTEDì !!!!! AIUTO

ok era sabato

ok ci sono i 2 giorni lavorativi canonici.

MA MARTEDI’ OMFG!!! MARTEDI’!!!!!!!!!!

infilo la scheda isdn sul pc tiro il cavetto isdn, 64k, che schifo di linea, ma voi ci avete provato ad usare internet con una 64k nei giorni nostri?
non e’ mica + come una volta che la gente faceva i siti web che andavano a sassata ed erano ultraleggeri.
Oggi no oggi i siti fanno tutti cagare sono tutti lenti pieni di flash e merdate varie.

adesso sono in uni con una 30mbit spero mi appaghi abbastanza per resistere fino a domani sera.

Update:

sono di nuovo online meno di 1 giorno lavorativo x mettere a posto

speriamo non succeda più

Pubblicato su adsl | 1 Commento »