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
// Image resize with nginx (this is replace phpThumb script) | |
function escapeRegExp(str) { | |
return str.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1"); | |
} | |
function replaceAll(str, find, replace) { | |
return str.replace(new RegExp(escapeRegExp(find), 'g'), replace); | |
} |
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 XX.XX.XX.XX:80; | |
server_name mysite.ru; | |
root /var/www/mysite.ru; | |
index index.php index.html index.htm; | |
error_log /var/log/nginx/mysite.ru_error.log; | |
access_log /var/log/nginx/mysite.ru_access.log main; | |
set $fastcgipass unix:/var/lib/php5-fpm/mysite.sock; |
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 | |
SERVER_ADDR=$1 | |
SERVER_PORT=$2 | |
_command_exists() { | |
type "${1}" &> /dev/null | |
} | |
_nc() { |
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
MYSITE=torproject.org && openssl s_client -servername ${MYSITE} -connect ${MYSITE}:443 </dev/null 2>/dev/null | openssl x509 -text | sed -n -e '/BEGIN\ CERTIFICATE/,/END\ CERTIFICATE/p' | openssl x509 -fingerprint -sha256 | head -1 | cut -f2 -d'=' | sed 's,:,,g' | tr '[:upper:]' '[:lower:]' |
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 | |
# | |
### BEGIN INIT INFO | |
# Provides: proxysql-binlogreader | |
# Required-Start: $local_fs | |
# Required-Stop: $local_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: ProxySQL Binlog Reader for MySQL | |
### END INIT INFO |
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
mysql -u root -p db_name < dumpfilename.sql > /var/tmp/mysqldump.log 2>&1 | |
or create file mysql-import.sh: | |
#!/bin/bash | |
mysql -u root -p'password' -h hostname db_name << EOF | |
CREATE DATABASE dbname; | |
USE dbname; | |
SET foreign_key_checks=0; | |
SOURCE dbdumpname.sql; |
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
1) Run: | |
mysql -u root -p db_name < dumpfilename.sql > /var/tmp/mysqldump.log 2>&1 | |
2) Or create file mysql-import.sh: | |
#!/bin/bash | |
mysql -u root -p'password' -h hostname db_name << EOF | |
CREATE DATABASE dbname; | |
USE dbname; | |
SET foreign_key_checks=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
--- ./frontends/php/include/blocks.inc.php.orig 2019-09-27 20:57:02.214919180 +0300 | |
+++ ./frontends/php/include/blocks.inc.php 2019-09-27 20:57:14.583818457 +0300 | |
@@ -732,7 +732,6 @@ | |
_('Info'), | |
_('Host'), | |
_('Problem'), | |
- $show_opdata ? _('Operational data') : null, | |
_('Duration'), | |
_('Ack'), | |
_('Actions'), |
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
# delete local tag '12345' | |
git tag -d 12345 | |
# delete remote tag '12345' (eg, GitHub version too) | |
git push origin :refs/tags/12345 | |
# alternative approach | |
git push --delete origin tagName | |
git tag -d tagName |
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
--- frontends/php/app/views/monitoring.widget.problems.view.php.orig 2019-10-14 01:13:02.104862978 -0400 | |
+++ frontends/php/app/views/monitoring.widget.problems.view.php 2019-10-14 01:23:01.615655216 -0400 | |
@@ -197,7 +197,7 @@ | |
]; | |
if ($show_opdata == OPERATIONAL_DATA_SHOW_WITH_PROBLEM && $opdata) { | |
- $problem_link = array_merge($problem_link, [' (', $opdata, ')']); | |
+ $problem_link = array_merge($problem_link, [' ', $opdata]); | |
} |
OlderNewer