For homebrew version 0.9.5.
brew -v # => Homebrew 0.9.5
Install the current version of mysql.
# Install current mysql version
brew install mysql
jQuery.ajax({ | |
contentType: 'application/json', | |
data: JSON.stringify({"username": "[email protected]", "password": "Qwer1234"}), | |
dataType: 'json', | |
processData: false, | |
type: 'POST', | |
url: 'https://pha-m2-stg.lcgosc.com/rest/default/V1/integration/customer/token' | |
}).done(function (token) { | |
jQuery.ajax({ | |
contentType: 'application/json', |
#!/usr/bin/env php | |
<?php | |
use Symfony\Component\Console\Command\Command; | |
use Symfony\Component\Console\Input\InputInterface; | |
use Symfony\Component\Console\Output\OutputInterface; | |
use Symfony\Component\Console\Application; | |
if (PHP_SAPI !== 'cli') { | |
echo 'dev/run-script.php must be run as a CLI application'; |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
#!/bin/bash | |
# Check if command was ran as root. | |
if [[ $(id -u) -eq 0 ]]; then | |
echo "The command \"sphp\" should not be executed as root or via sudo directly." | |
echo "When a service requires root access, you will be prompted for a password as needed." | |
exit 1 | |
fi | |
# Usage |
Things I had to do using Homebrew to get my local web dev environment back up and running after migration to OSX Sierra + Xcode 8.1.
Note: I used brew reinstall
because I had already installed most of this previously under Yosemite. Probably better ways to do this, but this is what worked for me.
brew doctor
brew tap homebrew/dupes
brew tap homebrew/versions
function multiplyInColumn($a, $b) { | |
$bArr = array_reverse(str_split($b)); | |
$aArr = array_reverse(str_split($a)); | |
$result = array_map(function ($step, $bItem) use ($aArr) { | |
$rest = 0; | |
$result = array_fill(0, $step, 0); |
$k = [ | |
'a/b/c/j', | |
'a/b/c', | |
'a/b/d/q', | |
'a/b/d', | |
'a/b/e', | |
'a/b/c/j', | |
'a/b/c', | |
'a/b/d/q', | |
'a/b/d', |
/** | |
* Retrieve select for reindex products of non anchor categories | |
* | |
* @param Mage_Core_Model_Store $store | |
* @return Varien_Db_Select | |
*/ | |
protected function _getAnchorCategoriesSelect(Mage_Core_Model_Store $store) | |
{ | |
if (!isset($this->_anchorCategoriesSelect[$store->getId()])) { | |
/** @var $eavConfig Mage_Eav_Model_Config */ |