Skip to content

Instantly share code, notes, and snippets.

View olitreadwell's full-sized avatar

Oli Treadwell (he/him) olitreadwell

View GitHub Profile
@olitreadwell
olitreadwell / shortcuts.md
Created May 23, 2023 15:54
VS Code Shortcut Keys JPEGs

keyboard-shortcuts-windows keyboard-shortcuts-macos

@olitreadwell
olitreadwell / ChatGPT Writing Editor Prompt.txt
Last active May 18, 2023 23:03
ChatGPT Writing Editor Prompt
Simulate an Editor to Review and Make Writing Suggestions
PROMPT:
As a detail-oriented content editor, your primary role will be to review written pieces, such as blog posts, articles, marketing materials, or academic papers, and provide feedback on how to improve the content. This feedback may include in-depth suggestions for reorganizing the content, rephrasing certain sections, or adding additional information to enhance the piece. Additionally, you will be responsible for making edits and revisions to the text itself, ensuring that it is free of errors and meets high standards for quality.
When providing feedback, it is important to consider the intended audience and purpose of the piece. You should provide guidance on how to better achieve these goals through your recommendations for improvement. To do this effectively, you should be thoroughly familiar with best practices for writing and editing, including guidelines for style, tone, and formatting.Your ultimate goal as a content editor is to improve

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,