Install package
sudo apt-get install apache2-utils
Generate htpasswd file
sudo htpasswd -c /var/www/yourweb/.htpasswd yourname
Install package
sudo apt-get install apache2-utils
Generate htpasswd file
sudo htpasswd -c /var/www/yourweb/.htpasswd yourname
alias.url = ("/netcleaner" => "/home/nontawatt/workspaces/net_cleaner/src/www/public/")
url.rewrite-once = (
"^/netcleaner/compiled/(.*)" => "/netcleaner/compiled/$1",
"^/netcleaner/(favicon\.ico|robots\.txt|sitemap\.xml)$" => "/netcleaner/$1",
"^/netcleaner/[^\?]*(\?.*)?$" => "/netcleaner/index.php/$1"
)
$HTTP["url"] =~ "^/netcleaner" {
url.redirect = ()
http://www.howtogeek.com/howto/40702/how-to-manage-and-use-lvm-logical-volume-management-in-ubuntu/
sudo apt-get install lvm2
Format partition with type 8e
# | |
# Mariadb mirror list | |
# Generate since: 2015-11-14 05:17:40 | |
deb [arch=amd64,i386] http://mirrors.bestthaihost.com/mariadb/repo/10.1/ubuntu trusty main | |
deb-src http://mirrors.bestthaihost.com/mariadb/repo/10.1/ubuntu trusty main | |
deb [arch=amd64,i386] http://mirrors.opencas.cn/mariadb/repo/10.1/ubuntu trusty main | |
deb-src http://mirrors.opencas.cn/mariadb/repo/10.1/ubuntu trusty main |
MYMEM=$(printf "%.2f" $(( $(vmstat -s | head -n1 | awk '{print $1}') * 0.5 )) | numfmt --to=si --from-unit=K)
ssh -L 8080:localhost:80 user@remote-host |
<?php | |
trait Bar1 | |
{ | |
function getBody($type, &$body) { | |
switch($type) { | |
case 1: | |
$body = 'A'; | |
break; | |
case 2: |
echo $(dpkg --list | grep linux-image | awk '{ print $2 }' | sort -V | sed -n '/'`uname -r`'/q;p') $(dpkg --list | grep linux-headers | awk '{ print $2 }' | sort -V | sed -n '/'"$(uname -r | sed "s/\([0-9.-]*\)-\([^0-9]\+\)/\1/")"'/q;p') | xargs sudo apt-get -y purge |