I hereby claim:
- I am lyoshenka on github.
- I am lyoshenka (https://keybase.io/lyoshenka) on keybase.
- I have a public key whose fingerprint is DC91 BD1E 06C4 01D7 AA36 8ADF E78F F016 2B0D 303D
To claim this, I am signing this object:
#!/usr/bin/env bash | |
if [ $EUID -ne 0 ]; then | |
echo "You must be root: \"sudo ngxvhost\"" | |
exit 1 | |
fi | |
# May need to run this as sudo! | |
# I have it in /usr/local/bin and run command 'ngxvhost' from anywhere, using sudo. |
[user] | |
name = Alex Grintsvayg | |
email = [email protected] | |
[color] | |
diff = auto | |
status = auto | |
branch = auto | |
ui = auto | |
[core] | |
autocrlf = input |
I hereby claim:
To claim this, I am signing this object:
<?php | |
function printTable($data, $columnNames = []) | |
{ | |
if (!$data || !is_array($data)) | |
{ | |
return; | |
} | |
$columns = getColumnsAndMaxLengths($columnNames ? array_merge($data, [$columnNames]) : $data); |
#!/usr/bin/env python2 | |
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford ([email protected]) | |
# The author disclaims copyright to this source code. | |
import sys | |
import struct | |
import socket | |
import time | |
import select |
<?php | |
function append_error_handler($handler) { | |
set_error_handlers(array(set_error_handler($handler), $handler)); | |
} | |
function prepend_error_handler($handler) { | |
set_error_handlers(array($handler, set_error_handler($handler))); | |
} |
#!/bin/bash | |
disk_space=`df -h | grep -oP "[0-9]+(?=% /$)"` | |
[[ "$disk_space" -ge 90 ]] && { echo "Root disk is $disk_space% full" | mail [email protected] -s "SERVERNAME Root Disk $disk_space% full" ; } |
#!/usr/bin/env bash | |
sudo apt-get update | |
sudo apt-get install git-core curl | |
git clone https://github.com/nojhan/liquidprompt.git | |
source ~/liquidprompt/liquidprompt | |
echo 'source ~/liquidprompt/liquidprompt' >> ~/.bashrc | |
\curl -sSL https://get.rvm.io | bash -s stable --ruby | |
source /usr/local/rvm/scripts/rvm | |
sudo apt-get install libxslt-dev libxml2-dev |
// inspired by http://stackoverflow.com/questions/2006870/submit-form-with-delay-while-entering-data-into-input-field | |
/* | |
var timerid; | |
jQuery("#searchForm").keyup(function() { | |
var form = this; | |
clearTimeout(timerid); | |
timerid = setTimeout(function() { form.submit(); }, 500); | |
}); | |
*/ |
<?php | |
if (isset($_SERVER['SCRIPT_FILENAME'])) { | |
return false; | |
} else { | |
$_SERVER['SCRIPT_FILENAME'] = $_SERVER['DOCUMENT_ROOT'] | |
. DIRECTORY_SEPARATOR | |
. 'app.php' | |
; |