Skip to content

Instantly share code, notes, and snippets.

View jendiamond's full-sized avatar
🏠
Working from home

JenDiamond jendiamond

🏠
Working from home
View GitHub Profile

Tutorial | Codebase | Stylesheets

$ rails new pic-tur-esque --database=postgresql

$ rake db:create

$ rails s

Initialize local Git repo

Add GitHub remote and push

Add Heroku remote and push

Section 10 - Project 2 #39

Solution: Restart the server

I worked on it the next day. I checked the code. Suddenly it was working. It may have been a white spave issue.

NoMethodError in Posts#new

undefined method errors for nil:NilClass

Tutorial | Codebase | Stylesheets

$ rails new flixnpix --database=postgresql

$ git init

$ git status

$ git add .

$ git status

$ git commit -m "Initial commit"

$ git status

$ git remote add origin [email protected]:jendiamond/flixnpix.git

$ rails new chittychat -d postgres -T

$ rails g model user name:string email:string password_digest:string

$ rails g model room name:string

$ rails g model message user:references room:references content:text

$ bundle exec rake db:migrate


[Deploying ActionCable to Heroku]

PART 1 - Rails 5 Preview: Action Cable Part I

@jendiamond
jendiamond / sql.md
Last active January 30, 2017 21:47
  • Download the zipfile
  • Open and extract the .tar file use iZip
  • Open pgAdmin3 in the terminal $ pgadmin3
  • Double click on PGSQL9.5 to see the database drop down
  • Right click on Databases and select "New Database"
  • Name the database and select done

Creating a Database

Fizz Buzz

In Python, Ruby, Java, JavaScript, and Go

In the below examples I was playing with the languages using a simple method and/or trying to call a method from another method or within a class.


Python

python_fizz_buzz_1.py

def fizzbuzz(n):

app/controllers/baths_controller.rb

class BathsController < ApplicationController
  before_action :set_bath, only: [:show, :edit, :update, :destroy]

  # GET /baths
  def index
    @baths = Bath.all
  end