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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Hello World!</title> | |
<link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:400italic,400,700' rel='stylesheet' type='text/css'> | |
<link href='http://grommet.io/assets/latest/css/grommet.min.css' rel='stylesheet' type='text/css'> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.2/react.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.2/react-dom.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.23/browser.min.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
<?php | |
// Load WordPress | |
require_once 'path/to/www/wp-load.php'; | |
require_once ABSPATH . '/wp-admin/includes/taxonomy.php'; | |
// Set the timezone so times are calculated correctly | |
date_default_timezone_set('Europe/London'); | |
// Create post |
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 | |
/** | |
* This is a straightforward example of what a ThemeClass may look like. It contains all the | |
* expected initialization, and wp_enqueue_script calls. | |
*/ | |
class ThemeClass | |
{ | |
protected $wp; | |
protected $themeDirectory; |
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 | |
/** | |
* @package One_Fix_Switch_Theme | |
* @version 1.0 | |
*/ | |
/* | |
Plugin Name: One Fix Switch Theme | |
Plugin URI: https://www.1fix.io | |
Description: Switch theme on certain pages. | |
Author: Yoren Chang |
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
... | |
action_with_slack_notification = %(banaction)s[name=%(__name__)s, port="%(port)$ | |
slack[name=%(__name__)s] | |
action = %(action_with_slack_notification)s | |
... |
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
$('.tab a').on('click', function(){ | |
if ($(this).html() == 'FACEBOOK' && typeof xx == 'undefined') { | |
// DUMMY VARIABLE TO CALL THE FUNCTION ONLY THE FIRST TIME THE USER CLICKS THE TAB: | |
xx = 1; | |
(function(d, s, id) { | |
var js; | |
var fjs = d.getElementsByTagName(s)[0]; | |
if (d.getElementById(id)) return; |
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
Show hidden characters
{ | |
"presets": ["env"], | |
"plugins": [ | |
["transform-react-jsx", { "pragma":"h" }] | |
] | |
} |
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
[Unit] | |
Description=Demo variable passing inside oneshot service | |
[Service] | |
Type=oneshot | |
ExecStartPre=/bin/bash -c 'systemctl set-environment DATE_%i=`date +%%T`' | |
ExecStart=/bin/bash -c 'systemctl show-environment' | |
ExecStop=/bin/bash -c 'systemctl set-environment DATE_%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
<?php | |
add_filter( 'option_active_plugins', 'test_blacklist_unneeded_plugins', 40 ); | |
function test_blacklist_unneeded_plugins( $plugins ) { | |
// We don't apply blacklisting to logged in users to prevent plugin deactivation | |
if( isset( $_SERVER['HTTP_COOKIE'] ) && is_user_logged_muplugin() ) { | |
return $plugins; | |
} |
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
<!--Example JS template--> | |
<script type="text/template" id="PastCommunityTemplate"> | |
<img class="pvs-cmy-img" src="<%= thumbnail %>" alt="<%= name %>"> | |
<h3 class="pvs-cmy-title"><%= name %></h3> | |
<h4 class="pvs-cmy-city">City: <%= city %></h4> | |
<p class="pvs-cmy-description"><%= summary %></p> | |
</script> |
OlderNewer