Skip to content

Instantly share code, notes, and snippets.

View crecabar's full-sized avatar

Cristian Recabarren crecabar

View GitHub Profile
@crecabar
crecabar / sphp.sh
Created November 6, 2016 14:50 — forked from w00fz/sphp.sh
PHP switcher
#!/bin/bash
# Check if command was ran as root.
if [[ $(id -u) -eq 0 ]]; then
echo "The command \"sphp\" should not be executed as root or via sudo directly."
echo "When a service requires root access, you will be prompted for a password as needed."
exit 1
fi
# Usage
/*
author: jbenet
os x, compile with: gcc -o testo test.c
linux, compile with: gcc -o testo test.c -lrt
*/
#include <time.h>
#include <sys/time.h>
#include <stdio.h>