gem install rails
rails new my_app -T
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
| ######################################### | |
| # Very basic rack application showing how to use a router based on the uri | |
| # and how to process requests based on the HTTP method used. | |
| # | |
| # Usage: | |
| # $ rackup rack_example.ru | |
| # | |
| # $ curl -X POST -d 'title=retire&body=I should retire in a nice island' localhost:9292/ideas | |
| # $ curl -X POST -d 'title=ask Satish for a gift&body=Find a way to get Satish to send me a gift' localhost:9292/ideas | |
| # $ curl localhost:9292/ideas |
| def complete_facebook_connect | |
| within_window "Log In | Facebook" do | |
| fill_in 'Email:', with: fb_user.email | |
| fill_in 'Password:', with: fb_user.password | |
| click_button "Log In" | |
| # syncronization makes this never return, maybe because | |
| # it's running in a different window? | |
| without_resyncronize { click_button "Allow" } | |
| end | |
| end |
| vows = require 'vows' | |
| assert = require 'assert' | |
| cb = (callback) -> | |
| setTimeout -> | |
| callback(null, 'callback') | |
| , 2000 | |
| andWaitForCallback = undefined |
| def revoke(user) | |
| proxy_association.owner.tap do |project| | |
| # You can't remove the last user with access (someone has to have access to the project!) | |
| if project.users.many? | |
| if user.pending? && user.projects.one? | |
| user.destroy | |
| else | |
| project.users.delete(user) | |
| user.touch | |
| end |
(a gist based on the old toolmantim article on setting up remote repos)
To collaborate in a distributed development process you’ll need to push code to remotely accessible repositories.
This is somewhat of a follow-up to the previous article setting up a new rails app with git.
Set up the new bare repo on the server:
(a gist based on the old toolmantim article on setting up remote repos)
To collaborate in a distributed development process you’ll need to push code to remotely accessible repositories.
This is somewhat of a follow-up to the previous article setting up a new rails app with git.
Set up the new bare repo on the server:
| var | |
| PARALLEL_CONNECTS = 10, | |
| http = require('http'), | |
| sys = require('sys'), | |
| connectionCount = 0, | |
| messageCount = 0; | |
| lastMessages = 0; | |
| function addClient() { |
| class SomeClass | |
| class << self | |
| def hooks | |
| @hooks ||= Hash.new([]) | |
| end | |
| def add_hook(kind, &block) | |
| self.hooks[kind] << block | |
| end |