Skip to content

Instantly share code, notes, and snippets.

View mnaser's full-sized avatar
☁️
building your next cloud ⚡️

Mohammed Naser mnaser

☁️
building your next cloud ⚡️
View GitHub Profile
a44691ba-c0cf-4220-9b8a-6f68bebccf06 zvol_write
value ------------- Distribution ------------- count
8192 | 0
16384 | 3
32768 | 21
65536 | 26
131072 |@@@@@@@@ 571
262144 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1982
524288 | 1
1048576 | 2
@mnaser
mnaser / s.py
Created December 26, 2012 20:09
Easy script to login to cPanel accounts much faster. Alias it to "s" and use it something like "s domain.com"
#!/usr/bin/env python
import socket
import sys
import os
if len(sys.argv) != 2:
print "Usage: %s <domain>" % sys.argv[0]
sys.exit(1)
@mnaser
mnaser / gist:4343721
Created December 20, 2012 08:12
Get the UUID for all the servers on an OpenStack XenServer host
xe vm-list params | grep nova_uuid | sed 's/.* nova_uuid: \(.*\)\;.*/\1/'
@mnaser
mnaser / default.diff
Created December 16, 2012 21:07
Adding php-fpm support
@@ -7,7 +7,7 @@
location / {
root /usr/share/nginx/html;
- index index.html index.htm;
+ index index.html index.htm index.php;
}
#error_page 404 /404.html;
@@ -27,13 +27,13 @@
@mnaser
mnaser / install_wordpress.sh
Created December 16, 2012 21:02
Install WordPress base from CLI!
cd /usr/share/nginx/html/
curl http://wordpress.org/latest.tar.gz | tar xvz
chown -R nginx:nginx wordpress
mysqladmin -p"$SQL_PW" create wordpress
WP_PW=$(mkpasswd -l 32)
mysql -p"$SQL_PW" -e "GRANT USAGE ON *.* TO wordpress@localhost IDENTIFIED BY '$WP_PW'"
mysql -p"$SQL_PW" -e "GRANT ALL PRIVILEGES ON wordpress.* TO wordpress@localhost"
echo "Your WordPress database user password: $WP_PW"
@mnaser
mnaser / phpinfo.php
Created December 16, 2012 20:53
Get php information!
<?php
phpinfo();
?>
service nginx start
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html$fastcgi_script_name;
include fastcgi_params;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
@mnaser
mnaser / install_nginx.sh
Created December 16, 2012 20:44
Install nginx and configure it with php-fpm
yum -y install nginx
chkconfig nginx on