- Get a GitHub account: https://github.com/
- Github > Dashboard > New Repository ... https://github.com/repositories/new
- Enter a Project Name and Description; click "Create Repository"
- On the project page ignore the suggested setup instructions... instead click on the "Admin" button
- Check the "GitHub Pages" checkbox... You'll get a popup.
- Click the "Automatic GitHub page Generator" button.
- Choose a funky colour... or go safe with just white... then click "Create Page" button
| ### | |
| Module dependencies | |
| ### | |
| require.paths.unshift "#{__dirname}/lib/support/express-csrf/" | |
| require.paths.unshift "#{__dirname}/lib/support/node_hash/lib/" | |
| express = require 'express' | |
| app = module.exports = express.createServer() | |
| RedisStore = require 'connect-redis' |
| # load libraries | |
| require 'coffee-script' | |
| mongoose = require 'mongoose' | |
| express = require 'express' | |
| step = require "step" | |
| # about oauth | |
| OAuth = require('oauth').OAuth | |
| oauth = new OAuth( | |
| 'https://api.twitter.com/oauth/request_token', |
| # load libraries | |
| require 'coffee-script' | |
| mongoose = require 'mongoose' | |
| express = require 'express' | |
| step = require "step" | |
| # about oauth | |
| OAuth = require('oauth').OAuth | |
| oauth = new OAuth( | |
| 'https://api.twitter.com/oauth/request_token', |
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
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
| # app/assets/javascripts/application.js | |
| //= require_tree . | |
| # app/assets/javascripts/application.js.coffee | |
| @application = | |
| awesomeFunction: (params) -> | |
| console.log(params) | |
| # app/assets/javascripts/home.js.coffee | |
| $ -> |
| // http://stackoverflow.com/questions/3503660/upgrading-with-parameter-on-a-link-to-remote-in-rails-3 | |
| // http://railsforum.com/viewtopic.php?id=42215 | |
| // http://stackoverflow.com/questions/2508213/rails3-link-to-with-attribute | |
| $$('a[data-remote=true]').each(function(a){ | |
| a.onclick = function(){ | |
| href = a.getAttribute('href'); | |
| url = href.split('?')[0]; | |
| params = href.split('?')[1]; | |
| newParam = encodeURI(eval(a.getAttribute('data-with'))); |
| require 'rubygems' | |
| require 'sinatra' | |
| require 'redis' | |
| # To use, simply start your Redis server and boot this | |
| # example app with: | |
| # ruby example_note_keeping_app.rb | |
| # | |
| # Point your browser to http://localhost:4567 and enjoy! | |
| # |
-
The -j option of the application generator accepts an arbitrary string. If passed "foo", the gem "foo-rails" is added to the Gemfile, and the application JavaScript manifest requires "foo" and "foo_ujs". As of this writing "prototype-rails" and "jquery-rails" exist and provide those files via the asset pipeline. Default is "jquery". [fxn]
-
jQuery is no longer vendored, it is provided from now on by the jquery-rails gem. [fxn]
-
Prototype and Scriptaculous are no longer vendored, they are provided from now on by the prototype-rails gem. [fxn]
-
The scaffold controller will now produce SCSS file if Sass is available [Prem Sichanugrist]