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
LB_name = 'HA_Servers' | |
LB_user = 'root' | |
LB_hosts = ['node1','node2'] | |
LB_mapping = { | |
'node1': ('172.20.4.40'), | |
'node2': ('172.20.4.49') | |
} | |
HA_maxconn = '20000' | |
HA_bind_ip = '172.20.4.50:80' |
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
import telegram | |
def main(): | |
bot = telegram.Bot(token="113351444:AAGmDDOkLqvzCESShVAfzwBgLiT1R9UvUK0") | |
lui = bot.getUpdates()[-1].update_id | |
print lui | |
while True: | |
for updates in bot.getUpdates(offset=lui,timeout=10): | |
text = updates.message.text | |
chat_id = updates.message.chat.id | |
update_id = updates.update_id |
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
Vagrant.require_version ">= 1.6.0" | |
VAGRANTFILE_API_VERSION = "2" | |
CNT_NAME = "dckt-bsf" | |
ENV['VAGRANT_DEFAULT_PROVIDER'] = 'docker' | |
require 'yaml' | |
containers = YAML.load_file('containers.yml') | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.ssh.username = "root" | |
config.ssh.private_key_path = "/home/araax/.ssh/id_rsa" | |
config.ssh.pty= true |
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) 2015 Arash Shams <[email protected]>. | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
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
#!/usr/bin/env bash | |
set -o errexit | |
set -o nounset | |
set -o pipefail | |
# Automatically update your CloudFlare DNS record to the IP, Dynamic DNS | |
# Can retrieve cloudflare Domain id and list zone's, because, lazy | |
# Place at: | |
# /usr/local/bin/cf-ddns.sh |
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) 2016 Arash Shams <https://github.com/Ara4Sh>. | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
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
#Installing openresty 1.11.2.2 on debian 8 | |
#Install required packages | |
apt-get -y install build-essential libpcre3-dev libssl-dev libgeoip-dev nginx libpq-dev libxslt1-dev libgd2-xpm-dev luajit git checkinstall | |
#Download openresty | |
cd /usr/local/src | |
wget https://openresty.org/download/openresty-1.11.2.2.tar.gz | |
tar xzf openresty-1.11.2.2.tar.gz | |
cd openresty-1.11.2.2 |
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 | |
location / { | |
set $mobile 0; | |
if ($http_user_agent ~* "iphone|android") { | |
set $mobile 1; | |
} | |
if ($mobile = 1) { | |
# return or rewrite to somewhere | |
} | |
} |
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
rm -rf /etc/my.cnf | |
update-alternatives --install /etc/mysql/my.cnf my.cnf "/etc/mysql/percona-server.cnf" 200 |
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
8.2.3. HTTP log format | |
---------------------- | |
The HTTP format is the most complete and the best suited for HTTP proxies. It | |
is enabled by when "option httplog" is specified in the frontend. It provides | |
the same level of information as the TCP format with additional features which | |
are specific to the HTTP protocol. Just like the TCP format, the log is usually | |
emitted at the end of the session, unless "option logasap" is specified, which | |
generally only makes sense for download sites. A session which matches the | |
"monitor" rules will never logged. It is also possible not to log sessions for |
OlderNewer