This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gdata | |
import json | |
import requests | |
# More examples: | |
# https://github.com/millioner/Python-contact-importer/blob/master/contact_importer/providers/google.py | |
# https://github.com/jtauber/django-friends/blob/master/friends/importer.py | |
# GData with access token | |
token = gdata.gauth.OAuth2Token( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setInterval(function(){ | |
// Hide "#Discover" from the topnav | |
$("#global-actions").find("[data-global-action='discover']").hide(); | |
// Inverse timeline column (tweets left, other things right) | |
$(".dashboard").css("float", "right"); | |
$(".content-main").css("float", "left"); | |
$(".module .chev-right").hide(); // Small arrows to right | |
// Removed wrapper background (could use detailed styling) | |
$(".wrapper").css("background", "none"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<activity> | |
<id type="integer">160540935</id> | |
<version type="integer">276</version> | |
<event_type>note_create</event_type> | |
<occurred_at type="datetime">2012/02/10 18:35:54 UTC</occurred_at> | |
<author>Jori Lallo</author> | |
<project_id type="integer">76939</project_id> | |
<description>Jori Lallo added comment: "Woot"</description> | |
<stories type="array"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Service::Grove < Service | |
string :channel_token | |
def receive_push | |
raise_config_error "Missing channel token" if data['channel_token'].to_s.empty? | |
token = data['channel_token'].to_s | |
res = http_post "https://grove.io/api/services/github/#{token}", | |
:payload => JSON.generate(payload) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib | |
from brokers import BaseBroker | |
from django.utils import simplejson as sj | |
class URLOpener(urllib.FancyURLopener): | |
version = 'bitbucket.org' | |
class Post(BaseBroker): | |
def handle(self, payload): | |
api_key = payload['service']['channel_token'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app grovebot | |
git_log * Jori Lallo: chjange | |
head e8ba042 | |
head_long e8ba0429637eeb89a3df5b822192207bb49a6371 | |
prev_head deb9f72 | |
url http://grovebot.herokuapp.com | |
user [email protected] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import simplejson | |
from django.http import HttpResponse | |
from django.conf import settings | |
class JSONResponse(HttpResponse): | |
def __init__(self, request, data): | |
indent = 2 if settings.DEBUG else None |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.conf.urls.defaults import * | |
from tastypie.paginator import Paginator | |
from tastypie.exceptions import BadRequest | |
from tastypie.resources import ModelResource | |
from tastypie.utils import trailing_slash | |
from haystack.query import SearchQuerySet, EmptySearchQuerySet | |
from clips.models import Clip |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.getElementById('groveNotificationEventDiv').addEventListener('groveNotificationEvent', function() { | |
var eventData = document.getElementById('groveNotificationEventDiv').innerText; | |
console.log(JSON.parse(eventData)); // Show data for notifications | |
// Do notification here | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
** GitHub'fy Grove.io with dot.js | |
** | |
** source: http://github.github.com/github-flavored-markdown/scripts/showdown.js | |
** dotjs: http://defunkt.io/dotjs/ | |
*/ | |
var repo = 'Organization/repo'; | |
setInterval(function(){ |