Skip to content

Instantly share code, notes, and snippets.

View olitreadwell's full-sized avatar

Oli Treadwell (he/him) olitreadwell

View GitHub Profile

Please do the following before our lesson to save us time and you money:

  1. commit & push your latest code you've written to GitHub and send me the GitHub repo. Let me know if you're not sure how to do this. Here is a guide to do so

https://github.com/git-guides

  1. send me all of the project/assignment details if you have a project/assignment. Including the due date.

  2. send me some information about what you've been learning, or what you want to work on together.

@olitreadwell
olitreadwell / lecture-1.md
Last active April 28, 2023 14:15
2023-04-18-frontend-lesson-plans-html-css-dom-and-dom-manipulation

Monday Lecture: HTML/CSS Review

Objective: At the end of this lesson, students will be able to:

  • Build websites without Repl.It
  • Use the VS Code Live Preview Extension
  • Open Website projects in the browser with Live Preview
  • Use Chrome DevTools
  • Understand the Chrome Dev Tools Element Tab
@olitreadwell
olitreadwell / remove-node-modules-from-git-project.md
Last active April 9, 2023 19:49
remove-node-modules-from-git-project

Remove node_modules from a Git Repo Project

The node_modules folder in a Node.js project contains a lot of files and directories that can be easily generated from the project's package.json file. Therefore, it's a good idea to exclude this folder from version control using a .gitignore file. Here are the steps to delete the node_modules folder, add it to .gitignore, commit the changes, push them to the remote repository, and then reinstall the dependencies using npm:

  1. Delete the node_modules folder:
rm -rf node_modules
  1. Create a .gitignore file in the root of your project if it doesn't exist already:
@olitreadwell
olitreadwell / new-branch-auto-commit.sh
Last active November 5, 2021 09:06
new-branch-and-auto-commit
#!/bin/zsh
git reset
mkdir -p ~/code/tmp/delete-me/
secondsInterval=20
branchName=`date +"%Y%m%d%H%M%S%Z"`
commitDateTime=`date +"%Y-%m-%d %T%Z"`
(git ls-files --modified --others --exclude-standard | grep . > /dev/null) && git add . && git stash
git checkout main && git pull
@olitreadwell
olitreadwell / flexbox-centering.css
Created October 22, 2021 02:01
css flexbox centering
.flexbox-centering {
display: flex;
justify-content: center;
align-items: center;
height: 100px;
}
@olitreadwell
olitreadwell / media-queries.css
Created October 22, 2021 01:54
css media queries
/* Smartphones (portrait and landscape) ----------- */
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) {
/* Styles */
}
/* Smartphones (landscape) ----------- */
@media only screen and (min-width: 321px) {
/* Styles */
}
@olitreadwell
olitreadwell / horizontal-and-vertical-center.css
Created October 22, 2021 01:54
css horizontally and vertically center
/*
=======================================================================================
Using negative margins equal to half of that width and height,
after you've absolutely positioned it at 50% / 50% will center
it with great cross browser support.
======================================================================================
*/
.parent {
position: relative;
@olitreadwell
olitreadwell / bind-form-or-element.js
Last active October 22, 2021 01:50
js reactjs bind form or input elements with state
class CName extends Component {
constructor() {
this.state = {
firstname: "",
};
}
handleInputChange = (e) => {
this.setState({
firstname: e.target.value,
@olitreadwell
olitreadwell / sampleREADME.md
Last active July 7, 2023 22:49
repo readme template

FVCproductions

INSERT GRAPHIC HERE (include hyperlink in image)

Repository Title Goes Here

Subtitle or Short Description Goes Here

Barbara Liskov

Presentation

Link to Presentation

Overview

  • born November 7, 1939
  • born Barbara Jane Huberman
  • American Computer scientist
  • Professor at MIT