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
Product Price index has been rebuilt successfully in 00:00:07 SQLSTATE[23000]: Integrity constraint violation: 1062 | |
Duplicate entry '1066-188-1-524' for key 'PRIMARY', query was: INSERT INTO `catalog_product_index_eav_idx` | |
(`entity_id`,`attribute_id`,`store_id`,`value`) VALUES (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, | |
?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, | |
?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, | |
?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, | |
?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, | |
?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, | |
?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?), (?, |
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
toArray = function(itterable) { | |
return Array.prototype.slice.call(itterable) | |
} | |
toArray(document.querySelectorAll('form')).map(function(form) { | |
let name = form.id | |
? `#${form.id}` | |
: (form.classList.length > 0 | |
? '.' + toArray(form.classList).join('.') | |
: 'form'); |
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 | |
$tenItems = array_map(function ($n) { | |
return substr(md5("$n"), rand(0, 15), rand(5, 20)); | |
}, range(0, 10)); | |
$listTypes = [ | |
'disc', | |
'circle', | |
'square', |
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
# NOTE: Copious convention is to move typical Magento 2 project-root into a ./magento subdirectory | |
# default to vagrant folder when starting shell sessions in VM | |
cd /vagrant | |
# allow aliases to be used | |
shopt -s expand_aliases | |
# add magento and composer bins | |
export PATH+=:magento/bin |
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
# shellcheck disable=SC2148 | |
shush() { | |
local procName matches match binary pid | |
for procName in "$@"; do | |
matches=$(ps aux | grep -i "$procName" | grep -v grep | sed -E 's/[[:space:]]+/ /g') | |
if [[ $matches ]]; then | |
echo "shushing processes that match '$procName'" |
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 lang="en"> | |
<head><meta charset="UTF-8"></head> | |
<!-- Normal script --> | |
<script> | |
// starting in ES5 window.undefined is read-only | |
undefined = 'NOT UNDEFINED' | |
console.log(undefined === window.undefined) // prove that we are scoped to window object (global object in node) | |
console.log(undefined !== 'NOT UNDEFINED') |
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
/* | |
When measuring type in comps using a cross-hair tool you may not | |
always have a descender to check the font-size in pixels, meaning in most cases | |
(especially for all-caps titles) you only have the ability to measure from | |
baseline to cap-height. | |
This algorithm will help you convert that cap-height measurement into the correct | |
font-size within about pixel (often it's less than half a pixel off). | |
Adjust for optics and browser-rendering on case-by-case basis. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
n() { | |
# forward straght to n | |
[[ $# > 0 ]] && { | |
command n "$@" | |
return | |
} | |
# look for a version |
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
cd /vagrant | |
alias mage='n98-magerun.phar' | |
alias cf='mage cache:flush' | |
alias dis='mage cache:disable' | |
alias en='mage cache:enable' | |
alias compare='mage sys:set:compare-v' | |
alias run='mage sys:setup:run' | |
alias xdebugon="sudo sed -i 's~;zend_extension~zend_extension~' /etc/php.d/15-xdebug.ini; sudo service php-fpm restart" | |
alias xdebugoff="sudo sed -i 's~^zend_extension~;zend_extension~' /etc/php.d/15-xdebug.ini; sudo service php-fpm restart" |