Skip to content

Instantly share code, notes, and snippets.

View scwebd's full-sized avatar

Sarah Cullen scwebd

  • Denver, CO
View GitHub Profile
Best practices for REST include:
- Put your REST API on it’s own URL (e.g. ‘/api/todos’ or ‘/api/purchases’)
- A POST that creates an item should return the ID of the item it created.
- PUT and DELETE should specify the ID of the item they're intended to affect in the URL (e.g. '/todos/123').

- If the ID for the item specified in a PUT or DELETE couldn't be found, return a 404.

- If an error occurs in the server, return an error code (e.g. 500).
>> cd (changes directory)
>> cd ~ (changes to home directory)
>> cd .. (moves up one directory)
>> ls (lists files in folder)
>> pwd (shows current directory)
## User Story
As a user, I want to be able to input search queries so that I can search Stack Overflow when I'm stuck.
## Acceptance Criteria
- [ ] index.html has a text input
- [ ] index.html has a search button
*New JS Methods We Learned Today:*
*alert(), confirm(), prompt():* https://www.w3schools.com/js/js_popup.asp
*console.log() and variants:* https://developer.mozilla.org/en-US/docs/Web/API/Console/log
*.length in an array* (technically a property and not a method; tells you the number of members/items in an array): https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/length
*.indexOf()* (finding the index of an array member): https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf
<meta name="viewport" content="width=device-width, initial-scale=1.0">
Media Queries:
When using all min-width, the narrower/smaller media queries goes first and the widest media query will go last.
When using all max-width, the widest/biggest width of media query goes first and the narrowest go last.
@scwebd
scwebd / linkPseudoClasses
Last active September 19, 2018 02:09
LVH[F]A
a:link {}
a:visited {}
a:hover {}
a:focus {}
a:active {}
https://css-tricks.com/snippets/css/link-pseudo-classes-in-order/
@scwebd
scwebd / reset
Created September 9, 2018 06:21
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
@scwebd
scwebd / clearfix
Last active September 14, 2018 18:27
Remember that, to use a clearfix, you add the code below to your stylesheet. Then, you apply 'class="clearfix"' to the parent element that wraps around the floated element or elements...
.clearfix::after {
clear: both;
content: "";
display: block;
}