Skip to content

Instantly share code, notes, and snippets.

<?php
$header = <<<'EOF'
Default PHP CS Fixer
EOF;
$finder = PhpCsFixer\Finder::create()
->notPath('bootstrap/cache')
->notPath('storage')
->notPath('vendor')
@chelout
chelout / git-tag-delete-local-and-remote.sh
Created April 19, 2018 08:22 — forked from mobilemind/git-tag-delete-local-and-remote.sh
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@chelout
chelout / drop_tables.sql
Last active August 24, 2017 11:23
Drop all tables from current mysql database. Stored procedure.
# Stored procedure
DELIMITER //
CREATE PROCEDURE `drop_tables` ()
LANGUAGE SQL
DETERMINISTIC
SQL SECURITY DEFINER
COMMENT 'A procedure'
BEGIN
SET @db = NULL;
<?php
$geo_object = file_get_contents('https://geocode-maps.yandex.ru/1.x/?format=json&geocode=37.477667,55.484576');
$result = get_yandex_human_address($geo_object);
print_r($result);
function get_yandex_human_address($geo_object) {
$geo_object = json_decode($geo_object, true);
$geo_object = $geo_object['response'];