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
const path = require(`path`) | |
const { | |
postData, | |
} = require('../src/fragments/data.js'); | |
require("dotenv").config({ | |
path: `.env.${process.env.NODE_ENV}`, | |
}) |
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 | |
function hide_public_site( $template) | |
{ | |
wp_redirect( wp_login_url(), 301 ); | |
exit; | |
} | |
add_action('template_include', 'hide_public_site'); |
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
rsync -rave "ssh -i /Users/path/pemfile.pem" localDistFolder/ ubuntu@myAmazonec2server:/var/www/productionDistFolder/ |
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
select wp_postmeta.post_id, meta_value as 'authorid', user_login, post_title, post_type, post_modified, post_date | |
from wp_postmeta | |
inner join wp_posts | |
on wp_posts.ID = post_id | |
inner join wp_users | |
on wp_users.ID = meta_value | |
where meta_key ='_edit_last' | |
order by post_modified desc |
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 | |
include('wp-load.php'); | |
$post = get_post(2); | |
setup_postdata( $post ); | |
?> | |
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3> |
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 | |
// check if the repeater field has rows of data | |
if( have_rows('related_pages') ): | |
// loop through the rows of data | |
while ( have_rows('related_pages') ) : the_row(); | |
$postobject = get_sub_field('page'); |
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
// Existing function is T2.page.popup.open(number) | |
T2.page.popup.open = (function(_super) { | |
return function(popupNumber) { | |
// 1. Add in your custom code here | |
// e.g someting.completePage() | |
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
var aFunc = []; | |
function callback(delay) { | |
setTimeout(function() { | |
if (aFunc.length > 0) { | |
console.log(aFunc.length) | |
aFunc[0](); | |
aFunc.shift(); |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure(2) do |config| | |
# The most common configuration options are documented and commented below. | |
# For a complete reference, please see the online documentation at |
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
execute pathogen#infect() | |
syntax enable | |
colorscheme solarized | |
hi Normal ctermbg=NONE |
NewerOlder