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
# https://www.example.com -> https://example.com | |
# http://www.example.com -> http://example.com | |
# *://example.com////// -> *://example.com | |
# *://example.com//////asdfasdfasd///asdfasdf// -> ..(multiple redirects).. -> *://example.com/asdfasdfasd/asdfasdf | |
server { | |
server_name www.example.com; | |
return 301 $scheme://bitwide.com$request_uri; | |
} |
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
echo -n "That's the text" | openssl enc -aes-256-cbc -md sha512 -pbkdf2 -iter 100000 -salt | openssl base64 > /tmp/a | |
Encrypt with interactive password. Encrypted message is base64-encoded afterwards. | |
cat /tmp/a | openssl base64 -d | openssl enc -aes-256-cbc -md sha512 -pbkdf2 -iter 100000 -salt -d | |
Base-64 decode and decrypt message with interactive password |
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 server.ru; | |
location ~* ^/i/([^./]*) { | |
proxy_ignore_headers Expires Cache-Control; | |
proxy_cache_lock on; | |
proxy_cache_valid 24h; | |
proxy_cache_valid 404 1m; |
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
dig +nocmd domain.com any +multiline +noall +answer |
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
#!/bin/bash | |
## Copyright (C) 2009 Przemyslaw Pawelczyk <[email protected]> | |
## License: GNU General Public License v2, v3 | |
# | |
# Lockable script boilerplate | |
### HEADER ### | |
LOCKFILE="/var/lock/`basename $0`" |
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 | |
class HttpError extends Exception { } | |
class Curl { | |
private $ch; | |
private $headers; | |
protected function baseSettings() { |
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
rsync -ar --rsh='ssh -TA MiddleHost ssh -TA ' TargetHost:/rsync/from /where/to/rsync |
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
# | |
# ~/.bashrc | |
# | |
# If not running interactively, don't do anything | |
[[ $- != *i* ]] && return | |
alias ls='ls --color=auto' | |
alias l='ls -l' | |
alias ll='ls -l' |
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
location ~ \.php$ { | |
try_files $uri =404; | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_pass unix:/run/php-fpm/php-fpm.sock; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
include fastcgi_params; | |
} |
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
index index.html index.htm index.php .dirindex.php; | |
try_files $uri $uri/ =404; | |
location = /favicon.ico { | |
log_not_found off; | |
access_log off; | |
} | |
location = /robots.txt { | |
log_not_found off; |
NewerOlder