background preloader

Learn code

Facebook Twitter

Scratch Project Editor - Imagine, Program, Share. Home. Advance Your Education With Free College Courses Online - Udacity. Ruby. A Quick (and Hopefully Painless) Ride Through Ruby (with Cartoon Foxes) :: Why's (Poignant) Guide to Ruby. Yeah, these are the two. My asthma’s kickin’ in so I’ve got to go take a puff of medicated air just now. Be with you in a moment. I’m told that this chapter is best accompanied by a rag. Something you can mop your face with as the sweat pours off your face. Indeed, we’ll be racing through the whole language. 1. My conscience won’t let me call Ruby a computer language. But what do you call the language when your brain begins to think in that language?

We can no longer truthfully call it a computer language. Read the following aloud to yourself. 5.times { print "Odelay! " In English sentences, punctuation (such as periods, exclamations, parentheses) are silent. Which is exactly what this small Ruby program does. Exit unless "restaurant".include? Here we’re doing a basic reality check. Ever seen a programming language use question marks so effectively? ['toast', 'cheese', 'wine'].each { |food| print food.capitalize } The computer then courteously responds: Toast, Cheese and Wine. 2. Variables. Getting a Git Repository. You can get a Git project using two main approaches. The first takes an existing project or directory and imports it into Git. The second clones an existing Git repository from another server. Initializing a Repository in an Existing Directory If you’re starting to track an existing project in Git, you need to go to the project’s directory and type $ git init This creates a new subdirectory named .git that contains all of your necessary repository files — a Git repository skeleton.

If you want to start version-controlling existing files (as opposed to an empty directory), you should probably begin tracking those files and do an initial commit. . $ git add *.c $ git add README $ git commit -m 'initial project version' We’ll go over what these commands do in just a minute. Cloning an Existing Repository If you want to get a copy of an existing Git repository — for example, a project you’d like to contribute to — the command you need is git clone.

You clone a repository with git clone [url]. Jpds. Regular-Expressions.info - Regex Tutorial, Examples and Reference - Regexp Patterns. Learn Web Design, Coding & Much More! Online Compiler, Editor & IDE for C, C++, C#, Java, Javascript, PHP, Ruby, VB.