Skip to content

Instantly share code, notes, and snippets.

View mattdanielbrown's full-sized avatar

Matt Daniel Brown mattdanielbrown

View GitHub Profile
@mattdanielbrown
mattdanielbrown / bash_script_usage_v2.template.sh
Last active December 11, 2023 22:02
Bash Script USAGE (function, message, text content) TEMPLATE ( and/or example ... ) [ >> VERSION 2.1 ]
#===============================================================================
# NAME : bash_script_usage_v2.template.sh
# VERSION : 2.1.0
# CREATED : Dec 12 23:41:26 CST 2022
# AUTHOR : Matt Daniel Brown <dev@mattbrown.email>
# WEB : gist.github.com/mattdanielbrown/f00f119358b57a20ca9db67718dfbaf3
#-------------------------------------------------------------------------------
# USAGE : Copy the `usage()` function below and paste into your bash script
# ... and then, replace the details as is appropriate for your script.
#===============================================================================
@mattdanielbrown
mattdanielbrown / bash_script_usage.template.sh
Created December 13, 2022 05:36
Bash Script USAGE (function, message, text content) TEMPLATE ( and/or example ... )
# Print usage
usage() {
echo -n "${scriptName} [OPTION]... [FILE]...
NAME
==============================================================================
The Full Name
• Expanded or 'Friendly' : Name Of The Script/App/Project
@mattdanielbrown
mattdanielbrown / bashColorCodeVariables.sh
Created December 13, 2022 05:33
BASH COLOR ESCAPE CODES - Variable definition, array usage, functions, ect. --- [SCRATCH PAD, WIP (alpha) ]
#!/usr/bin/env bash
function define_color_escape_code_variables() {
# black='\e[0;30m'
export black='\e[30m'
export red='\e[31m'
export green='\e[32m'
export brown='\e[33m'
@mattdanielbrown
mattdanielbrown / index.html
Created October 21, 2022 20:45
textarea auto height
<textarea rows="1">Here is a very long value for testing auto height</textarea>
<pre><code class="language-js">document.querySelectorAll('textarea').forEach(el => {
el.style.height = el.setAttribute('style', 'height: ' + el.scrollHeight + 'px');
el.classList.add('auto');
el.addEventListener('input', e => {
el.style.height = 'auto';
el.style.height = (el.scrollHeight) + 'px';
});
});</code></pre>
@mattdanielbrown
mattdanielbrown / index.html
Last active October 5, 2022 15:24
Log In / Sign Up - pure css - #12
<a href="https://front.codes/" class="logo" target="_blank">
<img src="https://assets.codepen.io/1462889/fcy.png" alt="">
</a>
<div class="section">
<div class="container">
<div class="row full-height justify-content-center">
<div class="col-12 text-center align-self-center py-5">
<div class="section pb-5 pt-5 pt-sm-2 text-center">
@mattdanielbrown
mattdanielbrown / common-mobile-first-media-queries-using-rem-units.css
Last active September 8, 2022 19:33
Quick Common Mobile-First Media Queries (*using REM units*)
/**
* The Mobile First is the design strategy that takes
* priority development for mobile devices like
* smartphones and tablets. It means all styles outside
* of a media queries apply to all devices, then larger
* screens are targeted for enhancement.
*
* This prevents small devices from having to parse
* tons of unused CSS.
@mattdanielbrown
mattdanielbrown / comprehensive-html-head-content-for-pwa-webapps.markdown
Created August 11, 2022 14:01
Comprehensive HTML Head Content For PWA (WebApps)

Comprehensive HTML Head Content For PWA (WebApps)

Comprehensive HTML Head Content For Progressive Web Applications (WebApps).

A Pen by Matt Daniel Brown on CodePen.

License.