Skip to content

Instantly share code, notes, and snippets.

View eric-mathison's full-sized avatar

Eric Mathison eric-mathison

  • TN
View GitHub Profile
@eric-mathison
eric-mathison / remove_solar_putty.bat
Created April 29, 2021 22:14
Remove Solar Putty Script (thanks to Richard John) - modified for v4
REM ------------------------------------------------------------------------------
REM @Author: Richard John
REM @Version: 3.0
REM
REM Deletes the Solar-PuTTY directory
REM Deletes the Solar-PuTTY shortcut
REM Deletes all jump list items from the Start menu
REM Deletes the data.dat file
REM Deletes logs
REM Deletes registry entry of the Solar-PuTTY tool
@eric-mathison
eric-mathison / form.js
Created May 17, 2020 04:38
useForm Hook for forms in Bootstrap
import useForm from './useForm';
function Form() {
const callback = () => {
console.log(values);
};
const { values, handleChange, handleSubmit, validated } = useForm(callback);
return (
@eric-mathison
eric-mathison / _opacity-helpers.scss
Created May 16, 2020 17:03
SASS helper for adding opacity classes
// Base opacity to start with
$base: 0;
@while $base < 1 {
$base: $base + 0.05;
.o-#{$base * 100} {
opacity: #{$base};
}
}
@eric-mathison
eric-mathison / _text-helpers.scss
Created May 16, 2020 16:50
SASS helper for adding classes to adjust text size
// Base Font size (in rem)
$baseFontSize: 1;
// Multipliers for available font sizes
// Add additional multipliers for more font size choices
$multipliers: (1: 0.25, 2: 0.5, 3: 0.75, 4: 1, 5: 1.5, 6: 2, 7: 2.5, 8: 3, 9: 3.5, 10: 4);
@each $index, $multiplier in $multipliers {
.text-#{$index} {
font-size: #{$multiplier}rem !important;
@eric-mathison
eric-mathison / _margin-helpers.scss
Created May 15, 2020 17:47
SASS helper for margin spacing
// Spacing options (in rem)
$spacing: (1, 2, 3, 4, 5, 6, 7, 8);
// Available positions
$margins: (top, bottom, left, right);
@each $space in $spacing {
@each $margin in $margins {
.m#{str-slice($margin, 0, 1)}-#{$space} {
margin-#{$margin}: #{$space}rem !important;
@eric-mathison
eric-mathison / _border-widths-helpers.scss
Created May 15, 2020 17:15
SASS helper for border widths
// Specify widths (in px) for available borders
$widths: (1, 2, 3, 4, 5, 6, 7, 8);
@each $width in $widths {
.bw-#{$width} {
border-width: #{$width}px !important;
}
}
@eric-mathison
eric-mathison / _positions-helpers.scss
Last active May 16, 2020 02:40
SASS helper for creating position spacing
// Amount in (rem) for spacing options
$spacing: (1, 2, 3, 4, 5, 6);
// Available positions
$positions: (top, bottom, left, right);
@each $space in $spacing {
@each $position in $positions {
.#{$position}-#{$space} {
#{$position}: #{$space}rem !important;
@eric-mathison
eric-mathison / states.md
Last active April 24, 2020 03:02
List of States with Abbreviations
State Abbr.
Alabama AL
Alaska AK
Arizona AZ
Arkansas AR
California CA
Colorado CO
Connecticut CT
Delaware DE
@eric-mathison
eric-mathison / php-pools.md
Last active September 19, 2019 04:49 — forked from holmberd/php-pools.md
Adjusting child processes for PHP-FPM (Nginx)

Adjusting child processes for PHP-FPM (Nginx)

When setting these options consider the following:

  • How long is your average request?
  • What is the maximum number of simultaneous visitors the site(s) get?
  • How much memory on average does each child process consume?

Determine if the max_children limit has been reached.

  • sudo grep max_children /var/log/php?.?-fpm.log.1 /var/log/php?.?-fpm.log
@eric-mathison
eric-mathison / .env
Created January 11, 2018 10:20
Chatfuel Template Clone Api - NodeJS
BEARER=<Insert your Bearer Auth Token Here>