Mashups, APIs, Website Information Shared...

Archive for the ‘Code’ Category

How to Create a GreaseMonkey Script using JQuery and SelectorGadget

Friday, February 27th, 2009

Hello Hello,

I am here again, only an hour after I originally posted about this great new tool to give you a tutorial I quickly wrapped up about using the SelectorGadget Bookmarklet Tool and JQuery to create a simple GreaseMonkey userscript.

SelectorGadget Background

SelectorGadget is a great new bookmarklet tool that you can use on any website to select html elements on the page dynamically! The real power of SelectorGadget is that is that it automatically selects similar elements! So as you select what you want and don’t want, it will work towards selecting the exact elements on the page you want, for example the titles of blog posts! (I’ll give a tutorial below)

The Official Description is (lifted from the official homepage)

“SelectorGadget is an open source bookmarklet that makes CSS selector generation and discovery on complicated sites a breeze. Just drag the bookmarklet to your bookmark bar, then go to any page and press it. A box will open in the bottom right of the website. Click on a page element that you would like your selector to match (it will turn green). SelectorGadget will then generate a minimal CSS selector for that element, and will highlight (yellow) everything that is matched by the selector.”

If you go to the SelectorGadget Homepage you can see a great tutorial video on the basics on using SelectorGadget, I’ll quickly run through the minimal installation process to save you click around until you want to do your additional research :)

(more…)

Drop.io for PHP, iPhone, Ruby and Additional Tutorials / Resources

Saturday, February 14th, 2009

Drop.io

I was doing some follow-up on my old posts (the 6 of them, heh) and I realized I didn’t post any good tutorials or resources for the drop.io post, I’ll organize them into languages and you can take it from there.

The resources after the fold :)

(more…)

Last.fm API for CodeIgniter – ci-phplastfmapi

Friday, February 6th, 2009

is a great php framework and lately I’ve been playing with it on my personal projects. Many of those personal projects are music related so of course I am using the last.fm api.

While looking for various ways of integrating the last.fm api into my application I stumbled upon the very well developer PHP LastFM API also known as “lastfm_protocol” and from their documentation and organization you can see that its top notch.

The PHP LastFM Api seems to expose every method that the official last.fm api supports.

So I’ve written this lightweight wrapper for the library that allows you to expose the full functionality of matto1990’s library without touching it (allowing for updates to PHP LastFM Api to unaffect the CodeIgniter Library)

Note: I am releasing this without much support but please comment here and I’ll attend to all of your inquiries!
How to Install

  • Download using the link below
  • Extract the zip file on your computer
  • Upload the files into the appropriate file structure (those of you comfortable with the “merge” upload, do so)
  • User: $this->load->library(’CI_LastFmAPI’); in your code or add CI_LastFmAPI to your config/autoload.php
  • Use the documentation for using the phplastfmapi

The Links