Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am ndelage on github.
  • I am ndelage (https://keybase.io/ndelage) on keybase.
  • I have a public key ASA1mrpBLukiv_jMjPNLRkL2BOgK4ecNR6MMfkqDm2BRtAo

To claim this, I am signing this object:

@ndelage
ndelage / react_redux_links.md
Created September 15, 2016 14:42
Redux + React Links
@ndelage
ndelage / recent_specs.sh
Last active August 29, 2015 14:22
recently modified rspec files
#!/bin/bash
# Find modified specs between HEAD and some other point in the
# commit history. Defaults to comparing between master & HEAD.
#
# Supply an optional alternative point in history as the first & only
# argument:
# recent_specs.sh HEAD~8
#
#
@ndelage
ndelage / crud_step_by_step.md
Last active March 26, 2020 00:10
Step by Step CRUD Applications

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).
@ndelage
ndelage / mammals.rb
Created January 19, 2015 16:35
Inheritance & Instance Variables with Ruby
class Mammal
def initialize
@fur = true
@milk = true
@eggs = false
end
def generate_lifespan
@lifespan = rand(7..92)
@ndelage
ndelage / git-flow.md
Last active August 29, 2015 14:10
Git Workflow

Before starting work on a new story:

git checkout master

Update local master (to match remote master)

git pull

Create a new feature branch

git checkout -b user-model

Do work

@ndelage
ndelage / .vimrc
Created November 7, 2014 02:53
faster split swtiching
" use ctr h & l to switch between windows, skip need to crt w + l
map <C-H> <C-W>h
map <C-L> <C-W>l
" same for j & k
map <C-J> <C-W>j
map <C-K> <C-W>k
@ndelage
ndelage / environment.rb
Last active August 29, 2015 14:05
Cross Origin Request Headers for Sinatra
# Add the following before filter at the end of the following
# block, found in your backend's config/environment.rb
#
# configure do
# ...
# ...
# [insert before filter here]
# end
before do
@ndelage
ndelage / orders.rb
Created June 3, 2014 20:55
Restful Orders Routing example
##
## RESTful routes for an 'orders' resource
#
# Note: In order to use the 'other' HTTP verbs (put & delete) you need to enable the
# method_override feature of Sinatra.
#
# (in config/environment.rb)
# config do
# set :method_override, true
#
@ndelage
ndelage / interview_prep.md
Last active May 7, 2018 00:59
Interview Prep Questions

Process

  • Phone
  • Tech
    • Pairing
    • Whiteboarding
  • Culture

What should you get out of the interview process?