View birthday.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let now = Date.now() / 1000; | |
if ( now > 1504051200 && now < 1504137599) { | |
steve.work = false; | |
steve.beers++; | |
} |
View calculate_reading_time.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* READING TIME | |
* | |
* Calculate an approximate reading-time for a post. | |
* | |
* @param string $content The content to be measured. | |
* @return integer Reading-time in seconds. | |
*/ | |
function reading_time( $content ) { |
View convert_number_to_words.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* DISPLAY NUMBERS | |
* | |
* Convert raw numbers into human-readable words. | |
* | |
* Borrowed (and very much simplified) from: | |
* http://www.karlrixon.co.uk/writing/convert-numbers-to-words-with-php/ | |
* @param integer $number Raw number. | |
* @return string Number as a word. |
View SCSS_linter.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Default application configuration that all configurations inherit from. | |
linters: | |
BorderZero: | |
enabled: true | |
CapitalizationInSelector: | |
enabled: true | |
ColorKeyword: | |
enabled: true |
View SFAP install.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="/path/to/styleFreeAudio.min.js"></script> | |
<script src="/path/to/yourCustom.js"></script> |
View folderStructure.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_uncompressed/ | |
icons/ ~ SVG icons go here | |
scss/ | |
images/ | |
js/ | |
custom/ ~ JS partials live here | |
static/ ~ "static" files are *not* concatenated into app.min.js | |
jquery/ | |
vendor/ ~ plugins etc. These are concatenated into app.min.js |
View gist:2755c26dc685be756a3a
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Fallback if ACF plugin doesn't exist | |
/** | |
* Return a custom field stored by the Advanced Custom Fields plugin | |
* | |
* @global $post | |
* @param str $key The key to look for | |
* @param mixed $id The post ID (int|str, defaults to $post->ID) | |
* @param mixed $default Value to return if get_field() returns nothing | |
* @return mixed | |
* @uses get_field() |