Skip to content

Instantly share code, notes, and snippets.

@tzurbaev
tzurbaev / isup.sh
Last active Aug 17, 2017
Is website up?
View isup.sh
#!/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
Laravel Middleware for LocalTunnel URLs rewriting
View LocalTunnelMiddleware.php
<?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 Aug 8, 2016
Laravel Elixir on Vagrant running Ubuntu 14.04 LTS
View install-elixir.sh
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