Skip to content

Instantly share code, notes, and snippets.

Avatar

Ismael Nobre ianobre

View GitHub Profile
@patidardhaval
patidardhaval / README.md
Last active Jan 1, 2021
Node Rest api using hapi and mysql
View README.md

NodeRestful

Create Node Restful APIs with MySQL Database

Install Node JS and MySQL Software, create a database and import SQL file.

Go to terminal or command line.

Execute following commands to run this application.

Start Project

@organicaudio
organicaudio / custom_ubuntu_bash_aliases
Created Jan 18, 2016
Custom Aliases for Ubuntu Server
View custom_ubuntu_bash_aliases
# # ALIASES
#
status () { sudo service "$@" status; }
# usuage "status <servicename>
#
# Service Shortcuts
alias t-start='sudo service transmission-daemon start'
alias t-stop='sudo service transmission-daemon stop'
alias t-reload='sudo service transmission-daemon reload'
alias t-list='transmission-remote -n 'transmission:transmission' -l'
View gist:4388108
<?php
header("Cache-Control: no-cache, must-revalidate");
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
header("Pragma: no-cache");
function human_filesize($bytes, $decimals = 2) {
$sz = 'BKMGTP';
$factor = floor((strlen($bytes) - 1) / 3);
return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) . @$sz[$factor];
}