Skip to content

Instantly share code, notes, and snippets.

View mattdanielbrown's full-sized avatar

Matt Daniel Brown mattdanielbrown

View GitHub Profile
@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.

@mattdanielbrown
mattdanielbrown / custom-dial-range-input-control.markdown
Created August 1, 2022 13:33
Custom Dial (Range) Input Control
@mattdanielbrown
mattdanielbrown / nucleo-svg-icon-transition-script.js
Last active July 31, 2022 05:52
nucleo-svg-icon-transition-script.js : Nucleo javascript used to create interactive (2-state, transitioning) SVG icons.
!function() {
"use strict";
if (!window.requestAnimationFrame) {
var a = null;
window.requestAnimationFrame = function(t, i) {
var e = (new Date).getTime();
a || (a = e);
var s = Math.max(0, 16 - (e - a)),
n = window.setTimeout(function() { t(e + s) }, s);