Skip to content

Instantly share code, notes, and snippets.

#! /usr/bin/bash
read -p "Open frontend codebase? " REPLY
case "$REPLY" in
[yY] | [yY][eE][sS])
echo "Opening frontend codebase..."
cd ./ai-grader && code .
sleep .5
@Fiewor
Fiewor / interview.py
Created November 23, 2024 14:00
Optimized interview code
# https://leetcode.com/problems/insert-delete-getrandom-o1/
def __init__(self):
self.arr = []
self.map = {}
def insert(self, val: int) -> bool:
if val in self.arr:
return False
self.arr.append(val)
@Fiewor
Fiewor / issue.jsx
Created July 25, 2024 12:04
Buggy component
import { useMutationState, useMutation } from "@tanstack/react-query";
import { useNavigate } from "react-router-dom";
import {
TableRow,
TableHeaderCell,
TableHeader,
TableFooter,
TableCell,
TableBody,
Button,
import React, { useState, useEffect, useRef } from 'react';
const DropSearch = ({
data,
identifier,
onSelect,
inputId,
showItems,
placeholder,
disable,
@Fiewor
Fiewor / DevOps-notes.md
Last active May 30, 2023 18:23
Notes from my prep for AZ-400: Designing and Implementing Microsoft DevOps Solutions exam

DEVOPS

MODULE 1: Introduction to DevOps

WHAT IS DevOps?

According to Donovan Brown, "DevOps is the union of people, process, and products to enable continuous delivery of value to our end users.

The idea is to create multidisciplinary teams that work together with shared and efficient practices and tools.

@Fiewor
Fiewor / recentEvents.json
Last active May 3, 2022 10:36
A sample of about 100 Recent Events from GDELT dataset in JSON format
{
"actions": [
{
"_id": 1037207893,
"AvgTone": -0.143678160919539,
"GoldsteinScale": -2,
"Year": 2021,
"Action": {
"Geo_Fullname": "Georgia, United States",
"Geo_CountryCode": "US",
@Fiewor
Fiewor / README.md
Created April 27, 2022 13:50 — forked from curran/README.md
United Nations World Population Prospects 2019
@Fiewor
Fiewor / recentEvents.csv
Created April 27, 2022 09:48
Some of the GDELT Recent Events data gotten from MongoDB Atlas Cluster made available for the MongoDB hackathon
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 50 columns, instead of 47 in line 1.
Action.Geo_ADM1Code,Action.Geo_ADM2Code,Action.Geo_CountryCode,Action.Geo_FeatureID,Action.Geo_Fullname,Action.Geo_Type,Action.Location,Actor1.Code,Actor1.CountryCode,Actor1.Geo_ADM1Code,Actor1.Geo_ADM2Code,Actor1.Geo_CountryCode,Actor1.Geo_FeatureID,Actor1.Geo_Fullname,Actor1.Geo_Type,Actor1.Location,Actor1.Name,Actor1.Type1Code,Actor2.Code,Actor2.CountryCode,Actor2.Geo_ADM1Code,Actor2.Geo_ADM2Code,Actor2.Geo_CountryCode,Actor2.Geo_FeatureID,Actor2.Geo_Fullname,Actor2.Geo_Type,Actor2.Location,Actor2.Name,Actor2.Type1Code,Actor2.Type2Code,AvgTone,DateAdded,Day,EventBaseCode,EventCode,EventRootCode,FractionDate,GoldsteinScale,Info.meta,Info.og,IsRootEvent,MonthYear,NumArticles,NumMentions,NumSources,QuadClass,SourceURL,Year,_id,internal.downloadId
USGA,,US,GA,"Georgia, United States",2,,LEG,,USGA,,US,GA,"Georgia, United States",2,,LEGISLATOR,LEG,,,,,,,,0,,,,,-0.143678160919539,2022-04-01T15:15:00.000Z,20210401,110,110,11,2021.2493,-2,,,1,202104,10,10,1,3,https://www.georgiapolicy.org/news/the-myth-of-underfund
@Fiewor
Fiewor / cssNamedColors.csv
Created April 25, 2022 09:58
CSS Named Colors
Decimal Code(R,G,B) Color Name RGB hex value
rgb(255,160,122) lightsalmon #FFA07A
rgb(250,128,114) salmon #FA8072
rgb(233,150,122) darksalmon #E9967A
rgb(240,128,128) lightcoral #F08080
rgb(205,92,92) indianred #CD5C5C
rgb(220,20,60) crimson #DC143C
rgb(178,34,34) firebrick #B22222
rgb(255,0,0) red #FF0000
rgb(139,0,0) darkred #8B0000
@Fiewor
Fiewor / svg.md
Last active December 11, 2021 12:49
Notes about SVG using the FrontEnd Masters SVG course

what is svg?

  • scalable vector graphics
  • crisp on any display
  • less requests to handle
  • easily scalable for responsive
  • less file size for performance
  • easy to animate. has a navigable DOM
  • easy to make accessible
  • well supported across browsers
  • great for loaders