Parameter | Value | AWS default |
---|---|---|
character_set_server | utf8 | |
collation_server | utf8_general_ci | |
default_storage_engine | InnoDB | InnoDB |
innodb_buffer_pool_size | {DBInstanceClassMemory*7/10} | {DBInstanceClassMemory*3/4} |
innodb_log_file_size | 134217728 | 134217728 |
max_allowed_packet | 4194304 |
Instructions for Ubuntu 14.04LTS (and more than likely others). Where keyfile.ppk
is the PPK file you have in hand.
$ sudo apt-get install putty-tools
# create public key as [id_rsa.pub]
$ puttygen keyfile.ppk -o id_rsa.pub -O public-openssh
# create private key as [id_rsa]
$ puttygen keyfile.ppk -o id_rsa -O private-openssh
My current sane desktop settings/setup for GNOME 3 shell. Ubuntu GNOME 14.04.1 LTS desktop as a base, which makes this easy - no need for PPA installs of GNOME desktop itself.
- Netspeed - https://extensions.gnome.org/extension/104/netspeed/
- Places status indicator - https://extensions.gnome.org/extension/8/places-status-indicator/
- TaskBar - https://extensions.gnome.org/extension/584/taskbar/
- VirtualBox VM search provider - https://extensions.gnome.org/extension/308/virtualbox-vm-search-provider/
- Weather - https://extensions.gnome.org/extension/750/openweather/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location / { | |
try_files $uri /framework/main.php?url=$uri&$query_string; | |
} | |
error_page 404 /assets/error-404.html; | |
error_page 500 /assets/error-500.html; | |
location ^~ /assets/ { | |
sendfile on; | |
try_files $uri =404; |
By default when Nginx starts receiving a response from a FastCGI backend (such as PHP-FPM) it will buffer the response in memory before delivering it to the client. Any response larger than the set buffer size is saved to a temporary file on disk.
This process is outlined at the Nginx ngx_http_fastcgi_module page manual page.
These are my essentials.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
PID="/run/nginx.pid" | |
if [[ ! -f $PID ]]; then | |
echo "Error: Nginx not currently running" >&2 | |
exit 1 | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function isValidEmailAddress($email) { | |
return ( | |
(preg_match('/^[^\r\n\t]+@[^\r\n\t ]+\.(?i)[a-z]{2,10}$/',$email)) && | |
(count($partList = explode('@',$email)) == 2) && | |
(!preg_match('/\.{2}/',$partList[1])) | |
); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function generateRandString() { | |
$randString = ''; | |
while (strlen($randString) < 32) { | |
// generate a character between 0-9 a-f | |
$character = mt_rand(0,15); | |
if ($character > 9) $character += 39; | |
$randString .= chr($character + 48); | |
} |
Source document at: https://nginx.org/en/docs/http/ngx_http_core_module.html#variables
Name | Description | Read only |
---|