venerdì 30 dicembre 2011

After reading

here

i managed to have my canon selphy cp800 working under linux*

It still needs to tweaks somewhat, but hey! it works!

model id has to be modified in /usr/share/gutenprint/5.2/xml/printers.xml  from 1001 to 1004

* despite what's been said here

fosti tu che cagasti nella steppa

googlando, un solo risultato. dunque la riscrivo qui, ad maiorem dei gloriam.
oh natasha hai fatto tu la piscia siiii dimitri ne ho fatti 5 litri.... fosti tu che cagasti nella steppa, oscurando il sol dell'avvenir
ps: vedo che blogger.com vuole che io usi chrome. e invece no.
ps2: google ha indicizzato il risultato nel tempo di versare il brodo nelle tazzine, accorgersi che ne è rimasto poco per noi adulti e aggiungere acqua e, sob, un dado vegetale!!!

giovedì 29 dicembre 2011

le monde e l'italia

funzione di ricerca del sito www.lemonde.fr:*


Résultats de votre recherche

0 élément publié "depuis 7 jours" avec le(s) mot(s) ou expression "italie" dans "tout l'article" et classé par "date décroissante".

(ricerca effettuata il 29 dicembre 2011)


* se pensate: "è un bug!", siete italomani e fareste meglio a farvi curare
se invece pensate: "ah, ecco", siete realisti

martedì 4 ottobre 2011

U3 System - remove

I was having hard time to find out how to remove the u3 system crap that i've found installed in my sandisk usb stick.

I have read many post and suggestions, many of them proposing to use exe tools. Too bad, I am using linux.

Anyway, i eventually went on this post
http://jimcooncat.wordpress.com/2009/05/14/attempting-to-remove-u3-from-linux/

that basically proposes to echo "1" to the delete file in /sys/class/block/srX/device/
and in /sys/class/block/sdX/device/

(substitute the X with the appropriate number or letter: mine were sr1 and sdc but I won't guess yours are the same)

sabato 10 settembre 2011

Setting up a LDAP Server + SAMBA with Ubuntu 10.04 Server

Just a few notes about my installation of a LDAP server on Ubuntu 10.04 Server LTS.
Unfortunately, the guides on the web don't seem to work out of the box.
Fortunately, this way I have a chance to understand something about LDAP, ldif and the machinery.

I am following

https://help.ubuntu.com/10.04/serverguide/C/openldap-server.html


Samba 3.5.7
slap 2.4.21
ldap-tools

clean the system and populate the ldap db
#sudo apt-get purge slapd 
#sudo apt-get install slapd


#sudo ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/cosine.ldif
#sudo ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/nis.ldif
#sudo ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/inetorgperson.ldif


next create a backend (dc=linux,dc=local) as backend.linux.local.ldif
(here I have integrated the guide with http://ubuntuforums.org/archive/index.php/t-1313472.html)

# Load dynamic backend modules
dn: cn=module{0},cn=config
objectClass: olcModuleList
cn: module
olcModulepath: /usr/lib/ldap
olcModuleload: {0}back_hdb

# Database settings
dn: olcDatabase={1}hdb,cn=config
objectClass: olcDatabaseConfig
objectClass: olcHdbConfig
olcDatabase: {1}hdb
olcSuffix: dc=linux,dc=local
olcDbDirectory: /var/lib/ldap
olcRootDN: cn=admin,dc=linux,dc=local
olcRootPW: setyourpasswordhere
olcDbConfig: {0}set_cachesize 0 2097152 0
olcDbConfig: {1}set_lk_max_objects 1500
olcDbConfig: {2}set_lk_max_locks 1500
olcDbConfig: {3}set_lk_max_lockers 1500
olcLastMod: TRUE
olcDbCheckpoint: 512 30
olcDbIndex: uid pres,eq
olcDbIndex: cn,sn,mail pres,eq,approx,sub
olcDbIndex: objectClass eq
olcAccess: to attrs=userPassword by dn="cn=admin,dc=linux,dc=local" write by anonymous auth by self write by * none
olcAccess: to attrs=shadowLastChange by self write by * read
olcAccess: to dn.base="" by * read
olcAccess: to * by dn="cn=admin,dc=linux,dc=local" write by * read


then add the file to ldap

#ldapadd -Y EXTERNAL -H ldapi:/// -f backend.linux.local.ldif


Now it's the time to populate the frontend

Here's the file content

# Create top-level object in domain
dn: dc=linux,dc=local
objectClass: top
objectClass: dcObject
objectclass: organization
o: Enaip Arco
description: LDAP Enaip

# Admin user.
dn: cn=admin,dc=linux,dc=local
objectClass: simpleSecurityObject
objectClass: organizationalRole
cn: admin
description: LDAP administrator
userPassword: your password here

dn: ou=people,dc=linux,dc=local
objectClass: organizationalUnit
ou: people

dn: ou=groups,dc=linux,dc=local
objectClass: organizationalUnit
ou: groups

dn: uid=marco,ou=people,dc=linux,dc=local
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
uid: marco
sn: C
givenName: Marco
cn: marco c
displayName: Marco C
uidNumber: 1000
gidNumber: 10000
userPassword: marco1.0marco
gecos: Marco C
loginShell: /bin/bash
homeDirectory: /home/marco
shadowExpire: -1
shadowFlag: 0
shadowWarning: 7
shadowMin: 8
shadowMax: 999999
shadowLastChange: 10877
mail: marcoc@linux.local
postalCode: 38066
l: Arco
o: Example
mobile: +33 (0)6 xx xx xx xx
homePhone: +33 (0)5 xx xx xx xx
title: System Administrator
postalAddress:
initials: MC

dn: cn=studenti,ou=groups,dc=linux,dc=local
objectClass: posixGroup
cn: studenti
gidNumber: 10001


dn: cn=docenti,ou=groups,dc=linux,dc=local
objectClass: posixGroup
cn: docenti
gidnumber: 10002

dn: cn=tecnici,ou=groups,dc=linux,dc=local
objectClass: posixGroup
cn: tecnici
gidNumber: 10000


Please note that the command to add it it's now different:


ldapadd -x -D cn=admin,dc=linux,dc=local -W -f frontend.linux.local.ldif


Now if you have not got any errors, the following command should work


ldapsearch -xLLL -b "dc=linux,dc=local" uid=marco sn givenName cn


Accomplished these steps, I then went to guide https://help.ubuntu.com/10.04/serverguide/C/samba-ldap.html

I had to modify the guide.

First, the following command

#slapcat -f schema_convert.conf -F /tmp/ldif_output -n0 -s "cn={12}samba,cn=schema,cn=config" > /tmp/cn=samba.ldif


had to be as follows

slapcat -f schema_convert.conf -F /tmp/ldif_output -n0 -s "cn={13}samba,cn=schema,cn=config" > /tmp/cn=samba.ldif


((note the number) which I discovered after much pain looking in the subdirs in /tmp/ldif_output/cn=config/cn=schema


Second, as said here
http://ubuntuforums.org/archive/index.php/t-1501799.html

the /tmp/cn=samba.ldif file should be modified in the tail (removing last lines, from
structuralObjectClass: olcSchemaConfig


Also, the attempt to add the samba.ldif schema using the suggested
#ldapadd -x -D cn=admin,cn=config -W -f /tmp/cn\=samba.ldif
failed.
You should use

#sudo ldapadd -Y EXTERNAL -H ldapi:/// -f /tmp/cn\=samba.ldif


Now I am greeted with a
"adding new entry cn={13}samba,cn=schema,cn=config"
without errors.


About the "invalid credentials" here pretend that the password should be hashed.

(a workaround: put these lines


dn: cn=config
changetype: modify

dn: olcDatabase={0}config,cn=config
changetype: modify
add: olcRootDN
olcRootDN: cn=admin,cn=config

dn: olcDatabase={0}config,cn=config
changetype: modify
add: olcRootPW
olcRootPW: {MD5}your password here

dn: olcDatabase={0}config,cn=config
changetype: modify
delete: olcAccess


in a file and then add it to ldap

I also found that the proposed samba_indexes.ldif

dn: olcDatabase={1}hdb,cn=config
changetype: modify
add: olcDbIndex
olcDbIndex: uidNumber eq
olcDbIndex: gidNumber eq
olcDbIndex: loginShell eq
olcDbIndex: uid eq,pres,sub
olcDbIndex: memberUid eq,pres,sub
olcDbIndex: uniqueMember eq,pres
olcDbIndex: sambaSID eq
olcDbIndex: sambaPrimaryGroupSID eq
olcDbIndex: sambaGroupType eq
olcDbIndex: sambaSIDList eq
olcDbIndex: sambaDomainName eq
olcDbIndex: default sub


was incorrect, but the workaround for me was not, as there is pretended, to comment out uidNumber, but the line with

olcDbIndex: uid eq,pres,sub


Next step is to use smbldap-tools


#sudo gzip -d /usr/share/doc/smbldap-tools/configure.pl.gz
#sudo perl /usr/share/doc/smbldap-tools/configure.pl


Fine, but configure.pl pose many questions, not at all trivial

here there is a debian-base guide to understand what you're doing (in italian)

...to be continued

lunedì 8 agosto 2011

transmission-daemon dies on Mss-ii

transmission-daemon died ("Aborted") unexpectedly* installed using ipkg on my maxtor-shared-storage II (custom firmware edamame-3.5.47 by coyoteden <- thanks!).
Found somewhere that starting it with

export EVENT_NOEPOLL=1;transmission-daemon

was enough to let it run flawlessly.

*Unexpectedly means that the rpc-webpage at port 9091 were incompletely rendered and that a new started download stopped as soon as a client was ready to send data.

Unfortunately transgui seems to have a nasty bug when reducing to icon: the icon is invisible and the application is now unusable (where's the config file???).

domenica 29 maggio 2011

Claxonare

qui

http://gianfrancomammi.it/post/5385693704/circolare

c'è un bel pensiero di gianni celati, che mi ha fatto pensare al claxon.

ma 'sto gianfrancomammi ci fa conoscere anche dei pensieri di antonio stenelli. Per esempio


Secondo me hanno tutti torto


Adesso mi tocca dargli il tag letteratura, che ci vuoi fare

martedì 10 maggio 2011

Sisifo e il grana

Oggi cercavo di spiegare al Bimbo Nanni la storia di Sisifo.

Mi è venuta in mente - guardacaso - perché qui appena sparecchiato per la cena si deve apparecchiare per la colazione e appena rimosse le briciole (a vagonate) la sera ci si deve mettere in posizione per raccogliere quelle (a vagonate) del mattino.

Comunque. Non mi ricordavo più perché Sisifo avesse avuto la sua punizione.
E sì che mi piccavo di aver letto come primo testo filosofico Il mito di Sisifo di Camus... Vabbè.

Bimbo Nanni ha la sua soluzione: "Magari aveva cercato di rubare il Grana".

Ha ragione lui. Di sicuro

Bestie

Quelli del Seicento si appassionavano agli automi.
Noi li guardiamo come degli allocchi.
Ma poi troviamo questo e questo

venerdì 15 aprile 2011

python - emettere un beep

da qui


if sys.platform=='win32':

# os.system('SNDREC32.EXE "C:\WINDOWS\MEDIA\CHORD.WAV" /EMBEDDING /PLAY /CLOSE')

print chr(7),



# A generic error beep for all Linux platforms.

# There is a simple way to change the frequency, and the amplitude.

# This also works in a Linux terminal running a Python interpreter!

if sys.platform=='linux2':

audio=file('/dev/audio', 'wb')

count=0

while count<250:

beep=chr(63)+chr(63)+chr(63)+chr(63)

audio.write(beep)

beep=chr(0)+chr(0)+chr(0)+chr(0)

audio.write(beep)

count=count+1

audio.close()

mercoledì 30 marzo 2011

cubo di rubik

mentre il "nostro" premier pensa al culo di rubyk,
io guardo questa serie qui

http://www.youtube.com/watch?v=NEgEpvQKZ1A
http://www.youtube.com/watch?v=FPEQY_ozyxM

lunedì 28 marzo 2011

py2exe mfc90

Qui

http://www.py2exe.org/index.cgi/Py2exeAndWin32ui

si dice che basta far così

mfcfiles = [join(mfcdir, i) for i in ["mfc90.dll" "mfc90u.dll" "mfcm90.dll" "mfcm90u.dll" "Microsoft.VC90.MFC.manifest"]]

data_files = [("Microsoft.VC90.MFC", mfcfiles),
]


ma dimenticano che serve un

from os.path import join

e che la riga va riscritta così

mfcfiles = [join(mfcdir, i) for i in ["mfc90.dll", "mfc90u.dll", "mfcm90.dll", "mfcm90u.dll", "Microsoft.VC90.MFC.manifest"]]


inoltre già che ci siamo potremmo fare


data_files = [("Microsoft.VC90.CRT", glob(r'c:\python27\win-redist\*.*')),

("Microsoft.VC90.MFC", mfcfiles)]


per far in modo che ci siano anche le msvcrXX.dll giuste (/a versione giusta)

...ecco, tanto per dire...

martedì 15 marzo 2011

Kathamari hack e suo fratello


outstanding

javascript:var i,s,ss=['http://kathack.com/js/kh.js','http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js'];for(i=0;i!=ss.length;i++){s=document.createElement('script');s.src=ss[i];document.body.appendChild(s);}void(0);

javascript:var%20s%20=%20document.createElement('script');s.type='text/javascript';document.body.appendChild(s);s.src='http://erkie.github.com/asteroids.min.js';void(0);

(copy and paste in the address bar of a html5 compliant browser)

giovedì 24 febbraio 2011

dvdisaster Illegal Request; Read of scrambled sector without authentication

Il dvd di popeye del piccolo non è più leggibile. buttalo di qua tiralo di là si è graffiato...
Perché non usare dvdisaster?
Ok, sudo apt-get install dvdisaster
poi Però il caro dvdisaster si lamenta che non può leggere il contenuto scrambled...
Ma se, come suggerito qui, in un post si avvia totem, il quale "autentica il drive", poi dvdisaster legge il disco...
Quanta pazienza

lunedì 31 gennaio 2011

Simile timeline inside mediawiki

Since I do not have enough (interesting) work to do, I tried to incorporate the fancy simile timeline widget into a brand new mediawiki 1.16.1 and...

after some googling and some js alert stating

Failed to derive URL prefix for Timeline API code files


I managed to have it working...
And editable wiki a page contains data!

a remainder for myself and a tip for my readers:

* use Extension HTMLets
and
* use local js (trying to get scripts from MIT website raises that nasty error)

voilà

here a snapshot

giovedì 27 gennaio 2011

OpenOffice and non-greedy regex

Today I discovered with a mix of horror and microsoft-feeling that OpenOffice 3.2 has a reduced version of regex and that therefore the ? don't produces non-greedy regex expressions...

Here seems to be a workaround

Find

<([:alpha:]+)[^>]*>([^<]*)


Replace:

$2