This file contains hidden or 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
export const generateRandomBellCurveData = (size, min = 0, max = 100) => { | |
// Function to add pronounced randomness to the curve | |
const randomize = (val, min, max, noiseLevel = 0.5) => { | |
// Apply random noise based on noise level | |
const noise = (Math.random() * 2 - 1) * noiseLevel; | |
return Math.max(min, Math.min(max, val + noise)); | |
}; | |
// Generate Y values with normal distribution characteristics | |
const yValues = Array.from({ length: size }, (_, i) => { |
This file contains hidden or 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++; | |
} |
This file contains hidden or 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 ) { |
This file contains hidden or 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. |
This file contains hidden or 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 |
This file contains hidden or 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> |
This file contains hidden or 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 |
This file contains hidden or 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() |