• Script to Organize Dropbox’s Camera Upload folder

    Dropbox has a great feature called Camera Upload, where you can automatically upload pictures from your phone, making life for lazy people like me easier. The problem is that I take so many pictures with my phone that the folder ends up with a huge amount of files, making the task of browsing and viewing them slow and annoying.

    To fix this problem, I created a python script that will automatically organize pictures inside folders Year > Month.

    DropboxCameraUpload

    How to use:

    In order to use the script, put the file organize.py inside the ‘Camera Upload’ folder and run it from the terminal:

    python organize.py

    Enjoy!

    Code:

    ;)


  • Crosschecking movie watchlist from two people

    trakt

    Trakt.tv is a great service for those who like to keep track of everything they watch, both TV shows and movies. I am a bit of a statistics freak and I love to analyze any kind of data, and with this website it’s no different. So far I have watched 2,027 episodes from 35 different shows and 642 movies (that I have tracked so far).

    Another thing that I really like about trakt is that I can install a XBMC plugin to add shows automatically to the list after I’ve watched them.

    You know when you’re trying to decide which movie to watch with your girlfriend or friend, and you spend more time searching for what to watch than actually watching it? With this in mind, and using trakt’s API, I made a Python Script to do this work for me (maybe someday I can make a php version and put it online), and all you have to do is enter two usernames from trackt and it will list the movies.

    (continue reading…)


  • ATmega8A Development Kit Review

    Few days ago I received a ATmega8A Development Kit from ProtoStack.

    The board is well made, and it has everything you need to start developing any kind of project using the famous Atmega8, which is the same µC used by the first Arduino. Actually, you can also use this board with different µC’s such as Atmega168 and Atmega328 (used in Arduino UNO).

    The kit have a lot of space to add more components, and a good thing is that the VCC and GND voltage is easily accessed everywhere of the board. On the pictures and the video I posted here, I have connected the output pin PB2 to an resistor, green LED and to the ground, even without soldering the board works great.

    (continue reading…)


  • Renaming 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:


  • Distance 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!


  • Open 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.


  • Showing your last “twit” using php

    While editing my blog theme, I decided to add my last thoughts in twitter to the website. Came with a very simple php code that will get the information from the last twitter post and show it as a text line, so you can add in anywhere you want.

    This is the code:

    < ?php
    preg_match('#(.*)#',file_get_contents('http://twitter.com/statuses/user_timeline/username.xml?count=1'), $matches);
    echo $matches[0]
    ?>

    Of course, remember to change username for your own.