Skip to content

Instantly share code, notes, and snippets.

View cyancey76's full-sized avatar
🏠
Working from home

CJ Yancey cyancey76

🏠
Working from home
View GitHub Profile
@cyancey76
cyancey76 / .htaccess
Created January 27, 2022 17:30
Disable dynamic cache on non-WP Siteground websites
<IfModule mod_headers.c>
Header set Cache-Control "private"
</IfModule>
@cyancey76
cyancey76 / brew-install-script.sh
Last active January 12, 2022 23:57 — forked from CliffordAnderson/brew-install-script.sh
Brew script for installing packages and applications on OSX
#!/bin/sh
# Homebrew Script for OSX
# To execute:
# save in your user folder and `sudo chmod u+x ./brew-install-script.sh && xattr -d com.apple.quarantine ./brew-install-script.sh && ./brew-install-script.sh`
echo "Installing brew..."
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
echo "Installing brew cask..."
@cyancey76
cyancey76 / bootstrap-rfs.css
Created March 23, 2020 04:53
Bootstrap Responsive Font Sizes
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/coliff/bootstrap-rfs/bootstrap-rfs.css">
@media (max-width: 1200px) {
legend {
font-size: calc(1.275rem + 0.3vw);
}
h1,
.h1 {
font-size: calc(1.375rem + 1.5vw);
}
@cyancey76
cyancey76 / delete.sh
Created March 11, 2020 16:41
#Wordpress #function - disable and remove post revisions
wp post delete $(wp post list --post_type='revision' --format=ids)
@cyancey76
cyancey76 / acrobat-highlight-color.js
Created February 4, 2020 19:05
Change Acrobat PDF highlight color
// document open script
var appHighlightInitialValue = app.runtimeHighlight;
var appHighlightInitialColorValue = app.runtimeHighlightColor;
app.runtimeHighlight = true;
app.runtimeHighlightColor = color.transparent;
// document close script
app.runtimeHighlight = appHighlightInitialValue;
app.runtimeHighlightColor = appHighlightInitialColorValue;
@cyancey76
cyancey76 / php-error-reporting.php
Created October 4, 2019 20:20
[PHP Turn Off Error Reporting] #php
error_reporting(0);
@ini_set('display_errors', 0);
@cyancey76
cyancey76 / .htaccess
Created September 19, 2019 16:53
[htaccess force http to https] #htaccess #ssl #https
# Redirect HTTP to HTTPS
RewriteCond %{HTTP:X-Forwarded-Proto} =http
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Redirect HTTPS to HTTP
RewriteCond %{HTTP:X-Forwarded-Proto} =https
RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
@cyancey76
cyancey76 / .htaccess
Last active August 29, 2019 15:41
[Embed HTML5 video in html email] from http://www.emailonacid.com/blog/article/email-development/a_how_to_guide_to_embedding_html5_video_in_email/ -- Need to make sure your server is configured to send the right headers for serving videos https://stackoverflow.com/questions/15656465/html5-video-not-playing-in-firefox #video #HTML #html5 #email
AddType video/ogg .ogv
AddType video/mp4 .mp4
AddType video/webm .webm
AddType audio/mpeg .mp3
AddType audio/ogg .ogg
AddType audio/mp4 .m4a
AddType audio/wav /wav
@cyancey76
cyancey76 / full-width-calc.css
Created July 12, 2019 19:02
Full browser width element with CSS calc()
.container {
max-width: 1200px;
width: calc( 100vw - 4rem );
margin: 0 auto;
}
.container section {
display: block;
max-width: 100%;
}
@cyancey76
cyancey76 / add-js-class.js
Created May 9, 2019 17:23
Add class to HTML tag if Javascript is enabled
document.documentElement.className = "js";