Skip to content

Instantly share code, notes, and snippets.

View rafamvc's full-sized avatar

Rafael Floresta rafamvc

  • Philadelphia, PA
View GitHub Profile
#
# Cookbook Name:: tomcat6
# Recipe:: default
#
# Copyright 2009, Edmund Haselwanter
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
This is my mount:
mount nfs_server['directory_path'] do
device "/dev/sdi"
fstype "ext4"
not_if "mountpoint #{nfs_server['directory_path']}"
action [ :enable, :mount]
end
rcardo-mac:mms-service rafamvc$ rdebug ./script/server
[-3, 6] in /Users/rafamvc/workspace/mms-service/script/server
1 #!/usr/bin/env ruby
=> 2 require File.dirname(__FILE__) + '/../config/boot'
3 require 'commands/server'
/Users/rafamvc/workspace/mms-service/script/server:2
require File.dirname(__FILE__) + '/../config/boot'
(rdb:1)
/Users/rafamvc/Developer/.rvm/gems/ruby-1.8.7-p248/gems/rspec-1.3.0/lib/spec/example/example_group_factory.rb:28:in `create_example_group': ArgumentError (ArgumentError)
from /Users/rafamvc/Developer/.rvm/gems/ruby-1.8.7-p248/gems/rspec-1.3.0/lib/spec/dsl/main.rb:28:in `context'
from /Users/rafamvc/workspace/mms-service/test/factories.rb:15
from /Users/rafamvc/Developer/.rvm/gems/ruby-1.8.7-p248/gems/factory_girl-1.2.3/lib/factory_girl/factory.rb:50:in `define'
from /Users/rafamvc/workspace/mms-service/test/factories.rb:12
from /Users/rafamvc/Developer/.rvm/gems/ruby-1.8.7-p248/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:158:in `require'
from /Users/rafamvc/Developer/.rvm/gems/ruby-1.8.7-p248/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:158:in `require'
from /Users/rafamvc/Developer/.rvm/gems/ruby-1.8.7-p248/gems/factory_girl-1.2.3/lib/factory_girl/factory.rb:296:in `find_definitions'
from /Users/rafamvc/Developer/.
define(function(require, exports, module) {
^
ReferenceError: define is not defined
at Object.<anonymous> (/Users/rafamvc/workspace2/cloud9/support/lib-v8debug/lib/v8debug/NodeSocket.js:9:1)
at Module._compile (node.js:461:23)
at Module._loadScriptSync (node.js:468:10)
at Module.loadSync (node.js:338:12)
at loadModule (node.js:283:14)
at require (node.js:411:14)
at Object.<anonymous> (/Users/rafamvc/workspace2/cloud9/server/ext/debugger/nodedebugproxy.js:7:18)
rcardo-mac:~ rafamvc$ rails new mp3store
rails gener create
create README
create Rakefile
create config.ru
a create .gitignore
create Gemfile
create app
create app/controllers/application_controller.rb
create app/helpers/application_helper.rb
@rafamvc
rafamvc / test_obj.rb
Created April 8, 2011 20:43
Example of a mexican class
class TestObj
# All requests coming for #long_background_processing_method will be handled in the background
handle_async :method1
# This needs access to be a class method
schedule :method2, :every => :day, :at => '12:55am'
# The multiple will not allow two #method3 to run at the same time
@rafamvc
rafamvc / handle_async_example.rb
Created April 13, 2011 00:47
handle_async exampole
# using handle_async
class TestObj
# All requests coming for #long_background_processing_method will be handled in the background
schedule :every => 30.minutes do
# Code here
end
def method1
# -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = %q{jsonify}
s.version = "0.1.2"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Bill Siggelkow"]
s.date = %q{2011-08-09}
s.description = %q{Turn Ruby objects into JSON -- correctly!}
@rafamvc
rafamvc / <controller_name>.js
Created February 16, 2012 16:02
How I render my page specific JS
// On the page specific file:
// "<controller_name>.js", and you import it after the init.js on your application.js
// Replace the <controller_name> with the actual name
RELASPHERE.<controller_name> = {
init: function() {
// Your shared code for the whole controller goes here
},
index: function() {
// Your code for the index page goes here