Skip to content

Instantly share code, notes, and snippets.

View challengee's full-sized avatar

Mattias Putman challengee

View GitHub Profile
sdfsdf
@challengee
challengee / file1.txt
Created August 20, 2012 21:46
the description for this gist
String file contents
@challengee
challengee / file1.txt
Created August 20, 2012 21:49
the description for this gist
String file contents
@challengee
challengee / file1.txt
Created August 20, 2012 21:50
the description for this gist
String file contents
module Commute
class EnumRouter
include Enumerable
# Initialize the router with a main route.
#
# main - Enumerable
def initialize main
@path = []
require 'spec_helper'
require 'commute/core/context'
require 'commute/core/stack'
describe Commute::Stack do
let(:stack) { Commute::Stack.new }
# A Layer that forwards to the next.
let(:forward_layer) { proc { |router, request, options = {}|
.et_color_scheme_red a.learn-more:hover,.et_color_scheme_red .blog-post a.learn-more:hover,.et_color_scheme_red .comment-reply-link:hover,.et_color_scheme_red #home-section-news a.more-info:hover,.et_color_scheme_red #home-section-projects a.more-info:hover,.et_color_scheme_red #home-section-pricing a.more-info:hover {
background: #711d39;
/* Old browsers */
background: -moz-linear-gradient(top, #711d39 1%, #5d182f 100%);
/* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(1%,#711d39), color-stop(100%,#5d182f));
/* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #711d39 1%,#5d182f 100%);
/* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #711d39 1%,#5d182f 100%);

Step 1

Create a contact and add an "Instant Messaging" field. Set the protocol to a custom protocol by typing in it (for example: "None").

If you get this contact via the API, you get something like this:

GET /m8/feeds/contacts/default/full/3f9ffe1d8c52ef93?prettyprint=true HTTP/1.1
Host: www.google.com
Gdata-version: 3.0
class Ranking1
attr :origin_object
def initialize(origin_object)
@origin_object = origin_object
end
def top(objects, n)
ranking(objects).take(n)
end