background preloader

RailsInstaller

RailsInstaller

String str % arg → new_str click to toggle source Format—Uses str as a format specification, and returns the result of applying it to arg. If the format specification contains more than one substitution, then arg must be an Array or Hash containing the values to be substituted. See Kernel::sprintf for details of the format string. static VALUE rb_str_format_m(VALUE str, VALUE arg) { volatile VALUE tmp = rb_check_array_type(arg); if (! str * integer → new_str click to toggle source Copy—Returns a new String containing integer copies of the receiver. "Ho! str + other_str → new_str click to toggle source Concatenation—Returns a new String containing other_str concatenated to str. "Hello from " + self.to_s str << integer → str click to toggle source str << obj → str Append—Concatenates the given object to str. a = "hello "a << "world" a.concat(33) str <=> other_str → -1, 0, +1 or nil click to toggle source <=> is the basis for the methods <, <=, >, >=, and between? str[fixnum, fixnum] → new_str or nil chomp!

Dive Into HTML5 ive Into HTML5 seeks to elaborate on a hand-picked Selection of features from the HTML5 specification and other fine Standards. The final manuscript has been published on paper by O’Reilly, under the Google Press imprint. Buy the printed Work — artfully titled “HTML5: Up & Running” — and be the first in your Community to receive it. Your kind and sincere Feedback is always welcome. The Work shall remain online under the CC-BY-3.0 License. The site is currently maintained by some html5homies. Table of Contents “If you’re good at something, never do it for free.” Copyright MMIX–MMXI Mark Pilgrim Ruby On Rails and PHP Cloud Hosting PaaS | Managed Rails Development | Engine Yard Platform as a Service

Rails setup for V6 (multiple) · blueimp/jQuery-File-Upload Wiki Prerequisites have jQuery setup in your appcopy jQuery File Upload files in the proper directories of your Rails app Models For use with the Carrierwave gem We'll use basic Carrierwave uploader: class AvatarUploader < CarrierWave::Uploader::Base storage :file def store_dir "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" endend Let's set up a Picture model For use with the Dragonfly gem set up a Picture model (make sure you have both avatar_uid and avatar_name columns in your database) Controller First one controller to handle the downloads: (html response is for browsers using iframe sollution) And it's routes: resources :pictures, :only => [:index, :create, :destroy] Let's play In whatever view file you want, copy paste this code and enjoy.

Getting started with Heroku Getting started with Heroku This guest post is by Ben Scofield, who is Heroku’s developer advocate, responsible for listening to the tens of thousands of developers deploying their Ruby applications to the cloud. He’s spoken at many conferences around the world, and in 2010 became the co-chair for RailsConf. Introduction Heroku has been in the news a lot lately, and it’s been a popular choice for Ruby application developers for a few years.If you haven’t worked with it before, here’s your chance — it’s designed to be as painless as possible to get going, and to give a powerful, stable, and scalable platform for your code. Setting up If this is your first time working with Heroku, you’ll need to start by setting up an account. Next, you’ll want to create an app (or find an existing one you want to push). $ rails new myapp $ cd myapp After you’ve chosen (or created) your app, you’ll need to make sure it’s tracked in git: $ git init $ git add . $ git commit -m "initial commit" $ heroku create rake

Kate or Die! | Comics. Queers. Cats. Learning Rails The Learning Rails Online Course is written and produced by Michael Slater and Christopher Haupt, who run BuildingWebApps.com and Webvanta, which provides a hosted CMS based on Ruby on Rails. Michael Slater Michael has been building web applications exclusively with Rails since the fall of 2006. He has led software development teams at Adobe and Fotiva and is a well-known speaker and author. During the years he ran the Microprocessor Report newsletter, Michael presented hundreds of seminars. Christopher Haupt Christopher has been developing Internet-related technology for more than 15 years. Feeds The best way to receive the course materials is by signing up for the course.

ruby - Rails 3. Creating a production database 6.  Flow Control Ahhhh, flow control. This is where it all comes together. Even though this chapter is shorter and easier than the methods chapter, it will open up a whole world of programming possibilities. After this chapter, we'll be able to write truly interactive programs; in the past we have made programs which different things depending on your keyboard input, but after this chapter they will actually different things, too. But before we can do that, we need to be able to compare the objects in our programs. We need... Comparison Methods Let's rush through this part so we can get to the next section, , where all the cool stuff happens. puts 1 > 2 puts 1 < 2 false true No problem. puts 5 >= 5 puts 5 <= 4 true false And finally, we can see if two objects are equal or not using == (which means "are these equal?") puts 1 == 1 puts 2 ! true true Of course, we can compare strings, too. lexicographical ordering , which basically means their dictionary ordering. cat comes before dog in the dictionary, so: true

Interactive Portal Turret by *r4di0fly3r on deviantART

Related: