Some exercises from the Falsy Values workshops.
The good parts:
- HTTP server and client in same script
- Express cookies example
- Express routing example
- Express error handling
- Express middlewares example
- Simple HTTP proxy
[~/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) |
Some exercises from the Falsy Values workshops.
The good parts:
$(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 |
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) |
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 | |
}); |
<!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() {} | |
}; |