Skip to content

Instantly share code, notes, and snippets.

View joshparkerj's full-sized avatar
🥰

Josh Parker joshparkerj

🥰
View GitHub Profile
@joshparkerj
joshparkerj / scrapage.json
Last active August 25, 2024 06:33
most recent archmage leaderboard scrapage
[
{
"start": "2024-03-03T07:00:00.000Z",
"name": "A Sproson (@asproson)",
"level": 105,
"lessonsSolved": 1212,
"certificates": [
"Learn Shells and Terminals",
"Learn Python",
"Learn Object Oriented Programming",
@joshparkerj
joshparkerj / quick-flowchart.md
Last active August 11, 2024 06:03
quick-flowchart.md
flowchart TD
A[choose shape];
B{Is the shape valid?};
C[call the function for that shape];
D[Display shape not valid];
A ----> B;
B --Yes--> C;
B --No--> D;
D ----> A;
@joshparkerj
joshparkerj / graphs.md
Created June 17, 2024 11:55
graphs from silly-internet-repo

Okay, here's what I've got for a very basic diagram, just showing what calls which (when rendered visually, it's quite the rat's nest hahahahaha):

text effect dependency graph

flowchart TD
 A --> K[General Element]
 A --> L[Element Effect Handler]
 B[Binary] --> H[General Text]
 H --> K
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Danfo&family=Jacquard+12&family=Poetsen+One&display=swap"
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Danfo&family=Jacquard+12&family=Poetsen+One&display=swap"
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>S W A V E</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Danfo&family=Jacquard+12&family=Poetsen+One&display=swap"
<!DOCTYPE html>
<html>
<head>
<title>S W A V E</title>
<style>
body {
overflow: hidden;
margin: 0;
}
function calculateSpecificity(selector) {
// Remove :is(), :not(), and :has() pseudo-classes and retain their parameters
const cleanedSelector = selector.replace(/:(is|not|has)\(([^)]*)\)/g, ' $2 ');
const attributeRegExp = /\[[^\]]*\]/g;
const attributeCount = cleanedSelector.match(attributeRegExp)?.length || 0;
const noAttributes = cleanedSelector.replace(attributeRegExp, '');
const pseudoElementRegExp = /::[^.:#>~+\s]+/g;
const pseudoElementCount = noAttributes.match(pseudoElementRegExp)?.length || 0;
@joshparkerj
joshparkerj / pick-some-stock.py
Created July 19, 2023 13:37
pick some stock
from numpy import random
a = ["AAPL",
"MSFT",
"AMZN",
"NVDA",
"GOOGL",
"TSLA",
"GOOG",
"META",
// ==UserScript==
// @name Sketchify Page!
// @namespace http://tampermonkey.net/
// @version 0.1
// @description use a simple sketch effect on any page
// @author Josh Parker
// @match *://*/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=wikipedia.org
// @grant none
// ==/UserScript==