Skip to content

Instantly share code, notes, and snippets.

View miclgael's full-sized avatar
🐱
Looking at pictures of my cats

Michael Gale (he/him) miclgael

🐱
Looking at pictures of my cats
View GitHub Profile
@miclgael
miclgael / user-script.js
Last active December 2, 2023 02:38
Storybook 7 - global style leak fix
// ==UserScript==
// @name Storybook global style fix
// @namespace Violentmonkey Scripts
// @match http://localhost:6006/
// @grant none
// @version 1.0
// @author Michael Gale <https://www.michaelgale.dev>
// @description Fixes global style leaking into your components in Storybook 7 by harshly removing the offending style tag from the iframe.
// ==/UserScript==
@miclgael
miclgael / table.html
Last active August 2, 2023 07:05
Summary for the table on https://axesslab.com/toggles-suck/
<table>
<tbody>
<tr>
<th>Feature</th>
<td>Toggle</td>
<td>2 Toggle buttons</td>
<td>3+ Toggle buttons</td>
<td>Checkbox</td>
<td>Radio group</td>
</tr>
@miclgael
miclgael / docker-compose.yml
Created May 3, 2023 04:27 — forked from kizzx2/docker-compose.yml
Restart a docker container periodically with docker-compose
version: '3'
services:
app:
image: nginx:alpine
ports: ["80:80"]
restart: unless-stopped
restarter:
image: docker:cli
volumes: ["/var/run/docker.sock:/var/run/docker.sock"]
@miclgael
miclgael / actual-budget-temp-dark-mode.user.js
Created April 7, 2023 04:47
Temporary Dark mode Greasemonkey script, originally for Actual Budget
// ==UserScript==
// @name ActualBudget - Temporary Dark-mode script
// @version 0.0.1
// @grant GM_log
// @include // <YOUR_INSTANCE_URI_HERE>
// @run-at document-end
// ==/UserScript==
console.log('GreaseMonkey: ActualBudget - Temporary Dark-mode script by @miclgael');
@miclgael
miclgael / formspree-exporter.user.js
Created January 31, 2023 00:22
Greasemonkey Formspree Exporter
// ==UserScript==
// @name Formspree Exporter
// @version 0.0.1
// @grant GM_log
// @include https://formspree.io/forms/*/submissions
// @run-at document-end
// ==/UserScript==
console.log('GreaseMonkey: Formspree Exporter by @miclgael');
@miclgael
miclgael / semantic-commit-messages.md
Created October 18, 2022 01:55 — forked from joshbuchea/semantic-commit-messages.md
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@miclgael
miclgael / .zshrc
Created June 1, 2022 00:19
Package manager-agnostic dev command
# Package manager-agnostic dev command
# 1. Add to your ~/.bashrc or ~/.zshrc file
# 2. Just type `dev`
dev() {
if [ -e yarn.lock ]
then
yarn run dev
else
npm run dev
fi
@miclgael
miclgael / 1-global-symbol-list.html
Last active March 7, 2022 21:47
SVG Symbol Definitions
<svg aria-hidden="true" style="position: absolute; width: 0; height: 0; overflow: hidden;" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<symbol id="icon-home" viewBox="0 0 32 32">
<path d="M32 18.451l-16-12.42-16 12.42v-5.064l16-12.42 16 12.42zM28 18v12h-8v-8h-8v8h-8v-12l12-9z"></path>
</symbol>
<!-- etc. -->
<symbol>
<path></path>
</symbol>
@miclgael
miclgael / deploy.sh
Created March 3, 2022 00:14
Deployment Countdown
# DEPLOY TO PRODUCTION
# READS FROM .env file
# e.g. $APP_DEPLOY_HOST
# e.g. $APP_DEPLOY_PATH
# check for .env
if [ -f .env ]; then
# Load environment variables
export $(cat .env | grep -v '#' | awk '/=/ {print $1}')
echo 'Reading vars from .env file'
@miclgael
miclgael / lib.json
Last active October 19, 2021 02:04
Link In Bio
[
{
"url": "https://www.github.com/miclgael",
"icon": "🌐",
"text": "Github"
},
{
"url": "https://www.twitter.com/michaelgale_dev",
"icon": "🐦",
"text": "Twitter"