Skip to content

Instantly share code, notes, and snippets.

Avatar
🐐

Lovisa Svallingson biglovisa

🐐
View GitHub Profile
View gist:eeef2a20bb7518c3a40b33b3e804d7b3
## 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
View gist:0da65883fc91d40dd013ebf9b6d221cf
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:
View gist:cec6a34fa88293e7e1c37f57bde44a72
# 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
@biglovisa
biglovisa / sh.txt
Created Apr 4, 2018
Shell and such
View sh.txt
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 Jun 1, 2017
Starter HTML for dom lesson
View report-card.html
<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 / iterating.md
Created May 9, 2017
iteration exercises
View iterating.md

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
Array exercises
View array.md

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"
View function-control-flow-exercises.md

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.

@biglovisa
biglovisa / functions.md
Last active May 10, 2017
Functions: check-ins
View functions.md

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 / control-flow.md
Created May 4, 2017
Control flow: check-ins
View control-flow.md

Control Flow

Student grades

  • Create an if/else statement which tells you if a student should get an A, B, C, or D based on their score.
    • A: 100 - 95
    • B: 94 - 85
    • C: 84 - 75
    • D: 74 or below
You can’t perform that action at this time.