E la curiosità oggi mi ha fatto scaricare l’ultima SDK per android.. Vedremo cosa ne verrà fuori!! ;)

PostePay do it Yourself

I think almost everybody has one of those credit cards that you can “load” with money only when you need them and then leave them empty. Well, I have one and it’s really hard for me to keep up with the money that I have inside that card, I use it quite often and usually I never put the exact amount of money that I need for that transaction that I’m going to do.

That card has an horrible online service and it’s impossible for me to know how much I have on that card, the only way would be to go to the first ATM and check, but since I’m lazy, I decided to write a small web page that will keep track of every movement that I do with that card.

Meet PostePayDIY, (yes, postepay is the name of the card that I own) :)

It’s just a simple web page in php that makes use of a mysql database, you can run it safely in every web server, it has no safety implication since it doesn’t store the full card number, nor it’s expire date, and of course it doesn’t store the CVV..

I’m developing it on github, so here’s the link: https://github.com/danixland/ppay_diy feel free to look at it and try it, and if you find something that’s awfully coded, change it, I’m open to suggestions and so on.. :)

I’m doing this just for fun and in a moment of deep boredom, so I’m sure there’s a lot that can be improved..

have fun!

Miranda Kerr

image

Non è assolutamente la più bella donna sulla faccia di questo misero pianeta?!

WordPress local install

Quando si tratta di fare le cose in modo automatico mi diverto sempre a buttare giù degli script che mi aiutino a superare la routine.. :)

E’ il caso di wp_manager.sh, uno scriptino che è in grado di installare e aggiornare da svn tutte le installazioni locali di WordPress che ho..

Lo script può essere lanciato con le 3 opzioni seguenti:

  • -h che visualizza solo un breve testo di aiuto e poi esce senza far nulla.
  • -i <nome> che installa i file di WordPress nella cartella “nome” e ci copia dentro un file wp-config.php pronto per l’uso con i dati del mio database locale di MySQL e si occupa inoltre di copiare i file del plugin WordPress-importer nella cartella wp-content/plugins/ all’interno della cartella “nome” appena creata.
  • -u che si occupa di aggiornare all’ultima nightly release tutte le installazioni di WordPress presenti nella document directory del mio webserver locale..

Come potete vedere l’opzione di default è -h così lo script non fa danni e vi spiega come usarlo al meglio.. ;)
Continue reading

convertire file video in mp3

un piccolo appunto su come convertire velocemente un video in mp3..

 

ffmpeg -i file_da_convertire.flv -f mp3 -ab 192000 -vn nuovo_file.mp3

 

ovviamente bisogna avere ffmpeg installato nel sistema, le opzioni che abbiamo passato sulla riga sono:

  • -i: file di input
  • -f: formato di output
  • -ab: bitrate del file mp3
  • -vn: non catturare il video

Semplice e veloce, provare per credere.. ;) e ovviamente se usate questo comando o lo migliorate in qualche modo fatemelo sapere nei commenti..

While looking at my old backups, I found something that reminded me of my first attempts at web design.. I had so much fun during these days, and I felt almost like a true hacker!! :halo:

have a look at my first site and a dark remake I did almost 7 years ago..

dropbox and cloud storage

Oggi ho iniziato ad usare dropbox, un sistema di cloud storage con client per varie piattaforme, tra cui quelle che interessano a me :) linux e android..

Il funzionamento è abbastanza semplice, ci si registra sul sito, si scarica e installa un demone che girerà in background e avrà il compito di sincronizzare una determinata directory sul nostro pc con un server presente su internet, il tutto tramite connessione cifrata SSL, da li in poi basterà copiare un file nella directory controllata dal demone per ritrovare quello stesso file nella nuvola :D

Continue reading

plugin coding

Continuo a scrivere il plugin “danixland-subscribe-to-blog“, anche se oggi sono un po’ bloccato a livello mentale..

Queste sono le funzionalità attualmente implementate:

  • Aggiunta di indirizzi email al database dopo aver verificato che lo stesso indirizzo non esista già e solo se la mail di conferma è stata inviata con successo.
  • Funzione per ripulire il database dagli indirizzi non confermati/rimossi ogni 5 giorni (è troppo/troppo poco?)
  • Una bozza della funzione che invierà le mail. Sto pensando se implementare un sistema di code in caso di grossi quantitativi di email per non incidere troppo sul webserver.

Funzionalità che vorrei aggiungere:

  • Apparenza del widget pubblico diversa a seconda se l’utente è registrato o meno sul sito in modo da emulare il widget di WordPress.com (pulsante in caso di login effettuato, campo “email” in caso di visitatore non registrato).
  • testi per le email “personalizzati” tramite interfaccia di configurazione (non ne sono troppo sicuro, vorrei tenermi sul semplice). (Ho deciso di non implementare questa funzionalità)
  • Email HTML/plain-text permettendo all’utente di “switchare” tramite pagina di configurazione (non sono troppo sicuro dello switch, ma una prima ricerca in materia di multipart mi ha confortato, penso che lo implementerò).
  • Qualcos’altro a cui non ho ancora pensato (commentate pure) :P

For my international readers

I’m still writing “danixland-subscribe-to-blog”, a plugin that mimics the behaviour of the “subscribe-to-blog” widget on WordPress.com.

This is what the plugin is capable of at the moment:

  • it can add email addresses after having verified that the same address is not already in our database, and only after a confirmation email was correctly sent.
  • it now has a function that cleans the database from unverified email addresses after 5 days (too long/ too short? let me know)
  • There’s a stub of the mail sending function. I’m thinking about implementing a mail send queue in order to take care of sites with lots of subscribers, so that the webserver doesn’t suffer too much.

And here are the functionalities that I’d like to add before releasing the plugin:

  • Front-end widget displaying different actions if the user is logged in on the site or not (the same as the WordPress.com widget).
  • Custom email content using the Setting API (I’m not sure about this). (I’ve decided not to implement this option)
  • HTML/plain-text emails allowing the user to switch on the Settings Page (I’m not sure about the switch but I think I’ll add the multipart email).
  • Something else I didn’t think about yet (feel free to let me know your suggestions in the comments below) ;)