Skip to content

Instantly share code, notes, and snippets.

@tzurbaev
tzurbaev / isup.sh
Last active August 17, 2017 08:51
Is website up?
#!/bin/bash
echo -e "\E[1;33mIs ${1:-google.com} up?"
isUpResult=$(curl -sS http://downforeveryoneorjustme.com/${1:-google.com})
if [[ $isUpResult == *"It's just you."* ]]; then
echo -e "\E[1;32mYep, ${1:-google.com} is up"
fi
@tzurbaev
tzurbaev / LocalTunnelMiddleware.php
Created May 31, 2017 14:13
Laravel Middleware for LocalTunnel URLs rewriting
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Support\Facades\URL;
use Illuminate\Support\Str;
class LocalTunnelMiddleware
{
@tzurbaev
tzurbaev / install-elixir.sh
Last active August 8, 2016 20:08
Laravel Elixir on Vagrant running Ubuntu 14.04 LTS
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.2/install.sh | bash
source ~/.bashrc
nvm install 5.2.0
# node -v : v5.2.0
# npm -v : 3.3.12
# @see https://github.com/npm/npm/issues/10768
cd /vagrant/project
sudo npm install -g gulp