Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |
Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |
require 'yaml' | |
require '../lesson2/helper_methods.rb' | |
require './ttt_computer_methods.rb' | |
CROSS = 'X'.freeze | |
NOUGHT = 'O'.freeze | |
FIRST_PLAYER = 'choose'.freeze | |
EMPTY_POSITION = ' '.freeze | |
ALTENATE_PLAYERS = { 'X' => NOUGHT, 'O' => CROSS }.freeze | |
PLAYERS = { 'O' => 'Computer', 'X' => 'You' }.freeze |
app.get('/', function(req, res){ | |
db.keys('image:*:location', function(err,keys){ | |
if (err) { throw err; } | |
var offense = keys[Math.floor(Math.random()*keys.length)]; | |
var defense = keys[Math.floor(Math.random()*keys.length)]; | |
if (defense == offense) { | |
defense = keys[Math.floor(Math.random()*keys.length)]; | |
} | |
db.mget('image:' + offense + ':location', 'image:' + offense + ':rating', | |
'image:' + defense + ':location', 'image:' + defense + ':rating', |
I hereby claim:
To claim this, I am signing this object:
A list of resources that aspiring Rails developers can use to learn Rails and other relevant technologies. This list includes some resources that I see recommended all over the web--not all of which I like--as well as some hidden gems that I've found valuable. This list is intended to supplement my blog post here.
<!doctype html> | |
<html lang="en-US"> | |
<head> | |
<title>M. Edgar Joel</title> | |
<meta charset="UTF-8" /> | |
</head> | |
<body> | |
<h1>M. Edgar Joel</h1> | |
https://github.com/mwakipesile | |
UPDATE 2016-12-01: Please refer to the official guide instead of this process.
UPDATE 2014-12-21: RubyGems 1.8.30, 2.0.15 and 2.2.3 have been released. It requires manual installation, please see instructions below.
Hello,
// Second argument's omitted, default to factors [3, 5] | |
console.log(sumOfMultiples(10)) // returns 23 | |
console.log(sumOfMultiples(100)) // returns 2318 | |
console.log(sumOfMultiples(1000)) // returns 233168 | |
// Limit is smaller than all factors (3, 5) | |
console.log(sumOfMultiples(1)) // returns 0 | |
// Limit is smaller than some factor(s) | |
console.log(sumOfMultiples(4)) // returns 3 |
function sumOfMultiples(limit, factors = [3, 5]) { | |
var multiple; | |
var multiples = []; | |
//TODO: Validate inputs | |
var collectFactorsUniqueMultiples = function(factor) { | |
multiple = factor; | |
while (multiple < limit) { |