Skip to content

Instantly share code, notes, and snippets.

View gijs's full-sized avatar

Gijs Nijholt gijs

View GitHub Profile
[~/projects/documentation/lizardwindowsdocs]
$ bin/buildout
Develop: '/Users/gijs/projects/documentation/lizardwindowsdocs/.'
install_dir /Users/gijs/projects/documentation/lizardwindowsdocs/develop-eggs/tmpYMUvRfbuild
Updating test.
Updating omelette.
Installing console_scripts.
Getting distribution for 'coverage==3.4'.
install_dir /Users/gijs/projects/documentation/lizardwindowsdocs/eggs/tmpLt9VnW
no previously-included directories found matching 'test'
vagrant@vagrantup:/vagrant/djangoapps/lizard-waterbalance$ bin/django syncdb
Traceback (most recent call last):
File "bin/django", line 39, in <module>
djangorecipe.manage.main('lizard_waterbalance.testsettings')
File "/vagrant/djangoapps/lizard-waterbalance/eggs/djangorecipe-0.20-py2.6.egg/djangorecipe/manage.py", line 16, in main
management.execute_manager(mod)
File "/vagrant/djangoapps/lizard-waterbalance/parts/django/django/core/management/__init__.py", line 438, in execute_manager
utility.execute()
File "/vagrant/djangoapps/lizard-waterbalance/parts/django/django/core/management/__init__.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
@gijs
gijs / README.md
Created May 19, 2011 20:20 — forked from bergie/README.md
Falsy Values tutorials
@gijs
gijs / app.js
Created May 25, 2011 08:59
Backbone app code
$(function(){
var oldSync = Backbone.sync;
Backbone.sync = function(method, model, success, error){
var newSuccess = function(resp, status, xhr){
if(xhr.statusText === "CREATED"){
var location = xhr.getResponseHeader('Location');
return $.ajax({
url: location,
success: success
@gijs
gijs / nodemodels.py
Created May 29, 2011 09:54
Neo4j graph model with Django
from neo4j.model import django_model as models
class Movie(models.NodeModel):
title = models.Property(indexed=True)
year = models.Property()
href = property(lambda self: ('movie/%s/' % (self.node.id,)))
def __unicode__(self):
return self.title
Vagrant::Config.run do |config|
config.vm.customize do |vm|
vm.memory_size = 1048
vm.name = "Django projects (GIS enabled)"
vm.cpu_count = 2
end
config.vm.box = "lucid32"
config.vm.box_url = "http://files.vagrantup.com/lucid32.box"
config.vm.share_folder("v-root", "/vagrant", ".", :nfs => true)
@gijs
gijs / app.js
Created June 12, 2011 12:02
Backbone.js with Django/Tastypie.. Uncaught TypeError: Cannot call method 'toJSON' of undefined on line 103?
var oldSync = Backbone.sync;
Backbone.sync = function(method, model, success, error){
var newSuccess = function(resp, status, xhr){
if(xhr.statusText === "CREATED"){
var location = xhr.getResponseHeader('Location');
return $.ajax({
url: location,
success: success
});
@gijs
gijs / index.html
Created June 30, 2011 10:16
Javascript Combinations problem
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>Checkbox Combo Spike</title>
<style>
body{
font-family: 'Helvetica';
font-size: .8em;
}
root@jupiter:/tmp# rm -rf *
rm: invalid option -- '0'
Try `rm ./-0m-D7' to remove the file `-0m-D7'.
Try `rm --help' for more information.
var console = console || {
log:function() {},
warn: function() {},
dir: function() {},
error: function() {}
};