January 2012 Archives

Adding ops to your new freenode channel

So you’ve just registered a channel on irc.freenode.net for your group. No one wants a single point of failure, and you never know when you’ll win the lottery (or be hit by a bus) so you’d like to op your teammates. This way if anything happens to you (good or bad) your colleagues can kick troublemakers and keep the /topic fresh.

If you’re new to IRC interacting with nickserv and chanserv can be confusing at times. There are a ton of features many of which are laden with IRC jargon.

Here’s a step by step for adding your collaborators as operators to your channel:

  1. Each person that you’d like to op must be registered with nickserv.
  2. If you haven’t already, register your channel with chanserv
    /msg chanserv register ##bobs-awesome-channel
  3. Set op flags for each user. The little o gives them the ability to self op. The big O will cause them to be auto-oped upon joining the channel. This can be useful to keep troublemakers from acting up (since they know someone is watching them). You can set only the ability to become an op:
    /msg chanserv flags ##bobs-awesome-channel bobdole +o
    (notice) Flags +o were set on bobdole in ##bobs-awesome-channel.
    Or you can set ops and auto-ops
    /msg chanserv flags ##bobs-awesome-channel bobdole +oO
    (notice) Flags +oO were set on bobdole in ##bobs-awesome-channel.
  4. You can now verify that the user flags are set properly
    /msg chanserv flags ##bobs-awesome-channel
    (notice) Entry Nickname/Host          Flags
    (notice) ----- ---------------------- -----
    (notice) 1     jennymurphy           +votsriRfAF [modified 2 weeks ago]
    (notice) 1     bobdole               +oO [modified 7 seconds ago]
    (notice) ----- ---------------------- -----
    (notice) End of ##bobs-awesome-channel FLAGS listing.
    

And you’re all done!

If you’ve only set the little o flag, your users must tell chanserv to temporarily turn them into operators when they need it.

/msg chanserv op ##bobs-awesome-channel

That’s all I have for now. Happy IRCing! :)

The Google+ Platform 30 Second Experience

It seems like life becomes busier and busier every year. Between longer hours at work and increased obligations elsewhere, who has time to try out a new API? It’s 2012. We only have 3 years to perfect the flying DeLorean!

You say you don’t even have 5 minutes to play with one of the platform starter projects? Well hopefully I can give you a taste of the API in the time you just spent reading this paragraph. You don’t even have to write any code, I promise. (Although I make no promises about inspiration to code that this may cause.)

Since we’ve already wasted 30 seconds babbling, let’s dive into the API already. The easiest way to see the Google+ platform in action is to use the API Explorer. This tool provides point and click access to most of the APIs that Google offers including the REST APIs for Google+.

Since this may be your first time, we’ll keep it simple. Follow these steps to view your public Google+ profile.

  1. Navigate to the API Explorer. To make an API call we must first select the plus service. On the left pane scroll down to and select the plus API. The middle columns will update to display the available versions and methods. api_explorer_1.png
  2. Scanning through the available methods the profile.get method looks like a match, but it requires a userId, which we do not know. We can use the shortcut value of me, but we’ll need to authorize the API explorer to discover our userId. To do this make sure plus.me is selected from the drop down at the top of the window and click on the ‘Switch to Private Access’ link. This will trigger an OAuth popup. Grant the API Explorer permission. api_explorer_2.png
  3. Now that the API Explorer can determine our userId, all we need to do is specify me for the userId and to execute the query. api_explorer_3.png
  4. Upon execution the bottom of the API explorer, the history pane, will display the results of our request. Assuming it was successful we’ll see the HTTP headers from request and response as well as a JSON representation of our public Google+ profile. api_explorer_4.png

Congratulations! If you read fast enough 1 or fewer minutes have incremented on your clock and you’re already using the Google+ APIs. During these four steps we’ve witnessed many important features of the core REST APIs that make up the Google+ platform. We’ve completed the OAuth 2.0 dance to access private information, your userId via the plus.me scope, and observed a fetch of your public profile.

Now that you’ve had a taste of the JSON, you know you want to go grab a starter project, right? :D