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 / zindex.scss
Last active May 6, 2024 21:42 — forked from fat/gist:1f6da6b3bd0311a1f8a0
medium's z-index scale
// Copyright 2014 A Medium Corporation
//
// z-index.less
// Medium.com's z-index scale. Z-index values should always be defined in z-index.less. This
// allows us to at a glance determine relative layers of our application and prevents bugs
// arrising from arbitrary z-index values. Do not edit the z-index scale! Only add application
// scoped z-index values.
//This is the SASS version modified by @toadkicker.
@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 / gist:7609641
Last active June 18, 2023 19:44
This is the intro in Lion King. 'Pride Rock'. I use it instead of lorem ipsum sometimes.
Ndabe zitha nkosi yethu mholi wezwe lethu lefatshe la bonata rona lea halalela busa le lizwe bo busa le lizwe bo busa le lizwe bo Lethu busa. Ngoxolo is'khathi sifikile is'khathi busa iyo is'khathi sifikile busa lomhlaba is'khathi sifikile is'khathi sifikile. Busa simba busa bimba. Hem na iyo hem na iyo mem na nkosi bo. Busa simba iyo hem na iyo. Oh busa simba iyo Hem na iyo. Oh busa nkosi bo Hem na nkosi bo. Oh busa simba iyo busa simba iyo. Busa simba iyo ubuse ngo thando. Ubuse ngo thando ubuse. Ngo xolo busa simba, busa simba ubuse ngo xolo. Ubuse ngo thando ubuse ngo xolo. Ubuse ngo thando ubuse ngo xolo.
@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>
@toadkicker
toadkicker / gist:2ec47334d42cae7abfca
Created September 18, 2014 13:39
takes a large array, splitting into an array of arrays based on chunkSize
Array.prototype.chunk = function (chunkSize) {
var array = this;
return [].concat.apply([],
array.map(function (elem, i) {
return i % chunkSize ? [] : [array.slice(i, i + chunkSize)];
})
);
}
@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