Skip to content

Instantly share code, notes, and snippets.

View atmos's full-sized avatar
🌴
On vacation

Corey Donohoe atmos

🌴
On vacation
View GitHub Profile
desc 'Clone a copy of all the required Merb repositories'
task 'merb:clone' do
if File.exists?("merb") then
puts("./merb already exists!")
exit
end
require("fileutils")
mkdir("merb")
cd("merb")
required_libraries.each do |r|
class Note
include ::DataMapper::Resource
property :id, Integer, :serial => true
property :content, String, :length => 2048
property :type, Discriminator
validates_length :content, :minimum => 4, :maximum => 2048
before :save do
Personalities : [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [multipath]
md3 : active raid1 sdd[1] sdc[0]
488386496 blocks [2/2] [UU]
md2 : active raid1 sdb[1] sda[0]
488386496 blocks [2/2] [UU]
md0 : active raid1 etherd/e0.0p1[0] etherd/e1.0p1[1]
19542976 blocks [2/2] [UU]
>> puts $:
/Users/atmos/Source/sensei/lib
/opt/local/lib/ruby/gems/1.8/gems/facets-2.4.1/bin
/opt/local/lib/ruby/gems/1.8/gems/facets-2.4.1/lib
/opt/local/lib/ruby/gems/1.8/gems/english-0.2.0/bin
/opt/local/lib/ruby/gems/1.8/gems/english-0.2.0/lib
/opt/local/lib/ruby/gems/1.8/gems/extlib-0.9.7/bin
/opt/local/lib/ruby/gems/1.8/gems/extlib-0.9.7/lib
/opt/local/lib/ruby/gems/1.8/gems/abstract-1.0.0/bin
/opt/local/lib/ruby/gems/1.8/gems/abstract-1.0.0/lib
# public/javascripts/application.js
function unimplemented() {
alert("NOTICE\\n\\nThis feature is not implemented yet. Please check back again soon!");
}
# app/helpers/application_helper.rb
def link_to_unimplemented( link_text, *args )
link_to_function( link_text, 'unimplemented()', *args)
end
// public/javascripts/application.js
$(function() {
$("a.unimplemented").livequery("click", function() {
alert("NOTICE\\n\\nThis feature is not implemented yet. Please check back again soon!");
return false;
});
});
html{:xmlns => "http://www.w3.org/1999/xhtml"}
%head
%meta{"http-equiv" => "Content-Type", :content => "text/html; charset=utf-8" }
%meta{"http-equiv" => "Content-Language", :content => "en" }
%meta{:name => 'author', :content => "atmos" }
%title
= catch_content(:page_title) || 'Word up!'
= js_include_tag 'jquery-1.2.6', :application
# multi environment merb deployment with vlad and god
set :application, "ninja"
set :deploy_to, "/data/ninja"
set :code_repo, 'git@github.com:atmos/ninja.git'
set :revision, "origin/master"
set :user, "ey"
set :use_sudo, false
task :production do
role :app, 'eyYY-s00020'
mpro% rake staging deploy --trace
(in /Users/atmos/Source/awesome)
** Invoke staging (first_time)
** Execute staging
** Invoke deploy (first_time)
** Invoke define_roles (first_time)
** Execute define_roles
** Invoke vlad:stop (first_time)
** Execute vlad:stop
** Invoke vlad:stop_app (first_time)