Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
// Adding current user to www-data | |
sudo adduser $USER www-data | |
//change ownership to user:www-data and | |
sudo chown $USER:www-data -R /var/www/html | |
sudo chmod u=rwX,g=srX,o=rX -R /var/www/html | |
// change file permissions of existing files and folders to 755/644 | |
sudo find /var/www/html -type d -exec chmod g=rwxs "{}" \; |
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>App</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<script charset="utf-8" src="js/app.js"></script> | |
<link rel="stylesheet" href="css/app.css" /> | |
</head> | |
<body> |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
<?php | |
class AppShell extends Shell { | |
public function progressBar($current, $total, $size = 50) { | |
$perc = intval(($current / $total) * 100); | |
for ($i = strlen($perc); $i <= 4; $i++) { | |
$perc = ' ' . $perc; | |
} | |
$total_size = $size + $i + 3; |