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
//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.ahead(100); |
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
var Robot = function(robot){ | |
robot.turnLeft(robot.angle % 90); | |
//robot.turnGunRight(90); | |
robot.clone(); | |
this.direction = 1; | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.ahead(1); | |
if (robot.parentId) { |
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 FixturesTest(TestCase): | |
def test_num_fixtures(self): | |
"""All fixtures on the project are tested""" | |
apps = [app.replace('.', '/') | |
for app in settings.INSTALLED_APPS if app.startswith('rh2')] | |
fixtures = [] | |
for app in apps: | |
fixture_dir = path.join(path.dirname(settings.PROJECT_ROOT), | |
app, |
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 TemplatesTest(TestCase): | |
def test_templates(self): | |
"""Templates can compile properly and there's no mismatched tags""" | |
# get app template dirs | |
template_dirs = [] | |
apps = [app for app in settings.INSTALLED_APPS | |
if app.startswith('rh2')] | |
for app in apps: | |
mod = import_module(app) |
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
#!/bin/sh | |
# | |
# This pre-commit hook tests that the documentation builds correctly. | |
# It can be disabled by using the "-n" option with "git commit". | |
# | |
# See http://git-scm.com/book/en/Customizing-Git-Git-Hooks for details. | |
# | |
# This pre-commit hook requires that you have the "###PROJECT###" project on your python | |
# path, in order for the DJANGO_SETTINGS_MODULE=###PROJECT###.settings to work. | |
# This is needed to build the apidoc. |
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
<script src="{% static "admin/js/jquery.js" %}"></script> | |
<script src="{% static "admin/js/jquery.init.js" %}"></script> | |
<script src="{% static "admin/js/urlify.js" %}"></script> | |
<script src="{% static "admin/js/prepopulate.js" %}"></script> | |
<script> | |
// adaptation from django/contrib/admin/templates/admin/prepopulated_fields_js.html | |
(function($) { | |
var field = { | |
id: '#{{ form.###DESTINATION FIELD NAME###.auto_id }}', | |
dependency_ids: ['#{{ form.###SOURCE FIELD NAME###.auto_id }}'], |
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
.PHONY: all help translate test clean update compass collect rebuild | |
SETTINGS={{ project_name }}.settings | |
TEST_SETTINGS={{ project_name }}.test_settings | |
# target: all - Default target. Does nothing. | |
all: | |
@echo "Hello $(LOGNAME), nothing to do by default" | |
@echo "Try 'make help'" |
NewerOlder