Skip to content

Instantly share code, notes, and snippets.

View biglovisa's full-sized avatar
🌍
Patch is hiring!

Lovisa Svallingson biglovisa

🌍
Patch is hiring!
View GitHub Profile
## Let's set up our dotfiles
### Part 1: Set up your dotfile repository
1. cd to your root directory (cd)
2. create a dotfiles directory (mkdir dotfiles)
2.5 run (git init) to initialize it as a git repository
3. run either a (touch .zsh_profile.zsh) file or a (touch .bash_profile) file
- zsh/bash depends on your shell. run (echo $SHELL ) in order to find out what shell you have
- if you already have a {zsh,bash}_profile file in your root directory, copy over the contents
@biglovisa
biglovisa / oauth-example.md
Last active July 13, 2020 01:49
OAuth Example using the omniauth-github gem
# Git
## Source control
- Keep historical log of what has changed
- Helps when you want to collaborate with other people
- Safer way to ship software
## Concepts
Note: I'm not giving you any interaction patterns so that you get the chance to construct your own.
Questions
--------------
- Given a word, find all of it's anagram in the (English) dictionary
- Given a string, determine whether or not it is a palindrome
- Implement a vending machine. I want to be able to buy, restock, and see what the current inventory is.
- To consider:
@biglovisa
biglovisa / sh.txt
Created April 4, 2018 22:53
Shell and such
What is the terminal
a program that emulates the terminal
iterm or terminal most commonly
windows: https://www.quora.com/How-do-I-open-terminal-in-windows
What is the shell
a program that takes commands from the keyboard and gives them to the operating system to perform
operating system is what "does all the things"
performs tasks
recognizes keyboard input
@biglovisa
biglovisa / report-card.html
Created June 1, 2017 02:15
Starter HTML for dom lesson
<h1>Report Card</h1>
<p>Student Name: <span class="student">Your Name Here</span></p>
<ul>
<li>Physics, <span class="grade">D</span></li>
<li>Calculus 2, <span class="grade">F+</span></li>
<li>English Literature, <span class="grade">E</span></li>
</ul>
@biglovisa
biglovisa / functions.md
Last active May 10, 2017 02:23
Functions: check-ins

Functions

Check-ins 1

  • What is a function? Give an example of a daily task which could be abstracted into a function.
  • In your console, create a named function and an anonymous function.
  • Create a function called myFunctionName. What does myFunctionName return? What does myFunctionName() return?
  • What does a function return by default?
  • Create a function which returns "You are the world's greatest" when invoked.
@biglovisa
biglovisa / iterating.md
Created May 9, 2017 19:53
iteration exercises

Iterating over collections

Summing integers

  • Given the array numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], iterate over the array and add all numbers together.

Multiplying and summing integers

  • Given the array numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], iterate over the array and multiply all the integers by themselves, and sum them together.
@biglovisa
biglovisa / array.md
Created May 9, 2017 19:51
Array exercises

Array exercises

Foundations

  • Create an empty array
  • Add a few elements to the end of the array
  • Add an element to the beginning of the array
  • Remove the last element from the array
  • Remove the first element from the array
  • Given an array containing the elements: "orange", "carrot", "lemon", "pomegranate", "blood orange", "apple"

Functions: exercises

  • Answer the following questions with the person sitting next to you:

    • What does a function return by default?
    • What is the return keyword? What does it do?
    • Do you always have to give a function a name?
    • What is the difference between this: myFunctionName and myFunctionName()?
    • What is the function signature?
  • Create a function which takes the arguments name and jobTitle.