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
| # 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 | |
| # |
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
| # 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 | |
| # |
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
| gem 'cramp' | |
| gem 'erubis', '2.6.5' | |
| gem 'usher', "0.6.0" |
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 'lib/couchdb_adapter' | |
| COUCHDB_LOCATION = "couchdb://localhost:5984/test_cdb_adapter" | |
| DataMapper.setup( | |
| :couch, | |
| Addressable::URI.parse(COUCHDB_LOCATION) | |
| ) |
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
| waxClass{"PolygonShape", NSObject} | |
| function initWithNumberOfSides_minimumNumberOfSides_maximumNumberOfSides(self, sides, min, max) | |
| self.super:init() | |
| self._minimumNumberOfSides = min | |
| self._maximumNumberOfSides = max | |
| self._numberOfSides = sides | |
| return self | |
| end |
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
| waxClass{"PolygonShape", NSObject} | |
| function initWithNumberOfSides_minimumNumberOfSides_maximumNumberOfSides(self, sides, min, max) | |
| self.super:init() | |
| self:minimumNumberOfSides(min) | |
| self:maximumNumberOfSides(max) | |
| self:numberOfSides(sides) | |
| return self | |
| end |
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
| WAX_PATH = File.expand_path("wax") | |
| watch( 'data/scripts/tests/(.*)\.lua' ) {|md| system("#{WAX_PATH}/bin/hammer --headless WAX_TEST=YES") } | |
| watch( 'data/scripts/(.*)\.lua' ) {|md| system("#{WAX_PATH}/bin/hammer --headless WAX_TEST=YES") } |
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
| """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
| set langmenu=none "Set all the menu's to use English | |
| colorscheme delph "Use custom colour scheme | |
| if has("autocmd") | |
| filetype plugin indent on "Load filetype specific plugins and indent file | |
| endif | |
| set nomodeline "Exploitable, should be off | |
| set nocompatible "Turn off vi compatibility | |
| set ruler "Show cursor position | |
| set hidden "Don't force me to save before changing buffers |
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
| Handy vim commands and their break down | |
| Command: " qa0f'yi'_Pa = <Esc>_guiwjq3@a " (without external quotes or spaces) | |
| Breakdown: | |
| qa - start recording a macro named 'a' | |
| 0 - Move cursor to first column | |
| f' - Find first occurence of ' moving forwards | |
| yiw' - Yank the inner word ignoring the ' | |
| a = <Esc> - Append ' = ' and enter command mode |
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
| User.create(:name => 'Chloe', :email => '[email protected]', :password => 'secret', :password_confirmation => 'secret') | |
| User.create(:name => 'Sofia', :email => '[email protected]', :password => 'secret', :password_confirmation => 'secret') | |
| User.create(:name => 'Ana', :email => '[email protected]', :password => 'secret', :password_confirmation => 'secret') | |
| User.create(:name => 'Claudia', :email => '[email protected]', :password => 'secret', :password_confirmation => 'secret') |