This file contains 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
class Kalifornium < Padrino::Application | |
register Loader | |
end |
This file contains 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
class Kalifornium < Padrino::Application | |
def load_something | |
@a = 1; @b = 2 | |
end | |
end | |
This file contains 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
# app/models/bar.rb | |
class Bar | |
include DataMapper::Resource | |
# property <name>, <type> | |
property :id, Serial | |
property :name, String | |
# has many to many | |
has n, :foos, :through => Resource | |
end |
This file contains 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
class Component | |
include DataMapper::Resource | |
property :id, Serial | |
property :nome, String | |
property :descrizione, Text | |
property :prezzo_base, Float | |
property :base, Boolean |
This file contains 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
DataMapper.auto_migrate! | |
(1..5).each do |n| | |
PlantType.create(:nome => "nome_#{n}") | |
ComponentType.create(:nome => "nome_#{n}") | |
Supplier.create(:nome => "nome_#{n}") | |
Component.create(:nome => "nome_#{n}", :supplier => Supplier.first, :component_type => ComponentType.first) | |
end | |
params = {:supplier=> Supplier.get(1), :component_type => ComponentType.get(1), :nome => "ciao", :plant_types => PlantType.all(:id => "3,4".split(","))} | |
component = Component.first |
This file contains 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
DataMapper::Visualizer::Project library | |
- should add the include directories to the $LOAD_PATH | |
- should remove the include directories to the $LOAD_PATH | |
- should require the specified paths | |
DataMapper::Visualizer::Project rails | |
- should add the include directories to the $LOAD_PATH | |
- should remove the include directories to the $LOAD_PATH | |
- should require all paths that match the specified glob patterns |
This file contains 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
waydotnet-laptop:~/.rvm/src/rvm (master) $ ruby -v | |
ruby 1.8.7 (2010-08-16 patchlevel 302) [x86_64-linux] | |
waydotnet-laptop:~/.rvm/src/rvm (master) $ gem list | |
*** LOCAL GEMS *** | |
bundler (1.0.2) | |
rake (0.8.7) | |
waydotnet-laptop:~/.rvm/src/rvm (master) $ bundle install | |
Could not locate Gemfile |
This file contains 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
DataMapper::Visualizer::Visualization full names | |
- should not demodulize the names of Classes | |
- should not demodulize the names of Objects (FAILED - 1) | |
- should not demodulize property type names | |
- should not demodulize model names | |
1) | |
'DataMapper::Visualizer::Visualization full names should not demodulize the names of Objects' FAILED | |
expected: "DataMapper::Property", | |
got: "DataMapper::Property::Text" (using ==) |
This file contains 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
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<style>img{ height: 100px; float: left; }</style> | |
<script src="http://code.jquery.com/jquery-latest.min.js"></script> | |
</head> | |
<body> | |
<div id="images"> | |
</div> | |
<script> |
This file contains 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
;; Align command !!! | |
;; from http://stackoverflow.com/questions/3633120/emacs-hotkey-to-align-equal-signs | |
;; another information: https://gist.github.com/700416 | |
;; use rx function http://www.emacswiki.org/emacs/rx | |
(defun align-to-colon (begin end) | |
"Align region to colon (:) signs" | |
(interactive "r") |
OlderNewer