Skip to content

Instantly share code, notes, and snippets.

View ajhyndman's full-sized avatar

Andrew Hyndman ajhyndman

View GitHub Profile
@ajhyndman
ajhyndman / 0_reuse_code.js
Last active August 29, 2015 14:17
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@ajhyndman
ajhyndman / image-panels-flexbox.css
Last active May 15, 2016 08:13
Image Widget Clickable Panels (Deprecated)
/*** Clickable Panels ***/
#clickable-panels-wrap {
overflow: auto;
}
#clickable-panels-wrap > .clickable-panels {
float: left;
}
@ajhyndman
ajhyndman / flexbox-compatibility-syntax.css
Last active May 15, 2016 08:13
multi-browser support for flexbox
#espresso-thank-you-page-overview-dv {
display: -webkit-box; /* Syntax for very old safari browsers - seems to cause conflict on Galaxy S3 "Internet app" though */
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-box-orient: vertical;
flex-flow: column;
}
@ajhyndman
ajhyndman / google-maps-filler.html
Last active May 15, 2016 08:13
Google Map Filler Text
<a href="https://support.google.com/maps/answer/3544418?hl=en">Click here</a> for instructions to embed a google map!
@ajhyndman
ajhyndman / wordpress-logout.php
Created April 22, 2015 06:04
Wordpress Logout Button
<?php if ( is_user_logged_in() ) : ?>
<a href="<?php echo wp_logout_url( get_permalink() ); ?>">Log Out</a>
<?php endif; ?>
@ajhyndman
ajhyndman / responsive menu icon.css
Last active May 15, 2016 08:13
Set responsive dropdown icon image.
/* White Icon */
select.nav-1-chosen-select {
background-image: url('images/menu-icon-white.png');
background-position: 10px center;
background-size: 20px;
background-repeat: no-repeat;
padding-left: 35px;
}
/* Black Icon */
@ajhyndman
ajhyndman / .htaccess
Created April 28, 2015 05:52
Force PDF Download
<FilesMatch "\.(?i:pdf)$">
ForceType application/octet-stream
Header set Content-Disposition attachment
</FilesMatch>
@ajhyndman
ajhyndman / widget-agnostic-panels.css
Last active May 15, 2016 08:12
Clickable Panels built on ANY Widgets
.extra-container-wrap.clickable-panels {
/* Backgrounds and Styling*/
/* TODO: EDIT THIS */
}
.clickable-panels.extra-container {
margin: auto;
max-width: 960px;
}
@ajhyndman
ajhyndman / modernizr.html
Created May 9, 2015 02:00
Cloudflare Modernizr Script Link
<script src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js"></script>
@ajhyndman
ajhyndman / custom-font-enqueue.php
Last active May 15, 2016 08:12
Function call to enqueue a google (or other custom) font in a wordpress theme.
**
* Enqueue custom fonts.
*/
function custom_fonts() {
/* TODO: UPDATE THEME VERSION NUMBER AND ADD YOUR OWN FONT STYLES */
wp_enqueue_style( 'genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '1.0' );
wp_enqueue_style( 'google-fonts', '//fonts.googleapis.com/css?family=Josefin+Sans:300,400,600,300italic,400italic,600italic', array(), '1.0' );
}