Skip to content

Instantly share code, notes, and snippets.

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

Mark Miranda notmarkmiranda

🏠
Working from home
  • Smartsheet
  • Longmont, CO
View GitHub Profile
@notmarkmiranda
notmarkmiranda / README.md
Created July 14, 2022 14:16 — forked from jondkinney/README.md
jondkinney's console vim setup

Console VIM and Tmux setup compatible with Mac OS X and Linux.

Installation

Install by running the following command in your terminal:

exec 3<&1;bash <&3 <(curl https://gist.githubusercontent.com/jondkinney/2040114/raw/vim.sh 2> /dev/null)
@notmarkmiranda
notmarkmiranda / undo_change_notifier.dart
Created April 11, 2020 04:21 — forked from brianegan/undo_change_notifier.dart
Undo/Redo with ChangeNotifier
import 'package:flutter/cupertino.dart';
class UndoChangeNotifier<T> extends ChangeNotifier {
final List<T> _history;
int _historyIndex = -1;
UndoChangeNotifier(T initialState) : _history = [initialState];
T get state => hasState ? _history[_historyIndex] : null;

Setting Group Expectations

Group Member Names: Deb, Kris, Mark

  1. When are group members available to work together? What hours can each group member work individually? Are there any personal time commitments that need to be discussed?
  • Weekends, after school.
  • We're all pretty open individually.
  • Mark has a Saturday afternooon commitment, Kris and Deb have mentor sessions after school, 2 days per week.
## Models, Databases, Relationships in Rails
#### What is the difference between a primary key and a foreign key? Where would we find a primary key? What would it be called by default? Where would we find a foreign key? What is the naming convention for a foreign key?
* Primary key is a unique identifier in Table. It can exist as a foreign key in AnotherTable or other tables with which it has a relationship. "id" - default name. "table_id" in AnotherTable.
#### Write down one example of:
* Instructor has one office, computer has one charger
#### Write down two examples of a one-to-many relationship.
* Computer has many usb ports, company has many full time employees
@notmarkmiranda
notmarkmiranda / cfu_crud_in_sinatra.markdown
Last active March 23, 2016 04:28 — forked from rwarbelow/cfu_crud_in_sinatra.markdown
CRUD in Sinatra -- Check for Understanding
  1. Define CRUD. - Create, Read, Update, Delete
  2. There are seven verb + path combinations that are necessary in a basic Sinatra app in order to provide full CRUD functionality. List each of the seven combinations, and explain what each is for. a. (get - /folder) - get all items in folder b. (get - /folder/:id) - get single item in folder c. (get - /folder/new) - get view with form to create new view d. (post - /folder) - post new item e. (get - /folder/:id/edit) - get form to edit exisiting item f. (put - /folder/:id) - update existing item g. (delete - /folder/:id) - delete item based on id

Introduction to Sinatra

1. What is the purpose of the server file (routing)?

  • It is the file that directs requests to specific places based on their address passed.

2. How do you pass variables into the views?

  • Instance Variables & :locals hash

3. How can we interpolate ruby into a view (html)?