Skip to content

Instantly share code, notes, and snippets.

View KaraAJC's full-sized avatar
🦄
werk

Kara A Carrell KaraAJC

🦄
werk
View GitHub Profile
@KaraAJC
KaraAJC / items.rb
Last active August 29, 2015 14:13
trying to get challenge 1
class InventoryItem
attr_accessor :name, :inventory
def initialize(args)
@name = args[:name]
@inventory = args[:inventory]
end
def count_items(item)
#self.inventory.each do |key, value|
@KaraAJC
KaraAJC / gist:df3329c18cde51fcad8e
Created January 27, 2015 00:01
Phase 1 Challenges List
| Not Done | Working On | Completed |
| --- | --- | --- |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
99-bottles-challenge, rspec
activerecord-congress-database-1-modeling-congresspeople-challenge, rspec
@KaraAJC
KaraAJC / gist:2cd59953c430cd66c1f0
Last active August 29, 2015 14:14
Phase 1 Challenges List
Not Done Working On Completed
activerecord-congress-database-1-modeling-congresspeople-challenge, rspec 99-bottles-challenge, rspec

|

@KaraAJC
KaraAJC / User Controller Routes.rb
Last active October 26, 2017 16:05
Kara Crud cheatSheet
# READ ---------------------------------
## list all users (index)
get "/users" do
@users = User.all
erb :"users/index"
end
## show one user by id (show)
## THIS ROUTE SHOULD BE FURTHER DOWN, TO PREVENT '/new' from being captured by '/:id'

Step by Step CRUD

##Commands to remember:

  1. Bundle Install
  2. BE rake -T
  3. BE rake console # Start IRB with application environment loaded
  4. rake db:create # Create the databases at hr-sinatra-refactor-challenge_development
  5. rake db:drop # Drop the database at hr-sinatra-refactor-challenge_development
  6. rake db:migrate # Migrate the database (options: VERSION=x, VERBOSE=false, SCOPE=blog)
  7. rake db:reset # Drop, create, and migrate the database
@KaraAJC
KaraAJC / sites
Created February 20, 2015 00:34
Sites I've found to help me!
http://codefol.io/posts/How-Does-Rack-Parse-Query-Params-With-parse-nested-query

Step by Step CRUD

Understand the Domain

  1. Discuss the domain (with others or yourself).
  2. Write down the user stories (features that you plan to support).
  3. Develop an understand of how each noun (model/table) will relate to each other.

Schema

  1. Draw the schema. Don't name any join tables as the combination of two other tables, find a unique noun.
  2. Double check your schema for any columns that don't follow convention (e.g. foreign keys should end in _id).
@KaraAJC
KaraAJC / README.MD
Last active May 9, 2018 20:04
ReadMe Template

Title

Description

Add a one-sentence description of this project. and a link to the live demo.

Features

  • completed feature: What this feature does
  • pending feature: What this feature does

ScreenShots

@KaraAJC
KaraAJC / React Notes
Last active August 10, 2016 04:20
React Test
Why react is great
- load balancing
- code cleanliness
- keep from bloat
react creates components that will keep track of things and update on its own. have their own virtualDOM that lives in between your code and the dom.
learn about JSX
@KaraAJC
KaraAJC / Bot Creation!!
Created September 17, 2016 07:26
Intro to Java Session
Greg Bauges
GEMS: twitter, CSV, marky_markov
use twitter API apps.twitter.com
get key credentials
tweets - client.user_timeline('username'
cleaner:
def clean_tweet(tweet)