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
/** | |
* Middleware to check a user token | |
* @param {Object} req Express request object | |
* @param {Object} res Express response object | |
* @param {Function} next Express response object | |
*/ | |
function authCheck(req, res, next) { | |
const token = req.signedCookies.token | |
if (token && token !== 'null') { |
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
#!/bin/bash | |
# Default options | |
LOCALE="fr_FR" | |
DB_HOST='localhost' | |
VIRUSTOTAL_KEY='YOUR_KEY' | |
printf "Name of the project? cf My Project: " | |
read PROJECT_NAME |
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 | |
/** | |
* Plugin Name: Disable ACF on Front-End | |
* Description: Provides a performance boost if ACF front-end functions aren't being used. | |
* Version: 1.0 | |
* Author: Honeycomb Creative | |
* Author URI: https://www.billerickson.net/code/disable-acf-frontend/ | |
* License: MIT | |
* License URI: http://www.opensource.org/licenses/mit-license.php | |
*/ |
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
/* global google */ | |
import $ from 'jquery'; | |
class GoogleMap { | |
constructor(el) { | |
this.el = $(el); | |
this.icon = { | |
path: 'M25,0C15.957,0,8.625,7.277,8.625,16.253C8.625,31.638,25,50,25,50s16.375-17.37,16.375-33.747 C41.375,7.277,34.044,0,25,0z M25,23.084c-3.383,0-6.125-2.742-6.125-6.125s2.742-6.125,6.125-6.125s6.125,2.742,6.125,6.125 S28.383,23.084,25,23.084z', | |
fillColor: '#ed1c2e', | |
fillOpacity: 1, |
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 | |
$post_type = 'post_type'; | |
$taxonomy = 'taxonomy'; | |
$terms = get_terms( $taxonomy ); | |
?> | |
<?php | |
if ( ! empty( $terms ) && ! is_wp_error( $terms ) ) { | |
foreach ( $terms as $term ) { ?> |
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
@media print { | |
* { | |
&:before, | |
&:after { | |
background: transparent !important; | |
color: $black !important; // Black prints faster | |
text-shadow: none !important; | |
box-shadow: none !important; | |
} | |
} |