Skip to content

Instantly share code, notes, and snippets.

View marchershey's full-sized avatar

Marc Hershey marchershey

View GitHub Profile
@marchershey
marchershey / Prevent FOUC (Flash of unstyled content).md
Last active July 2, 2022 02:32
Prevent FOUC (Flash of unstyled content)

Prevent FOUC (Flash of unstyled content)

A flash of unstyled content (FOUC, also flash of unstyled text) is an instance where a web page appears briefly with the browser's default styles prior to loading an external CSS stylesheet, due to the web browser engine rendering the page before all information is retrieved.

What I like to do to prevent FOUC is to set the <html> tag to have a style of disply:none;. Then at the end of my javascript file (which is defered), I will fade in the <html> tag.

Example:

@marchershey
marchershey / laravel-setup.md
Created March 24, 2022 00:09
Laravel Setup
  1. Run curl -s "https://laravel.build/app?with=mysql" | bash
  2. Run cd app
  3. Run mv * ../ to move all files to parent directory
  4. Run docker run --rm -u "$(id -u):$(id -g)" -v $(pwd):/var/www/html -w /var/www/html laravelsail/php81-composer:latest composer install --ignore-platform-reqs

Still updating...

@marchershey
marchershey / webdevknowledge.md
Last active January 29, 2022 04:00
Web Development Knowledge Base

Commit and PR Types

Format: <type>(<scope>): <subject>

  • <scope> would be something like edit:(design) changed the styling of header on the base layout

Example

feat: added ability to edit users
^--^ ^------------^
@echo off
setlocal enableextensions enabledelayedexpansion
:: ------------------------------------------------
:: Variables
:: ------------------------------------------------
SET Title=Prison Island Server
SET SteamLogin=bdzserver BDZserver123
@marchershey
marchershey / import-github-labels.js
Last active April 6, 2020 13:07 — forked from Isaddo/import-github-labels.js
import github labels via console command
[
{
"name": "-priority:critical",
"description": "An issue with critical priority",
"color": "ee0701"
},
{
"name": "-priority:high",
"description": "An issue with high priority",
"color": "f7f700"
@marchershey
marchershey / README-Template.md
Created April 9, 2018 10:18 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

<!DOCTYPE html>
<html lang="en">
<head>
<title>Project Name</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<!-- Style -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.0-1/js/all.js" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous" />