Skip to content

Instantly share code, notes, and snippets.

View robertannett's full-sized avatar

Robert Annett robertannett

View GitHub Profile
@itsdavidmorgan
itsdavidmorgan / basic-block-styles.css
Last active October 7, 2022 14:05
WordPress Gutenberg Basic Block Styles
/************************************************
Audio Blocks
************************************************/
.wp-block-audio {
margin-left: 0px;
margin-right: 0px;
}
.wp-block-audio audio {
width: 100%;
anonymous
anonymous / index.html
Created November 13, 2017 21:26
Zurb Video Modal - Autoplay on open & Pause on Close
<div class="body text-center">
<div class="reveal" id="exampleModal1" data-reveal>
<video width="100%" controls>
<source src="http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1080p_30fps_normal.mp4" type="video/mp4">
Your browser does not support HTML5 video.
</video>
<button class="close-button" data-close aria-label="Close modal" type="button">
@omurphy27
omurphy27 / echo-enqueued-styles-scripts-wordpress.php
Last active March 8, 2024 07:19
Wordpress - Print Out All Enqueued Scripts And Styles On A Page
<?php
// add the below to your functions file
// then visit the page that you want to see
// the enqueued scripts and stylesheets for
function se_inspect_styles() {
global $wp_styles;
echo "<h2>Enqueued CSS Stylesheets</h2><ul>";
foreach( $wp_styles->queue as $handle ) :
echo "<li>" . $handle . "</li>";
@PardotGists
PardotGists / 2128674-enabling-form-protected-content-to-download-immediately.js
Last active June 2, 2016 13:41
Enable Form Protected Content to Download Immediately.
<script type="text/javascript">
var howLongToWait = 5; //number of seconds to wait
var urlOfDownloadContent = 'http://www.example.com/whitepaper.pdf';
function triggerDownload() {
window.location = urlOfDownloadContent;
}
setTimeout('triggerDownload()', howLongToWait * 1000);
</script>
@joseluisq
joseluisq / terminal-git-branch-name.md
Last active July 4, 2024 15:00
Add Git Branch Name to Terminal Prompt (Linux/Mac)

Add Git Branch Name to Terminal Prompt (Linux/Mac)

image

Open ~/.bash_profile in your favorite editor and add the following content to the bottom.

# Git branch in prompt.

parse_git_branch() {
@jackfruh
jackfruh / Cake3 \.htaccess
Last active March 16, 2019 18:44
htaccess files that worked with CakePHP and 1and1 hosting
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ /webroot/ [L]
RewriteRule (.*) /webroot/$1 [L]
</IfModule>
@asmerkin
asmerkin / Vagrant.bootstrap.sh
Last active June 13, 2022 12:45
A simple LAMP Vagrantfile and Bootstrap file for Vagrant and ubuntu/trusty64 box. It uses mpm-workers and php5-fpm + some extra tools like grunt, gulp and composer.
#!/usr/bin/env bash
# ---------------------------------------
# Virtual Machine Setup
# ---------------------------------------
# Adding multiverse sources.
cat > /etc/apt/sources.list.d/multiverse.list << EOF
deb http://archive.ubuntu.com/ubuntu trusty multiverse
deb http://archive.ubuntu.com/ubuntu trusty-updates multiverse
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
// Get The Page ID You Need
get_option( 'woocommerce_shop_page_id' );
get_option( 'woocommerce_cart_page_id' );
get_option( 'woocommerce_checkout_page_id' );
get_option( 'woocommerce_pay_page_id' );
get_option( 'woocommerce_thanks_page_id' );
get_option( 'woocommerce_myaccount_page_id' );
get_option( 'woocommerce_edit_address_page_id' );
get_option( 'woocommerce_view_order_page_id' );
get_option( 'woocommerce_terms_page_id' );
@aderaaij
aderaaij / yoast
Last active April 3, 2024 20:11
Wordpress - Move yoast seo boxes to bottom of post/page
// Move Yoast to bottom
function yoasttobottom() {
return 'low';
}
add_filter( 'wpseo_metabox_prio', 'yoasttobottom');