This file contains 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 | |
if (! extension_loaded('mssql') && extension_loaded('pdo_sqlsrv')) { | |
//Return an associative array. Used on mssql_fetch_array()'s result_type parameter. | |
define('MSSQL_ASSOC', '1'); | |
//Return an array with numeric keys. Used on mssql_fetch_array()'s result_type parameter. | |
define('MSSQL_NUM', '2'); | |
//Return an array with both numeric keys and keys with their field name. This is the default value for mssql_fetch_array()'s result_type parameter. |
This file contains 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
server { | |
listen 80; | |
server_name www.server.name; | |
location / { | |
# set default content type here | |
# add_header may cause double header | |
types {} | |
default_type text/html; |
This file contains 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
$INPUTVIDEO='input.mp4' | |
$OUTPUTVIDEO='output.mp4' | |
ffmpeg -i $INPUTVIDEO -metadata:s:v rotate="-90" -codec copy $OUTPUTVIDEO |
This file contains 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
# Generate a new pgp key: (better to use gpg2 instead of gpg in all below commands) | |
gpg --gen-key | |
# maybe you need some random work in your OS to generate a key. so run this command: `find ./* /home/username -type d | xargs grep some_random_string > /dev/null` | |
# check current keys: | |
gpg --list-secret-keys --keyid-format LONG | |
# See your gpg public key: | |
gpg --armor --export YOUR_KEY_ID | |
# YOUR_KEY_ID is the hash in front of `sec` in previous command. (for example sec 4096R/234FAA343232333 => key id is: 234FAA343232333) |
This file contains 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
server { | |
listen 443 ssl http2; | |
listen [::]:443 ssl http2; | |
server_name yourdomain | |
ssl_certificate /etc/ssl/localcerts/yourdomain.crt; | |
ssl_certificate_key /etc/ssl/localcerts/yourdomain.key; | |
ssl_ecdh_curve prime256v1; | |
ssl_session_cache builtin:1000 shared:SSL:10m; |