Archives
bookmark_borderRenaming JPEGmini files with Python
JpegMINI is awesome! If you guys haven’t checked this project out you should take a look at it! They have built an amazing jpeg compression algorithm; I even bought the mac app, it’s really good for compressing ≈ 8mb into 3mb pics without loss of quality.
But right now their mac app can only compress files bigger than 2 megapixels, which is quite annoying when you want to compress small files for a website.
You can do that by uploading the pictures for free on their website. The problem is that all pictures are renamed with an annoying _mini.jpg at the end.
So I just created a very small python script to handle this renaming:
bookmark_borderPicPlz Python Backup Script
So long and thanks for all the fish!!!
PicPlz is going down, I guess that soon they will allow users to download their pictures before all is wiped off their data centers. While we wait, I’ve created a simple Python Script when entering the username you can download all the photo stream.
You get follow the project on GitHub
bookmark_borderDistance of two Geo-Points in PHP & Python
I needed to calculate the distance between two Geo-Points using PHP.
Using Haversine formula you get to this function, where you enter lat1, long1, lat2, long2 and it will give the distance in Km.
In case you want to show the distance in Miles, simply change the Earth radius to 3956.
PHP:
Python
Hope it helps someone!
bookmark_borderOpen Hardware MoodLamp
Finally it’s here, my first Open Hardware project, in which I have delayed some years to release due my lack of time to finish it and make it presentable.
For this project I’ve created a Project Page, in which I will be updating in a regular basis.
So I want to invite you to take a look at the
OPEN HARDWARE MOODLAMP PROJECT PAGE.
bookmark_borderIncremental Backups using RSYNC and SSH
I was studying last semester in Politecnico di Milano, a great university in Milan, Italy. Anyway, I am taking lots and lots of pictures here (Italy is a beautiful country).
I am saving my pictures on my computer, but WHAT IF something goes wrong with my computer?
So what I am doing is backing up my pictures (also other things as work files) to my NAS SERVER in Brazil during the night, using RSYNC via SSH (Of course it’s an incremental backup, as I have more then 300GB of photos).
On my server I don’t run SSH on the regular port 22. I use, for example the port 223.
rsync -av --update --delete -e 'ssh -p 223' /Users/dansku/MyDocs/Fotografias
user@servr:/home/daniel/SERVER/Backups/
Where /Users/dansku/MyDocs/Fotografias is the local dir, and /daniel/SERVER/Backups is the remote dir.
This way, even if my computer is stolen, I know my data is backed up!