Skip to content

Instantly share code, notes, and snippets.

View mborodov's full-sized avatar
🏠
Working from home

Maksim Borodov mborodov

🏠
Working from home
View GitHub Profile
@mborodov
mborodov / router.php
Created October 4, 2018 13:48 — forked from wnstn/router.php
Wordpress router.php, for using the built in PHP server with WP sites.
<?php
$root = $_SERVER['DOCUMENT_ROOT'];
chdir($root);
$path = '/'.ltrim(parse_url($_SERVER['REQUEST_URI'])['path'],'/');
if(file_exists($root.$path))
{
if(is_dir($root.$path) && substr($path,strlen($path) - 1, 1) !== '/')
{
header('location: '.rtrim($path,'/').'/');
@mborodov
mborodov / docker-install-full.sh
Last active May 19, 2016 12:27 — forked from KrustyHack/docker-install-full.sh
Install docker and docker-compose
#!/bin/sh
sudo wget -qO- https://get.docker.com/ | sh
sudo wget -O /usr/local/bin/docker-compose https://github.com/docker/compose/releases/download/1.5.1/docker-compose-`uname -s`-`uname -m`
sudo chmod +x /usr/local/bin/docker-compose