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 sys | |
import argparse | |
import mysql.connector | |
from queue import Queue | |
from concurrent.futures import ThreadPoolExecutor | |
def parseargs(): | |
parser = argparse.ArgumentParser(prog="mysql_queries_prod_consumer.py", add_help=False) |
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 sys | |
import mysql.connector | |
from mysql.connector.errors import InterfaceError | |
from time import sleep | |
mydb = mysql.connector.connect(host="", user="", password="", database="mysql") | |
cursor = mydb.cursor(dictionary=True) | |
while 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
/* | |
* To compile and install, execute the following commands. This will create a | |
* build location for MySQL and this plugin. | |
* | |
** Get Percona MySQL source code: | |
* cd ~ | |
* wget https://downloads.percona.com/downloads/Percona-Server-8.0/Percona-Server-8.0.32-24/source/tarball/percona-server-8.0.32-24.tar.gz | |
* tar -xvzf percona-server-8.0.32-24.tar.gz | |
* | |
** Create plugin dir, clone C++ ULID library |
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
# -*- coding: utf-8 -*- | |
# Description: speedtest netdata python.d module | |
# Author: utdrmac | |
# SPDX-License-Identifier: GPL-3.0-or-later | |
# Runs a network speed test using speedtest.net every hour (by default) | |
# Requires: speedtest-cli | |
# apk add speedtest-cli | |
from bases.FrameworkServices.ExecutableService import ExecutableService |
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/env python36 | |
import requests | |
import json | |
from time import sleep | |
from datetime import timedelta, datetime as dt | |
from requests.exceptions import Timeout, HTTPError, ConnectionError | |
from concurrent.futures import TimeoutError, ThreadPoolExecutor | |
nodes = [ |
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/sh | |
## | |
## For EdgeRouter Lite | |
## chmod 755 /etc/cron.weekly/dns-blacklist | |
## | |
BLACKLIST_URL=https://raw.githubusercontent.com/oznu/dns-zone-blacklist/master/dnsmasq/dnsmasq-server.blacklist | |
BLACKLIST_PATH=/etc/dnsmasq.d/blacklist.conf | |
WHITELIST_PATH=/config/dnsmasq-server.whitelist |
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
# | |
# pip3 install mysql-connector-python | |
""" | |
CREATE TABLE comments ( | |
id int unsigned primary key auto_increment, | |
user_id int unsigned not null, | |
comment varchar(200) not null, | |
type varchar(10) not null, | |
type_id int unsigned not null); |
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
if sysbench.cmdline.command == nil then | |
error("Command is required. Supported commands: run") | |
end | |
sysbench.cmdline.options = { | |
point_selects = {"Number of point SELECT queries to run", 5}, | |
skip_trx = {"Do not use BEGIN/COMMIT; Use global auto_commit value", false} | |
} | |
local page_types = { "actor", "character", "movie" } |
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 | |
# | |
# 20210119 - Use the new --endpoint flag | |
# - Added verbose logging | |
# | |
# 20200608 - Updated to TzKt API | |
# | |
# 20191029 - Added /v3/network back in. | |
# Thanks to Baking-Bad and their Mystique API |
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
/* | |
Copyright (c) 2014, Percona LLC and/or its affiliates. All rights reserved. | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU Affero 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 |
NewerOlder