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
import logging | |
from django.core.management import call_command | |
from lettuce import before, after | |
import yourprojec.test_settings | |
@before.all | |
def before_all(): |
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
from datetime import date, timedelta | |
FEASTS = ( | |
(1, 1), # New Years Day | |
(1, 6), # Epiphany | |
(5, 1), # Work Day | |
(5, 3), # Constiturion Day | |
(8, 15), # Army Day | |
(11, 1), # All Saints | |
(11, 11), # Independence Day |
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
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.rotateCannon(2); |
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
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.rotateCannon(-2); |
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
''' | |
Created on 19-03-2013 | |
@author: karol | |
''' | |
import requests | |
import json | |
class FakebookException(Exception): |
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
class PathBuilder(object): | |
""" | |
Super awsome url path builder: | |
>>> PathBuilder().access_tokens.fold() | |
>>> "/access-tokens" | |
>>> PathBuilder().access_tokens.list().fold() | |
>>> "/access-tokens/" | |
>>> PathBuilder().access_tokens(30).fold() | |
>>> "/access-tokens/30" |
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
package main | |
// #include <stdio.h> | |
// #include <stdlib.h> | |
// #include <clp.h> | |
// int add(int x, int y) { return x + y; } | |
// int printInt(int x) { return printf("%d\n", x); } | |
import "C" | |
import ( |
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
var current = null; | |
chrome.tabs.query({active: true}, function (tabs) { | |
current = tabs[0].id; | |
}) | |
chrome.tabs.onCreated.addListener(function(t) { | |
current = t.id; | |
console.log(current); | |
}); |
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
gtk-color-scheme = "selected_text_color:#000000" | |
style "compact" | |
{ | |
GtkButton::default_border={0,0,0,0} | |
GtkButton::default_outside_border={0,0,0,0} | |
GtkButtonBox::child_min_width=0 | |
GtkButtonBox::child_min_heigth=0 | |
GtkButtonBox::child_internal_pad_x=0 | |
GtkButtonBox::child_internal_pad_y=0 | |
GtkMenu::vertical-padding=1 |
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
'use strict'; | |
const pointsToFile = uri => /\/[^/]+\.[^/]+$/.test(uri); | |
exports.handler = (event, context, callback) => { | |
// Extract the request from the CloudFront event that is sent to Lambda@Edge | |
var request = event.Records[0].cf.request; | |
// Extract the URI from the request |