Skip to content

Instantly share code, notes, and snippets.

View daaimah123's full-sized avatar

Daaimah Tibrey daaimah123

View GitHub Profile

Find all merged branches

git branch --merged | grep -v \* | xargs

Delete all merged branches

git branch --merged | grep -v \* | xargs git branch -D

Delete all excluding main

@daaimah123
daaimah123 / Spread Operator, Rest Pattern, & Rest Parameters
Last active December 30, 2020 18:38
Notes for Jonas Schmedtmann's lecture on the spread operator, rest pattern, and rest parameters https://udemy.com/course/the-complete-javascript-course/learn/lecture/22648441#overview
const restaurant = {
name: 'Classico Italiano',
location: 'Via Angelo Tavanti 23, Firenze, Italy',
categories: ['Italian', 'Pizzeria', 'Vegetarian', 'Organic'],
starterMenu: ['Focaccia', 'Bruschetta', 'Garlic Bread', 'Caprese Salad'],
mainMenu: ['Pizza', 'Pasta', 'Risotto'],
openingHours: {
thu: {
open: 12,
close: 22,
================================================= Destructuring Arrays =================================================
Declare multiple variables at the same time on the left side > const arr = [1, 2, 3];
> const [a, b, c] = arr;
> console.log({a}, {b}, {c});
{a: 1} {b: 2} {c: 3}
const restaurant = {
name: 'Classico Italiano',
location: 'Via Angelo Tavanti 23, Firenze, Italy',
@daaimah123
daaimah123 / JavaScript: Behind the Scenes
Last active March 14, 2023 06:01
Notes for Behind the Scenes section of Jonas Schmedtmann's course lectures https://udemy.com/course/the-complete-javascript-course/learn/lecture/22648469#overview
==> Can use imperative or declarative paradigms and is very flexible.
==> First-class functions (treat functions as variables, passing a function into another function);
powerful; allows for functional programming.
==> Dyanmically-type language: no data type definitions, known at runtime and can be automatically changed
==> Concurrency model is JS handling multiple tasks at the same time.
==> Event Loops manage the Single-Thread (executed one task at a time) by taking long running tasks,
executing them in the background, then placing them back in the thread when finished. The Event Loop
prevent non-blocking behavior
@daaimah123
daaimah123 / DOM Manipulation & Event Fundamentals
Last active July 2, 2021 17:42
Notes for Jonas Schmedtmann's lecture building guessGame and modalPopUp apps where we learn about DOM and Event Listener Manipulation https://udemy.com/course/the-complete-javascript-course/learn/lecture/22648441#overview
===== Document Object Model (DOM) Manipulation & Event Fundamentals ====
Structured representation of the HTML document that allows JS to access and select elements and
styles to manipulate them (i.e. change text, HTML attributes and CSS styles). Automatically created
once browser loads HTML and stored in a tree structure with nodes. Not JS, but rather apart of web
api's and interact with JS.
Document object is the entry-point into DOM
.querySelector('.message')
==================================== Hyper Text Markup Language (HTML) ===============================
==> Opening and Closing Tags
each tag typically comes with a paired ending tag that begins with a forward-slash
<tag_example></tag_example>
some tags are self closing and will only have one tag which does or does not ends with a forward-slash
<tag_example/>
<tag_element>
@daaimah123
daaimah123 / tools to help debug and common issues
Last active July 2, 2021 17:41
Debugging: Tools and Common Issues
==> TOOLS
console.warn()
console.error()
console.table() ==> formatted table with index and value
'use strict'; ==> opts out of silen errors for scripts
Google Chrome breakpoint settings ==> click the line number to pause execution at that point and
observe scope tab to determine what is occuring at the breakpoint
==> COMMON ISSUES
==============================================================================================================================
ARRAY METHODS
==============================================================================================================================
const family = ['Malaika', 'Jahdai'];
arr.push()
==> add to end of array > family.push('Daaimah');
==> mutates length > console.log(family);
==> return length of new array ['Malaika', 'Jahdai', 'Daaimah']
@daaimah123
daaimah123 / Read Txt Files Using Python
Last active June 7, 2019 21:48
using python shell and python file to print text from a file
# myName.txt (filename1)
# 1. My name is Daaimah Tibrey!
# 2.
# 3.
# myFormerName.txt (filename2)
# 1. My previous name was Daaimah Brown.
# myName.py (filename3)
from sys import argv
@daaimah123
daaimah123 / README-Template.md
Created April 5, 2019 22:13 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites