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
PORTAL_DOMAIN=localhost | |
SESSION_DRIVER=shared |
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 backToCollections = document.querySelector(".back-to-collections"); | |
console.log(backToCollections); | |
const listParentCollections = () => { | |
backToCollections.style.display = "none"; | |
document.querySelectorAll(".collection-grid-item").forEach((elm) => { | |
let aTag = elm.querySelector("a"); | |
let parentId = elm.dataset.parent; |
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
From terminal: | |
1: yum install epel* | |
2: yum update / yum upgrade | |
3: Add repo source | |
- CentOS and Red Hat Enterprise Linux 6.x | |
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm | |
sudo rpm -Uvh remi-release-6*.rpm |
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
.in-sub-panel #customize-theme-controls .customize-pane-child.current-panel-parent, | |
#customize-theme-controls .customize-pane-child.current-section-parent { | |
-webkit-transform: translateX(-100%); | |
-ms-transform: translateX(-100%); | |
transform: translateX(-100%); | |
} |
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 base64_png($data, $filename) { | |
$img = str_replace('data:image/png;base64,', '', $data); | |
$img = str_replace(' ', '+', $img); | |
$data = base64_decode($img); | |
return file_put_contents($filename, $data); | |
} | |
$filename = __DIR__ . '/' . uniqid() . '.png'; |
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 | |
/** | |
* Some basics for creating your own rewrite rules in WordPress. Taken from | |
* my WordHub plugin. | |
*/ | |
class Whatever { | |
function init() { | |
add_action( 'rewrite_rules_array', array( $this, 'rewrite_rules_array') ); | |
add_filter( 'query_vars', array( $this, 'query_vars' ) ); |
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
/** | |
* Format a number with grouped thousands | |
* | |
* @param number The number being formatted | |
* @param decimals Sets the number of decimal points | |
* @param dec_point Sets the separator for the decimal point | |
* @param thousands_sep Sets the thousands separator | |
* @returns string A formatted version of number | |
*/ | |
function number_format( number, decimals, dec_point, thousands_sep ) { |