Skip to content

Instantly share code, notes, and snippets.

View NotDefinedTech's full-sized avatar

NotDefinedTech

View GitHub Profile
@NotDefinedTech
NotDefinedTech / checkcontrast.sh
Created February 15, 2025 16:28
Color contrast tool for the terminal. Pass in two colors and use the WebAIM API to determine if it is passing/failing each of the categories of standards for accessibility.
#!/bin/bash
# Created by: Jess Brown, youtube.com/@NotDefinedTech
# See:
# written walkthrough: https://www.notdefined.tech/blog/building-a-color-contrast-checker-in-the-terminal/
# video walkthrough: https://youtu.be/7Jx4ib6FGHc
FOREGROUND="${1//#/}"
BACKGROUND="${2//#/}"
# echo "FG: ${FOREGROUND}"
@NotDefinedTech
NotDefinedTech / expressive-web-type-10-19-24.html
Created October 19, 2024 18:40
Sass CSS and the HTML partial from the livestream on 10-19-24
<!-- This is just an HTML partial with what is needed for the styles we worked on -->
<div class="sbs">
<div class="body">
<h2>Do more with what you have.</h2>
<p>The digital landscape from work to home keeps demanding more. It can be overwhelming, discouraging, or exhausting to keep up with all of these digital demands—so we'll explore ways to maintain our humanity with our technology.</p>
<p>Subscribe to the CYBORG_ newsletter make tech an extension of your humanity in just 5 minutes each week.</p>
</div>
<div class="media">
@NotDefinedTech
NotDefinedTech / expressive-web-type-10-5-24.html
Created October 5, 2024 19:29
Playing with expressive web typography from Livestream, 10/5/24
<!-- This is just a partial HTML file with the relevant cards from the styles. This was using Django's templating system to dynamically pull in the headline and summary, but you can always just put your own text in and replace the {{ variables }} -->
<div class="cards">
<div class="card">
<div class="poster">
<div class="stepped-opacity">
<div>{{ headline }}</div>
<div>{{ headline }}</div>
<div>{{ headline }}</div>
<div>{{ headline }}</div>
@NotDefinedTech
NotDefinedTech / obsidian-callouts-reference.md
Created February 24, 2024 23:18
Quick reference for the Obsidian callout aliases (keywords) for each icon / callout theme.
@NotDefinedTech
NotDefinedTech / obsidian-markdown-quick-reference.md
Last active February 25, 2024 18:11
Quick overview of markdown syntax and Obsidian linking

Headings

Use a # and a space at the beginning of a line to turn it into a heading. You can indicate which level of heading by how many # you use. If you're familiar with HTML, it's the same: H1 = #, H2 = ##, etc. up to 6 #

Example:

# Main Topic
...

## Sub Topic
...
@NotDefinedTech
NotDefinedTech / social-media-meta-tags.html
Last active October 25, 2023 22:09
If you want to have a professional, effective website, it should look great when it's shared on social. This snippet will help you get there.
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="YOUR TITLE HERE">
<meta name="twitter:description" content="YOUR DESCRIPTION HERE">
<meta name="twitter:site" content="@YOURTWITTERHANDLE">
<meta name="twitter:image" content="https://www.YOURSITE.com/social-image.png">
<meta name="twitter:creator" content="@YOURTWITTERHANDLE">
<meta property="og:locale" content="en_US">
<meta property="og:type" content="website">
<meta property="og:title" content="YOUR TITLE HERE">
<meta property="og:description" content="YOUR DESCRIPTION HERE">
@NotDefinedTech
NotDefinedTech / get-month-day-year.py
Created July 28, 2022 00:46
How to get the current day, month, or year in Python
#! python3
# How to get the day, month, and year in python
from datetime import datetime as dt
timestamp = dt.now()
print(timestamp.month) # Example output: 7
print(timestamp.day) # Example output: 27
print(timestamp.year) # Example output: 2022
@NotDefinedTech
NotDefinedTech / terminal-markup.code-snippets
Created July 19, 2022 23:50
My VS Code snippets for terminal highlights, colors, etc.
{
"Print in color black": {
"scope": "javascript,typescript,python,shellscript",
"prefix": "clrblack",
"body": [
"\\x1b[30m$1\\x1b[0m",
],
"description": "Console text color black"
},
"Print in color red": {