This is the reference point. All the other options are based off this.
|-- app
| |-- controllers
| | |-- admin
<?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'; |
//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] |
git fetch --all | |
git reset --hard origin/master | |
git pull origin master |
<?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. |
<?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'; // ЗАМЕНИТЬ НА СВОЙ!!! - уникальный ключ для авторизации |
#!/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) | |
# |