from django import template
import datetime
This file contains 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
# encoding: utf-8 | |
from httplib import HTTPConnection | |
from base64 import b64encode | |
from xml.etree import ElementTree | |
from django.conf import settings | |
class GateBackend: | |
"""Aspiro Gate Backend.""" |
This file contains 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
// This document distills the magic that happens when you create a file with the ".jst" | |
// and ".ejs" extensions anywhere on your asset path in Ruby on Rails, courtesy of the | |
// Sprockets library (https://github.com/sstephenson/sprockets). | |
// | |
// For the purpose of this example, imagine that you have created a template for | |
// messages in `app/assets/javascripts/backbone/templates/messages/message.jst.ejs` | |
// with the following contents: | |
// | |
// <h1><%= user.full_name %></h1> | |
// <p><%= body %></p> |
This file contains 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
# Load all rooms. | |
# | |
# Returns an array of hashes describing each room. | |
def all | |
devices = Device.all | |
rooms = [] | |
# Go through each device, check wich room it belongs | |
# do, if the room does not exist, add it to rooms, if | |
# just add this device to the list of devices |
This file contains 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
I'm testing gist-vim. It's pretty awesome. I think. Yes. |
This file contains 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
foo(); // Logs "foo". | |
function foo() { console.log("foo") } | |
foo(); // Raises "ReferenceError: foo is not defined". | |
foo = function() { console.log("foo") } | |
foo(); // Raises "TypeError: undefined is not a function". | |
var foo = function() { console.log("foo") } |
This file contains 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
Stockpile.on :tweet do |tweet| | |
Tweet.new message: tweet.message | |
end |
# heroku-apps-with-gem.sh
apps=$(heroku apps | grep -E -v '(^===|^$)' | awk '{print $1}')
set -k
for app in $apps; do
heroku run "cat Gemfile.lock | grep $1" -a $app --exit-code > /dev/null 2>&1
if (( $? == 0)); then
We are always looking for more developers to join our web, iOS and Android teams. If you’re passionate about building things, we’d really like to talk to you!
We’re a team of twenty keen-witted engineers who do all kinds of things on all kinds of platforms. Right now our favourites are Ruby, JavaScript, Swift and Java, but we’re always excited to try new tools. Really we’re pretty excited about mostly anything that
OlderNewer