$ rails g model User
belongs_to
has_one
#Rails - Paperclip gem
##install
brew install imagemagick
##add gems
// This is a manifest file that'll be compiled into application.js, which will include all the files | |
// listed below. | |
// | |
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, | |
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. | |
// | |
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the | |
// the compiled file. | |
// | |
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD |
"use strict" | |
@ticTacToe = angular.module 'TicTacToe', [] | |
ticTacToe.constant 'WIN_PATTERNS', | |
[ | |
[0,1,2] | |
[3,4,5] | |
[6,7,8] | |
[0,3,6] |
#Objective
###What are Blocks, Procs and Lambda?
###Quick Review on Loops and Arrays
# -*- encoding : utf-8 -*- | |
# config/deploy.rb | |
require 'capistrano/ext/multistage' | |
require "rvm/capistrano" | |
require 'bundler/capistrano' #Using bundler with Capistrano | |
require 'cape' | |
set :stages, %w(staging production) | |
set :default_stage, "production" |
input = [1, 4, 6, 3, 2] | |
def get_pivot(input=[]) | |
1.upto(input.length-2) do |pivot| | |
left = input[0...pivot].inject(:+) | |
right = input[pivot+1..-1].inject(:+) | |
return pivot if left == right | |
end | |
return -1 | |
end |
class BooksController < ApplicationController | |
before_action :set_book, only: [:show, :update, :destroy] | |
respond_to :json | |
def index | |
respond_with Book.all | |
end | |
def create | |
respond_with Book.create(book_params) |
Here is the Student Asessment
Morning 007s.
Your mission, should you choose to accept it, is to identify and eliminate the hacker who breached our secure data centers.