Skip to content

Instantly share code, notes, and snippets.

@gellerby
gellerby / 0_reuse_code.js
Created January 4, 2016 20:10
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
<?php $cssupdate = '20150318'; ?>
<?php if ( isset($_COOKIE[ 'csscached']) && $_COOKIE[ 'csscached'] == $cssupdate ) : ?>
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/style.css?v=<?php echo $cssupdate; ?>">
<?php else : ?>
<style>
<?php include( bloginfo('template_directory') . '/css/critical.css'); ?>
</style>
<script>
/* Load critical CSS and cache stylesheet */
(function(win, doc) {