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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
Locale Identifier | Description | |
---|---|---|
af | Afrikaans | |
af-NA | Afrikaans (Namibia) | |
af-ZA | Afrikaans (South Africa) | |
agq | Aghem | |
agq-CM | Aghem (Cameroon) | |
ak | Akan | |
ak-GH | Akan (Ghana) | |
am | Amharic | |
am-ET | Amharic (Ethiopia) |
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
# | |
# CORS header support | |
# | |
# One way to use this is by placing it into a file called "cors_support" | |
# under your Nginx configuration directory and placing the following | |
# statement inside your **location** block(s): | |
# | |
# include cors_support; | |
# | |
# As of Nginx 1.7.5, add_header supports an "always" parameter which |
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 | |
/** | |
* Custom WordPress function to check if the HTML body `class` attribute | |
* contains one or many specified `className` values. | |
* | |
* @author Davey Jacobson <djacobson@usarugby.org> | |
* @version 1.0.0 | |
*/ | |
if ( ! function_exists( 'body_has_class' ) ) { | |
/** |
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 | |
/** | |
* Constants for the exact number of seconds in any given year and in any given | |
* month on the Gregorian calendar. Meant to be used in place of the current | |
* 'YEAR_IN_SECONDS' and 'MONTH_IN_SECONDS' integrations found in | |
* {@link https://codex.wordpress.org/Easier_Expression_of_Time_Constants|WordPress}. | |
* | |
* @author Davey Jacobson <djacobson@usarugby.org> | |
* @package DJ_Exact_Year_Month_Time_Constants | |
*/ |
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 | |
/** | |
* Simple function to check if it's currently a 'leap year'. | |
* | |
* @return bool True if it is. False if not. | |
*/ | |
function is_leap_year() { | |
// Ensure that '0' isn't read as boolean. | |
$zero = (int) 0; | |
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 | |
/** | |
* From the vessel that was this author... | |
* | |
* "Why this is simply... WONDERFUL! I have now entered this vessel known as | |
* 'GEETHUB' and, yes, my reign is now uponeth your precious CODE! We | |
* now begin the FINAL DELETION!" | |
* | |
* From the vessel that is, once again, this author... | |
* |
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 | |
/** | |
* Use `Lodash` as the drop-in replacement for Underscore in WordPress. | |
* | |
* This script uses the `CDNJS` API to ensure the latest version of Lodash is | |
* always retrieved. By default, Lodash will run only on the WordPress frontend | |
* unless the `$sitewide` parameter is set to `true`. | |
* | |
* @author Davey Jacobson <djacobson@usarugby.org> | |
* @package Davey_Jacobson |
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 | |
/** | |
* This is just a widget template file. Be sure to change everything your | |
* reading to suit your website's needs. | |
* | |
* IF YOU'RE A WORDPRESS NEWB AND DO NOT KNOW WHAT YOU'RE DOING... | |
* | |
* This entire file, with the exception of the lines that contain | |
* `public [static] function` can be modified to whatever you wish. Just be sure | |
* to NOT rename any of the methods contained in this class. For more information, |
OlderNewer