Skip to content

Instantly share code, notes, and snippets.

View nikeshashar's full-sized avatar

Nikesh Ashar nikeshashar

  • Cledara
  • London
View GitHub Profile

Sublime Text talk cheatsheet

For Makers Academy Talk

Keys

⌘ Command key

⌃ Control key (ctrl)

⌥ Alt key (option)

Use these rapid keyboard shortcuts to control the GitHub Atom text editor on Mac OSX.

Key to the Keys

  • ⌘ : Command key
  • ⌃ : Control key
  • ⌫ : Delete key
  • ← : Left arrow key
  • → : Right arrow key
  • ↑ : Up arrow key

IRB: Interactive Ruby

Now that you've got Ruby installed, let's start coding!

With your terminal open, type the following command:

irb
Challenge setup
Specification:
Thermostat starts at 20 degrees
You can increase the temperature with the up button
You can decrease the temperature with the down button
The minimum temperature is 10 degrees
If power saving mode is on, the maximum temperature is 25 degrees
If power saving mode is off, the maximum temperature is 32 degrees
@nikeshashar
nikeshashar / ruby_method.rb
Created October 24, 2016 08:21
Template Method
def hello(name)
puts "Welcome to learning how to code #{name}"
end
.
├── app.js
├── bin
│ └── www
├── package.json
├── public
│ ├── images
│ ├── javascripts
│ └── stylesheets
│ └── style.css
{
"name": "my-app",
"version": "0.0.0",
"private": true,
"scripts": {
"start": "node ./bin/www"
},
"dependencies": {
"body-parser": "^1.15.2",
"cookie-parser": "^1.4.3",
{
"dependencies": {
"sequelize": "^3.24.7",
"sequelize-cli": "^2.4.0"
}
}
$ node_modules/.bin/sequelize init
$ node_modules/.bin/sequelize model:create --name User --attributes username:string
$ node_modules/.bin/sequelize model:create --name Listing --attributes title:string,description:text
.
├── config
│ └── config.json
├── migrations
│ ├── 20161104204911-create-user.js
│ └── 20161104205207-create-listing.js
├── models
│ ├── index.js
│ ├── listing.js
│ └── user.js