Skip to content

Instantly share code, notes, and snippets.

View mike-pete's full-sized avatar

Mike Peterson mike-pete

  • San Francisco, CA
View GitHub Profile
@mike-pete
mike-pete / GitHub-RSA-Key.md
Last active November 28, 2024 17:12
GitHub Key
  1. Use git bash to generate ssh key ssh-keygen -t rsa -C "[email protected]"

You need to set a password to avoid issues. When you are setting your key password, nothing will show in the terminal when you enter your password, this is normal, don't panic!

  1. Print out the pub key cat ~/.ssh/id_rsa.pub
  2. Copy that key and add it to https://github.com/settings/keys (New SSH key)
  3. Test to make sure everything is peachy ssh -T [email protected]
@mike-pete
mike-pete / changeTerminal.md
Last active October 28, 2021 17:33
Change default terminal in VS Code

Change the default terminal in VS Code

  1. Press F1
  2. Type Terminal: Select Default Profile (or Terminal: Select Default Shell in older VS Code versions), then press Enter.
  3. Use the arrow keys to scroll to your preferred terminal (I recommend Git Bash).
  4. Press Enter to make the change.
@mike-pete
mike-pete / cheatsheet.md
Last active September 9, 2023 16:54
Git Cheat Sheet

rebase the last 4 commits: git rebase -i origin/<branch name>~4 development

clone again in a different directory: git worktree add ../the_project_2 <branch>

intereactive rebase: rebase -i origin/development

create branch: git branch

@mike-pete
mike-pete / day6.txt
Last active October 7, 2021 01:30
Mobile Friendly Day 6
1. Use this template to create a new repo named "event-landing-page"
https://github.com/gerbriel/Bootstrap-template
2. Clone your new repo to your computer
3. Create a new branch named daily-challenge
git checkout -b daily-challenge
4. Recreate the jumbotron and speaker sections according to this wireframe
https://geekwiseacademy.github.io/virtual-mobile-friendly-websites/img/event-landing-page-wireframe.jpg
@mike-pete
mike-pete / getDataAtPath.js
Created August 19, 2021 17:47
Get nested data at path (loop vs recursion)
const data = {
a:{
b:{
c:{"neat":"right!?"}
}
}
}
function getDataAtPath(path, currentData){
@mike-pete
mike-pete / jwtCheck.py
Created May 19, 2021 17:36
AWS Cognito JWT Validation
# https://renzolucioni.com/verifying-jwts-with-jwks-and-pyjwt/
import jwt
import json
import urllib.request
# config
region = ''
userpoolID = ''
@mike-pete
mike-pete / react-notes.js
Last active May 12, 2021 01:13
React notes
// new react app
npx create-react-app
// install sass
npm install node-sass --save
// install react router
npm install react-router
// install gh-pages https://dev.to/yuribenjamin/how-to-deploy-react-app-in-github-pages-2a1f
@mike-pete
mike-pete / DailyChallengeV9.txt
Last active March 23, 2021 02:53
Daily challenge to use folders instead of filenames for struct your site
Go to github.com and create a new repository named "final-project" (https://github.com/new)
Clone your final-project repository using SSH
Add the following to your final-project folder
Folders:
about
contact
css
@mike-pete
mike-pete / Step 0 - Prep
Last active June 8, 2022 22:26
Git-Bash Cheatsheet
// install git-bash
https://git-scm.com/downloads
// Sign up with Github
https://github.com/join
@mike-pete
mike-pete / index.html
Last active February 3, 2021 03:58
Day 5 Daily Challenge
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Home</title>
<link rel="stylesheet" href="style.css">
</head>
<body>