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
| objfile.each_line do |line| | |
| if line =~ /^define/ | |
| def_start, obj_type, open_brace = line.split | |
| next | |
| end | |
| unless line =~ /\}/ | |
| obj_param, obj_val =- line.split(nil,2) | |
| # Do something | |
| end | |
| 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
| 4: | |
| - name: us-holidays | |
| - timeperiod_name: us-holidays | |
| - alias: U.S. Holidays | |
| - january: 1 00:00-00:00 | |
| - monday: -1 may 00:00-00:00 | |
| - july: 4 00:00-00:00 | |
| - monday: 1 september 00:00-00:00 | |
| - thursday: -1 november 00:00-00:00 | |
| - december: 25 00:00-00:00 |
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
| define host { | |
| use linux-server | |
| host_name oio | |
| alias oio | |
| address oio.mydomain.int | |
| hostgroups webs | |
| } |
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
| class String | |
| def rsplit(delim,count) | |
| self.reverse.split(delim, count).map(&:reverse).reverse | |
| end | |
| 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
| No compatible versions could be found for required dependencies: | |
| Conflict on: "i18n": | |
| * i18n (0.4.1) activated by padrino (= 0.9.10, runtime) | |
| * i18n (~> 0.3.6, runtime) required by activesupport (>= 3.0.0beta3, runtime) | |
| All possible versions of origin requirements conflict. Conflict on: "activesupport": | |
| * activesupport (3.0.pre) activated by activesupport (>= 3.0.0beta3, runtime) | |
| * activesupport (= 3.0.0.beta3, runtime) required by ripple (= 0.7.1, runtime) | |
| All possible versions of origin requirements conflict. |
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
| jvincent@jvx64:~/Dropbox/test/padtest$ padrino-gen model Client name:string phone:string email:string | |
| => Located unlocked Gemfile for development | |
| apply orms/ripple | |
| create app/models/client.rb | |
| jvincent@jvx64:~/Dropbox/test/padtest$ padrino console | |
| => Loading development console (Padrino v.0.9.13) | |
| => Located unlocked Gemfile for development | |
| => Loading Application Padtest | |
| Couldn't load Wirble: no such file to load -- interactive_editor | |
| ree-1.8.7-2010.02 > myclient = Client.new |
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
| <h1>Examples</h1> | |
| <% @examples.each do |example| %> | |
| <p><%= example.language.name %> | |
| <p><%= example.api.name %> | |
| <p><%= example.code %> | |
| <p><%= example.created_at %> | |
| <% 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
| class Tester | |
| include DataMapper::Resource | |
| property :id, Serial | |
| property :name, String, :required => true, :length => 75 | |
| property :email, String, :required => true, :length => 75, :unique_index => true | |
| property :comments, Text | |
| property :created_at, DateTime | |
| has n, :skills |
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
| CREATE TABLE `testers` ( | |
| `id` int(10) unsigned NOT NULL AUTO_INCREMENT, | |
| `name` varchar(75) NOT NULL, | |
| `email` varchar(75) NOT NULL, | |
| `comments` text, | |
| `created_at` datetime DEFAULT NULL, | |
| PRIMARY KEY (`id`), | |
| UNIQUE KEY `unique_testers_email` (`email`) | |
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8 |
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 'dm-core' | |
| require 'dm-migrations' | |
| require 'dm-timestamps' | |
| DataMapper::Logger.new($stdout, :debug) | |
| DataMapper.setup(:default, "mysql://root@localhost/db_development") | |
| class Tester | |
| include DataMapper::Resource |
OlderNewer