-
Open the Terminal
-
Use
mysqldump
to backup your databases -
Check for MySQL processes with:
ps -ax | grep mysql
-
Stop and kill any MySQL processes
-
Analyze MySQL on HomeBrew:
brew remove mysql
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
#!/usr/bin/env bash | |
# | |
# Vagrant nginx & php-fpm | |
# Vagrant basic bootstrap.sh file configuration for getting a ready to use dev solution | |
# | |
# Ivan Zinovyev <vanyazin@gmail.com> | |
# | |
# (The "ubuntu/trusty64" box was used and tested) | |
# |
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 | |
class DPD_service | |
{ | |
public $arMSG = array(); // массив-сообщение ('str' => текст_сообщения, 'type' => тип_сообщения (по дефолту: 0 - ошибка) | |
private $IS_ACTIVE = 1; // флаг активности сервиса (0 - отключен, 1 - включен) | |
private $IS_TEST = 1; // флаг тестирования (0 - работа, 1 - тест) | |
private $SOAP_CLIENT; // SOAP-клиент | |
private $MY_NUMBER = '111111111111'; // ЗАМЕНИТЬ НА СВОЙ!!! - клиентский номер в системе DPD (номер договора с DPD) | |
private $MY_KEY = 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'; // ЗАМЕНИТЬ НА СВОЙ!!! - уникальный ключ для авторизации |
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 | |
class FacebookDebugger | |
{ | |
/* | |
* https://developers.facebook.com/docs/opengraph/using-objects | |
* | |
* Updating Objects | |
* | |
* When an action is published, or a Like button pointing to the object clicked, | |
* Facebook will 'scrape' the HTML page of the object and read the meta tags. |
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
git fetch --all | |
git reset --hard origin/master | |
git pull origin master |
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
//Install Macports. | |
//Install aircrack-ng: | |
sudo port install aircrack-ng | |
//Install the latest Xcode, with the Command Line Tools. | |
//Create the following symlink: | |
sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/sbin/airport | |
//Figure out which channel you need to sniff: | |
sudo airport -s | |
sudo airport en1 sniff [CHANNEL] |
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 | |
/** | |
* Looks for unquoted keys in a json string and fixes them ie: {a:"b"} => {"a":"b"} | |
* @param string $string A json string that is suspect | |
* @return string A valid json string | |
*/ | |
function fix_json($string){ | |
// (no qupte) (word) (no quote) (semicolon) | |
$regex = '/(?<!")([a-zA-Z0-9_]+)(?!")(?=:)/i'; |