Skip to content

Instantly share code, notes, and snippets.

View MrGrigri's full-sized avatar
🛠️
working hard

Michael Richins MrGrigri

🛠️
working hard
View GitHub Profile
@MrGrigri
MrGrigri / README.md
Created April 24, 2024 18:41
Light Dark Color scheme/palette
@MrGrigri
MrGrigri / reset.css
Created April 23, 2024 22:10
Modern CSS Reset
@layer reset {
/*
Josh's Custom CSS Reset
https://www.joshwcomeau.com/css/custom-css-reset/
*/
/* Modified by Michael Richins */
:where(*, *::before, *::after) {
box-sizing: border-box;
}
@MrGrigri
MrGrigri / README.md
Last active April 23, 2024 16:10
Vanilla JavaScript Router

Simple vanilla JavaScript router

This is a very minimal router to be used in a vanilla JavaScript project. There are only two exposed functions and one options object.

I have used this with a simple ViteJs web server.

Functions

initializeRoutes(routes, options): This function will initialize the routing. A routes object must be passed as well as an optional options object. goToRoute(route): This function is to be called in JavaScript and will navigate to the route.

@MrGrigri
MrGrigri / animated-outline.css
Last active October 19, 2022 23:20
Used to animate the outline offset when an interactive element receives focus only when it's visible.
:root {
--outline-color: #346ebd;
--outline: 2px solid var(--outline-color);
}
* {
outline-offset: -2px;
}
*:not(:active):focus-visible {
@MrGrigri
MrGrigri / HTML Datalist of US States
Last active September 23, 2022 14:26
List of US State in HTML Datalist format. Other list are: territories, federal district, and military shipping areas
<datalist id="us_states">
<option value="al" label="Alabama">Alabama</option>
<option value="ak" label="Alaska">Alaska</option>
<option value="az" label="Arizona">Arizona</option>
<option value="ar" label="Arkansas">Arkansas</option>
<option value="ca" label="California">California</option>
<option value="co" label="Colorado">Colorado</option>
<option value="ct" label="Connecticut">Connecticut</option>
<option value="de" label="Delaware">Delaware</option>
<option value="fl" label="Florida">Florida</option>
@MrGrigri
MrGrigri / uuid.service.ts
Last active July 2, 2019 15:55
Simple Angular UUID management service. This ensures that a UUID is unique to the application by tracking all UUIDs in an app.
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root',
})
export class IdService {
public ids: string[] = [];
constructor() {}
@MrGrigri
MrGrigri / md-color-palette.css
Last active October 23, 2024 02:12
Material Design Color Palette in CSS Variable Form
:root {
--material-color-red: #f44336;
--material-color-red-50: #ffebee;
--material-color-red-100: #ffcdd2;
--material-color-red-200: #ef9a9a;
--material-color-red-300: #e57373;
--material-color-red-400: #ef5350;
--material-color-red-500: var(--material-color-red);
--material-color-red-600: #e53935;
--material-color-red-700: #d32f2f;
@MrGrigri
MrGrigri / gist-reveal.it-slides.html
Last active March 1, 2018 16:28 — forked from ryanj/gist-reveal.it-slides.html
Gist-powered Revealjs slideshow presentations http://gist-reveal.it
<section data-background-transition='zoom' data-transition='concave' data-background='http://ryanjarvinen.com/presentations/shared/img/broadcast_reveal_dark.png' data-state='blackout'>
<h2>Gist-Powered by Mike</h2>
<h1>Reveal.js</h1>
<h2>Slideshow Presentations</h2>
<br/>
<h1 class='fragment grow'><a style='color:deepskyblue;' href='http://gist-reveal.it'>gist-reveal.it</a></h1>
</section>
<section data-background-transition='zoom' data-transition='linear' id='try-it'>
<h2>Try it out!</h2>
<p>Create your own deck by forking a copy of <a href='https://gist.github.com/ryanj/af84d40e58c5c2a908dd'>this github gist</a>: <br /><a href='https://gist.github.com/ryanj/af84d40e58c5c2a908dd'>https://gist.github.com/ryanj/af84d40e58c5c2a908dd</a></p>
@MrGrigri
MrGrigri / Flexbox Mixins for SCSS
Last active August 26, 2015 22:44
This is a simple mixin library for SCSS
@mixin flexbox() {
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
}
@mixin flexDirection($direction: row) {
$boxOrient: horizontal;
@MrGrigri
MrGrigri / RemoveOpenWithSublimeText3.bat
Created August 13, 2015 15:42
Remove "Open with Sublime Text 3" context menu in File Explorer for Windows 10
@echo off
@reg delete "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3"
@reg delete "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3"
@reg delete "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command"
@reg delete "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3"
@reg delete "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3"
@reg delete "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3\command"