a list of slides from nodeconf
you may want to take a look at the jsconf-gist too!
| # =================================================================================================================== | |
| # Template for generating a no-frills Rails application with support for ElasticSearch full-text search via Tire | |
| # =================================================================================================================== | |
| # | |
| # This file creates a basic, fully working Rails application with support for ElasticSearch full-text search | |
| # via the Tire gem [http://github.com/karmi/tire]. | |
| # | |
| # You DON'T NEED ELASTICSEARCH INSTALLED, it is installed and launched automatically by this script. | |
| # | |
| # Requirements |
| var express = require('express'); | |
| var sys = require('sys'); | |
| var oauth = require('oauth'); | |
| var app = express.createServer(); | |
| var _twitterConsumerKey = "YOURTWITTERCONSUMERKEY"; | |
| var _twitterConsumerSecret = "YOURTWITTERCONSUMERSECRET"; | |
| function consumer() { |
a list of slides from nodeconf
you may want to take a look at the jsconf-gist too!
| require.extensions[".json"] = function (module, filename) { | |
| module.exports = JSON.parse(require("fs").readFileSync(filename, "utf8")) | |
| } |
| /** | |
| * by Dmitry Soshnikov <[email protected]> | |
| */ | |
| // infinite objects generator | |
| let g = new function () { | |
| while (true) { | |
| yield; | |
| } | |
| }; |
| // | |
| // by Dmitry Soshnikov <[email protected]> | |
| // MIT Style License | |
| // see also: http://wiki.ecmascript.org/doku.php?id=strawman:iterators | |
| // | |
| // --------------------------------------- | |
| // 1. Iteration via for-in loop | |
| // --------------------------------------- |
| # Index | |
| http://www.call4paperz.com/events.json | |
| # Show do evento | |
| http://www.call4paperz.com/events/1.json | |
| # Show da proposta | |
| http://www.call4paperz.com/events/1/proposals/1.json | |
| # Evento com JSONP (preste atenção no p no formato) |
| # Author: Pieter Noordhuis | |
| # Description: Simple demo to showcase Redis PubSub with EventMachine | |
| # | |
| # Requirements: | |
| # - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby | |
| # - a browser with WebSocket support | |
| # | |
| # Usage: | |
| # ruby redis_pubsub_demo.rb | |
| # |
| #Steps | |
| pkgin install couchdb | |
| svccfg import /opt/local/share/smf/manifest/couchdb.xml | |
| svcadm enable couchdb | |
| #Test | |
| curl http://127.0.0.1:5984/ | |
| {"couchdb":"Welcome","version":"1.0.1"} |
| var fs = require('fs'), | |
| step = require('step'), | |
| jsdom = require('jsdom'), | |
| window = jsdom.createWindow(), | |
| Script = process.binding('evals').Script; | |
| window.document = {}; | |
| window.Ext = {data:{Record:{}}}; | |
| var fileNames = [ |