Skip to content

Instantly share code, notes, and snippets.

View toadkicker's full-sized avatar
🏠
Let's fix some stuff

Todd Baur toadkicker

🏠
Let's fix some stuff
View GitHub Profile
@toadkicker
toadkicker / generate_ssl.bash
Created November 20, 2023 21:12
2023 self signed ssl cert
# change out nodes, subject, text as one sees fit
openssl req -x509 -newkey rsa:4096 -sha256 -days 3650 \
-nodes -keyout host.lan.key -out host.lan.crt -subj "/CN=host.lan" \
-addext "subjectAltName=DNS:host.lan,DNS:*.lan,IP:192.168.1.254"
@toadkicker
toadkicker / README.md
Created October 18, 2021 14:54
Recustive S3 download

S3 download all my things

This is a rough cut of a script to download all the things from an AWS S3 bucket. I wrote it to move files from Digital Ocean to AWS proper.

@toadkicker
toadkicker / code_organization_react.md
Last active December 8, 2020 18:36
Atomic design in code layout

How I organized react apps

This is a design I came up with to incorporate atomic design into the code layout in a project. This has given me the leverage to extract out good parts to cross platform tools and reusable API's for the team. Welcome feedback/additions!

src/
  libs/ **filters, config tools, etc
 modules/
import { Button } from '@material-ui/core';
import CloseIcon from '@material-ui/icons/Close';
import SaveIcon from '@material-ui/icons/Save';
import UndoIcon from '@material-ui/icons/Undo';
import { Formik } from 'formik';
import { i18n } from 'i18n';
import model from 'modules/contact/contactModel';
import React, { Component } from 'react';
import FormSchema from 'view/shared/form/formSchema';
import Spinner from 'view/shared/Spinner';
@toadkicker
toadkicker / rename.sh
Created February 5, 2020 21:27
Rename all file extensions in a directory recursively
/* Rename current directory's *.js files to *.tsx */
find . -name "*.js" -exec bash -c 'mv "$1" "${1%.js}".tsx' - '{}' \;
@toadkicker
toadkicker / twittermute.txt
Created January 24, 2020 22:28 — forked from IanColdwater/twittermute.txt
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@toadkicker
toadkicker / _typography.scss
Created December 3, 2019 15:46
Scaling fonts with px/rem
html,
body {
font-size: 14px !important;
}
h1 {
font-size: 1.602em;
}
h2 {
<template>
<component class="svg-inline--icon" :is="dynamicIcon" />
</template>
<script>
export default {
name: 'Icon',
props: {
icon: {
type: String,
@toadkicker
toadkicker / index.js
Last active April 15, 2019 07:42
Convert Rails i18n YAML fies to JSON using Node. Built for vue-i18n to read json files from `config/locales/` in a Nuxt.js project.
module.exports = {
locales: [
{
code: 'en',
iso: 'en-US',
name: 'English',
file: 'en.json'
}
]
}
@toadkicker
toadkicker / about.html.erb
Last active January 25, 2022 23:56
How to build the simplest static site with Rails (yes I know you can put files in public and call that simpler. This uses the framework)
<p>Hi! I'm an about page. Edit me in views/static_pages/</p>