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
Internal Server Error: /mirrors/schemas | |
Traceback (most recent call last): | |
File "/home/mojo/code/mirrors_server/ENV/src/django/django/core/handlers/base.py", line 113, in get_response | |
response = wrapped_callback(request, *callback_args, **callback_kwargs) | |
File "/home/mojo/code/mirrors/mirrors/views.py", line 92, in component_schemas | |
schemas[key] = schema() | |
TypeError: 'str' object is not callable |
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
In [8]: dir(app.module) | |
Out[8]: | |
['__builtins__', | |
'__cached__', | |
'__doc__', | |
'__file__', | |
'__initializing__', | |
'__loader__', | |
'__name__', | |
'__package__', |
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 express = require('express'); | |
var app = express(); | |
var fs = require('fs'); | |
var respond = function (req, res) { | |
res.status(200).sendfile(__dirname + 'build/index.html'); | |
} | |
app.use('/css', express.static(__dirname + 'build/css/')); | |
app.use('/js', express.static(__dirname + 'build/js/')); |
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 stringSchema = function() { | |
return _.clone({ 'some': 'associative array'}) | |
} |
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
select * from content_type_article as article | |
left join node ON article.nid = node.nid and article.nid = node.nid | |
left join content_field_dek as dek ON node.nid = dek.nid and node.vid = dek.vid | |
left join content_field_article_text as body ON node.nid = body.nid and node.vid = body.vid | |
left join content_field_alternate_dek as alt_dek ON node.nid = alt_dek.nid and node.vid = alt_dek.vid | |
left join content_field_alternate_title as alt_title ON node.nid = alt_title.nid and node.vid = alt_title.vid | |
left join content_field_social_dek as social_dek ON node.nid = social_dek.nid and node.vid = social_dek.vid |
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 pergatory = function(success, error) { | |
if (error == undefined) { | |
return null; | |
} else { | |
return error({ | |
'code': 1, | |
'message': 'bad' | |
}); | |
} | |
}; |
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 _ = require('lodash'); | |
var b = { | |
'a': {'a': 1}, | |
'b': {'b': 1} | |
}; | |
var a = _.defaults({'a': { 'a': 2}}, b); | |
a.a.a = 10; | |
a.b.b = 10; | |
console.log(b); |
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 _ = require('lodash'); | |
var tv4 = require('tv4'); | |
var stringSchema = { | |
'type': 'string' | |
} ; | |
var componentSchema = { | |
'title': 'base component schema', | |
'type': 'object', | |
'required': ['metadata', 'slug', 'content_type', 'schema_name'], | |
'properties': { |
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 _ = require('lodash'); | |
var tv4 = require('tv4'); | |
var stringSchema = { | |
'type': 'string' | |
} ; | |
var componentSchema = { | |
'title': 'base component schema', | |
'type': 'object', | |
'required': ['metadata', 'slug', 'content_type', 'schema_name'], | |
'properties': { |
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
┌───=[ mike :: unassigned -( 0 )-[ ~ ] | |
└──(date | |
Tue Feb 4 21:23:03 PST 2014 | |
┌───=[ mike :: unassigned -( 0 )-[ ~ ] | |
└──(date | |
Tue Feb 4 21:27:43 PST 2014 | |
┌───=[ mike :: unassigned -( 0 )-[ ~ ] | |
└──(date |