View bsdgames-osx.rb
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
require 'formula' | |
class BsdgamesOsx < Formula | |
homepage 'https://github.com/ctdk/bsdgames-osx' | |
url 'https://github.com/ctdk/bsdgames-osx/archive/bsdgames-osx-2.19.3.tar.gz' | |
sha1 '31013cbc8fbad71f1e3e0b9b85fd7c943219a99b' | |
head 'https://github.com/ctdk/bsdgames-osx.git' | |
version '2.19.3' | |
depends_on :bsdmake => :build |
View index.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
'use strict'; | |
const Api = require('baucis/api/http2'); | |
const Collection = require('baucis/collection/mongo-db'); | |
const RestError = require('rest-error'); | |
// Define resources using JSON Schema. | |
const vegetables = Collection({ | |
properties: { | |
name: { type: 'string' }, |
View outgoing-rename.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
controller.request(function (request, response, next) { | |
request.baucis.outgoing(function (context, done) { | |
context.doc = context.doc.toObject(); | |
context.doc.foo = context.doc.bar; | |
delete context.doc.bar; | |
done(null, context); | |
}); | |
next(); | |
}); |
View outgoing-rename.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
controller.request(function (request, response, next) { | |
request.baucis.outgoing(function (context, done) { | |
context.doc = context.doc.toJSON(); | |
context.doc.foo = context.doc.bar; | |
delete context.doc.bar; | |
done(null, context); | |
}); | |
next(); | |
}); |
View gist:3cc6a23b2fa0e924a313
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
info: Welcome to Nodejitsu saarlisgame | |
info: jitsu v0.14.0, node v0.10.30 | |
info: It worked if it ends with Nodejitsu ok | |
info: Executing command deploy | |
info: Analyzing application dependencies in node index | |
info: Creating snapshot 0.13.5 | |
info: Uploading: [=============================] 100% | |
npm http GET https://registry.nodejitsu.com/baucis | |
npm http GET https://registry.nodejitsu.com/compression | |
npm http GET https://registry.nodejitsu.com/deco |
View gist:9613667
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
// controller.js | |
var controller = module.exports = express(); | |
controller.get('/some-route', function (request, response, next) { /* ... */ }) | |
/// In your app.js | |
var controller = require('./controllers/controller'); | |
var app = express(); |
View gist:7340733
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
info: Activating snapshot 0.1.0-266 for william | |
info: Starting app william | |
error: Error running command deploy | |
error: Errors occured while starting the application | |
error: Error output from application. This is usually a user error. | |
error: | |
error: /opt/run/snapshot/package/node_modules/config/lib/config.js:919 | |
error: if (JSON.stringify(configObject).length > 2) { | |
error: ^ | |
error: TypeError: Converting circular structure to JSON |
View mounted controller example.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 express = require('express'); | |
var baucis = require('baucis'); | |
var mongoose = require('mongoose'); | |
// ...set up Mongoose schema for author... (TODO) | |
var controller = baucis.rest({ singular: 'author', publish: false }); | |
var app = express(); | |
// This will result in controller being mounted with paths that match: |
View gist:4502529
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
info: Welcome to Nodejitsu william | |
info: jitsu v0.11.4, node v0.8.16 | |
info: It worked if it ends with Nodejitsu ok | |
info: Executing command deploy | |
info: Analyzing application dependencies in app.js | |
warn: Local package version appears to be old | |
warn: The package.json version will be incremented automatically | |
warn: About to write /Users/jagwio/code/paperless-exhibit/package.json | |
data: | |
data: { |
View blog.html
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
<div class="row-fluid"> | |
<section class="blog"> | |
{{#posts}} | |
<article> | |
<h3><a href="/blog/{{id}}">{{title}}</a></h3> | |
<div class="author"><a href="http://kun.io/" rel="author">William P. Riley-Land</a></div> | |
<time>{{date}}</time> | |
<div>{{{body}}}</div> | |
<div class="tags-wrapper"> |
NewerOlder