Skip to content

Instantly share code, notes, and snippets.

Let's fix some stuff

Todd Baur toadkicker

Let's fix some stuff
View GitHub Profile
toadkicker /
Last active Dec 8, 2020
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!

  libs/ **filters, config tools, etc
View gist:2f13ef289b8b0931e002a9141de14c71
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 /
Created Feb 5, 2020
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 / twittermute.txt
Created Jan 24, 2020 — forked from IanColdwater/twittermute.txt
Here are some terms to mute on Twitter to clean your timeline up a bit.
View twittermute.txt
Mute these words in your settings here:
toadkicker / _typography.scss
Created Dec 3, 2019
Scaling fonts with px/rem
View _typography.scss
body {
font-size: 14px !important;
h1 {
font-size: 1.602em;
h2 {
View Vue SVG Icons
<component class="svg-inline--icon" :is="dynamicIcon" />
export default {
name: 'Icon',
props: {
icon: {
type: String,
toadkicker / index.js
Last active Apr 15, 2019
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.
View index.js
module.exports = {
locales: [
code: 'en',
iso: 'en-US',
name: 'English',
file: 'en.json'
toadkicker / about.html.erb
Last active Jan 13, 2019
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)
View about.html.erb
<p>Hi! I'm an about page. Edit me in views/static_pages/</p>
toadkicker / circle.yml
Last active Aug 29, 2018
CircleCI 2.0 configuration for Ruby on Rails 5.1+ with headless chromedriver
View circle.yml
# Ruby CircleCI 2.0 configuration file
# Check for more details
version: 2
# specify the version you desire here
- image: circleci/ruby:2.5.1-node-browsers
View Sort a csv with headers
(head -n 2 <file> && tail -n +3 <file> | sort) > newfile