Skip to content

Instantly share code, notes, and snippets.

View jskrwc's full-sized avatar

Jim K jskrwc

  • CA
View GitHub Profile
@jskrwc
jskrwc / RAILS_CHEATSHEET.md
Created November 13, 2018 07:05 — forked from mdang/RAILS_CHEATSHEET.md
Ruby on Rails Cheatsheet

Ruby on Rails Cheatsheet

Architecture

Create a new application

Install the Rails gem if you haven't done so before

@jskrwc
jskrwc / ruby_notes.md
Created July 11, 2018 03:11 — forked from aka-rob/ruby_notes.md
Notes from Module 3 - Bloc

Basics

  • puts converts value to string.
  • p does no conversion. Prints the true value.
  • Everything in Ruby is an object!
  • The pound sign/hash is for single line comments.
  • Multiline comments require =begin and =end
  • Integers are whole numbers
  • An expression is a bit of code that yeilds a value.
  • Math can be performed on string objects.
@jskrwc
jskrwc / gist:233a91091a215cc28a78f2a187a8d9b8
Created February 5, 2018 19:59 — forked from jmtame/gist:6458832
ruby blocks and yield explained by a bloc mentor

The following is an explanation of Ruby blocks and yield by another Bloc mentor (Adam Louis) who was trying to explain it to one of his students.

On my very first day programming, if someone asked me for "the sum of the numbers from 1 to 10", I'd have written:

puts 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10

Easy enough.

@jskrwc
jskrwc / player-js-analysis.md
Last active October 2, 2017 06:04 — forked from R-V-S/player-js-analysis.md
player.js analysis
  1. This file declares a class, Player, instantiates it, and assigns it to a global player variable.
  2. The Player class contains four methods:
    • constructor()
    • playPause()
    • skipTo()
    • setVolume()
  3. The constructor() method sets initial values for the currentlyPlaying, playState, volume, and soundObject properties.
    • currentlyPlaying is set to the first item in album.songs.
    • The initial playState is "stopped".
  • The volume is set to the number 80.