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
### Keybase proof | |
I hereby claim: | |
* I am alexwoollam on github. | |
* I am awool (https://keybase.io/awool) on keybase. | |
* I have a public key ASCB9laMpb0JT3Yt-SiieYKmTv7PMqX1IdPjNVN_oXPALQo | |
To claim this, I am signing this object: |
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 | |
// =================================================== | |
// Load database info and local development parameters | |
// =================================================== | |
if ( file_exists( dirname( __FILE__ ) . '/local-config.php' ) ) { | |
define( 'WP_LOCAL_DEV', true ); | |
include( dirname( __FILE__ ) . '/local-config.php' ); | |
} else { | |
define( 'WP_LOCAL_DEV', false ); | |
define( 'DB_NAME', '%%DB_NAME%%' ); |
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 | |
/** | |
* Disables comments, Add below to existing function.php file. | |
*/ | |
/** Disable support for comments and trackbacks in post types. */ | |
function df_disable_comments_post_types_support() { | |
$post_types = get_post_types(); | |
foreach ( $post_types as $post_type ) { | |
if ( post_type_supports( $post_type, 'comments' ) ) { |
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 | |
$query = "SELECT * FROM {$wpdb->posts} JOIN {$wpdb->prefix}ai1ec_events on ({$wpdb->prefix}ai1ec_events.post_id={$wpdb->posts}.ID) | |
WHERE post_type='ai1ec_event' AND post_status='publish' AND {$wpdb->prefix}ai1ec_events.start > '".time()."' ORDER BY {$wpdb->prefix}ai1ec_events.start limit 3"; | |
$results = $wpdb->get_results( $query ); // get result form the query | |
ob_start(); | |
foreach($results as $result){ | |
$title = ($result->post_title); // Returns the post type title |
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
#!/bin/sh | |
pipeline { | |
agent any | |
stages { | |
stage('Checkout Repo') { | |
steps { | |
checkout scm | |
} | |
} | |
stage('Build') { |
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
/** | |
* Get start and end of BST. | |
*/ | |
$bst-month = date( 'Y/03/d', strtotime('last sunday of march' ) ); | |
$gmt-month = date( 'Y/10/d', strtotime('last sunday of october' ) ); | |
$event_date_sanitized = $datetime->format( 'Y/m/d' ); | |
if ( $result->allday ){ | |
if ( $event_date_sanitized >= $bst-month && $event_date_sanitized <= $gmt-month ){ | |
$datetime->modify( '+1 day' ); |
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
// Breakpoints (this map lives in variables). | |
$breakpoint:( | |
'xxsmall': 400px, // max-width | |
'xsmall': 400px, // min-width... | |
'small': 600px, | |
'medium': 1000px, | |
'large': 1200px, | |
'xlarge': 1400px, | |
'xxlarge': 1600px, |
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
add_filter( 'timber/loader/loader', function( $loader ){ | |
$loader->addPath( __DIR__ . "/views/components", "components" ); | |
return $loader; | |
} ); | |
// To use the namespace in your Twig template, just include it with an @ prefix. | |
{{ include( '@components/filename.twig' ) }} |
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
body{ | |
// Dev tool, remove once done! // | |
@include media('xs') { | |
&::before{ | |
content: "xs"; | |
position: fixed; | |
top: 0px; | |
height: 20px; | |
width: 100%; | |
background-color: #D9B504; |
OlderNewer