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
| # Config for Nginx to act as a front-end for Riak | |
| # The main goal is to proxy all GETs directly to Riak, and disallow anything else (POST, PUT, etc) | |
| # Also, disallow use of the map/reduce query links (i.e. /riak/bucket/key/_,_,_) | |
| # Config is in /etc/nginx/sites-available/default or somewhere like that | |
| # Set up load-balancing to send requests to all nodes in the Riak cluster | |
| # Replace these IPs/ports with the locations of your Riak nodes | |
| upstream riak_hosts { | |
| server 127.0.0.1:8098; |
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
| require.paths.unshift('lib'); | |
| require('express'); | |
| require('express/plugins'); | |
| redisclient = require('redis-node-client/lib/redis-client'); | |
| redis = redisclient.createClient(); | |
| sys = require('sys'); | |
| configure(function () { | |
| use(Logger); |
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
| <!-- This is a Node+WebSocket powered demo to sync videos | |
| across different browsers. This file is the client, | |
| the other one is the Node server. Powered by Node and | |
| http://github.com/miksago/node-websocket-server --> | |
| <style> | |
| .inactive { display: none; } | |
| .active { display: block; } | |
| </style> | |
| <script> |
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
| require 'rubygems' | |
| require 'json' | |
| require 'rest_client' | |
| def create_person(name) | |
| JSON.parse RestClient.post( "http://localhost:8988/neo4jr-social/nodes", :name => name ) | |
| end | |
| def make_mutual_friends(node1, node2) | |
| RestClient.post "http://localhost:8988/neo4jr-social/nodes/#{node1['node_id']}/relationships", :to => node2['node_id'], :type => 'friends' |
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
| # The router | |
| router: require 'node-router' | |
| server: router.getServer() | |
| asset: require 'node-asset' | |
| # Javascript package | |
| scripts: new asset.Package 'assets/js/all.js', [ | |
| 'assets/coffee' | |
| ], { | |
| watch: true |
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
| // picard_sample/app.js | |
| require('./config/env') | |
| get('/', function(){ | |
| return { text: '<h1>Hello to TestApp!</h1>' } | |
| }) |
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
| #!/usr/bin/env ruby | |
| require 'erb'; | |
| File.open(ARGV[0], "w") do |f| | |
| f.write ERB.new(File.read(ARGV[1] || 'nginx-io.conf.erb')).result(binding) | |
| end | |
| # vim:filetype=ruby |
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
| #!/usr/bin/env ruby | |
| require 'rubygems' | |
| require 'fsevents' | |
| require 'json' | |
| ignores = JSON.parse(File.read(".couchappignore")).map { |s| Regexp.new(s) } | |
| ignores.push /(^.git|.DS_Store|\.swp$|\.couchappignore)/ | |
| appdir = File.expand_path(File.dirname(__FILE__)) |
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 couchapp = require('../lib/couchapp.js'); | |
| ddoc = {"views":{}} | |
| exports.app = ddoc; | |
| ddoc.views.simple = { | |
| map: function (doc) {emit(doc._id, null)} | |
| } | |
| ddoc.views.simpleReduce = { | |
| map: function (doc) {emit(doc._id, 1)}, |
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
| upstream bavomatic_cluster { | |
| server unix:/tmp/thin.bavomatic.0.sock; | |
| } | |
| server { | |
| include /usr/pkg/etc/nginx/compress; | |
| listen 80; | |
| server_name *.bavomatic.net bavomatic.net; |