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
route: | |
group_by: [ 'job', 'alertname', 'priority' ] | |
group_wait: 30s | |
group_interval: 5m | |
repeat_interval: 12h | |
receiver: 'telegram' | |
routes: | |
- receiver: 'null' | |
matchers: | |
- alertname =~ "InfoInhibitor|Watchdog" |
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
## GitLab Runner Image | |
## | |
## By default it's using gitlab/gitlab-runner:alpine-v{VERSION} | |
## where {VERSION} is taken from Chart.yaml from appVersion field | |
## | |
## ref: https://hub.docker.com/r/gitlab/gitlab-runner/tags/ | |
## | |
# image: gitlab/gitlab-runner:alpine-v12.1.0 | |
## Specify a imagePullPolicy |
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
openssl pkcs12 -export -out domain.p12 -inkey privkey.pem -in cert.pem -certfile chain.pem | |
openssl pkcs12 -export -out domain.p12 -inkey privkey.pem -in fullchain.pem |
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
awk -vDate=`date -d'now-24 hours' +[%d/%b/%Y:%H:%M:%S` ' { if ($4 > Date) print Date FS $4,$7}' access.log |grep aaa > similar24.txt | |
https://stackoverflow.com/questions/7706095/filter-log-file-entries-based-on-date-range |
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
** Find commmonly accessed tables and their use of indexes: | |
SELECT relname,seq_tup_read,idx_tup_fetch,cast(idx_tup_fetch AS numeric) / (idx_tup_fetch + seq_tup_read) AS idx_tup_pct FROM pg_stat_user_tables WHERE (idx_tup_fetch + seq_tup_read)>0 ORDER BY idx_tup_pct; | |
Returns output like: | |
relname | seq_tup_read | idx_tup_fetch | idx_tup_pct | |
----------------------+--------------+---------------+------------------------ | |
schema_migrations | 817 | 0 | 0.00000000000000000000 | |
user_device_photos | 349 | 0 | 0.00000000000000000000 |
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 | |
nginxver=`apt show nginx-full |grep Version | awk '{print $2}' |awk -F '-' '{print $1}'` | |
nginxname=nginx-$nginxver.tar.gz | |
nginxdir=nginx-$nginxver | |
#apt -y install libmaxminddb0 libmaxminddb-dev mmdb-bin | |
if [ -f "$nginxname" ] |
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
SET @sql = NULL; | |
SET @sourcetable = 'Table'; | |
set @viewname = CONCAT(@sourcetable,'F'); | |
SET @@group_concat_max_len = 10000; | |
SELECT GROUP_CONCAT(DISTINCT | |
CONCAT( | |
'MAX(IF(name = ''', | |
name, | |
''', data, NULL)) AS ', | |
'''', |
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
version: '2' | |
services: | |
hub: | |
image: selenium/hub | |
ports: | |
- 4444:4444 | |
networks: | |
- front-tier | |
- back-tier |
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
env: "dev" | |
sphinx_instname: "searchd-{{ env }}" | |
sphinx_run_path: "/var/run/sphinxsearch" | |
sphinx_log_path: "/var/log/sphinxsearch" | |
sphinx_data_path: "/var/lib/sphinxsearch/{{ sphinx_instname }}" | |
sphinx_confname: "{{ sphinx_instname }}.conf" | |
sphinx_sock_path: "{{ sphinx_run_path }}/{{ sphinx_instname }}.sock" | |
sphinx_pid_path: "{{ sphinx_run_path }}/{{ sphinx_instname }}.pid" | |
sphinx_sockmysql_path: "{{ sphinx_run_path }}/{{ sphinx_instname }}-mysql.sock" | |
sphinx_sockmysql_conf: "{{ sphinx_sockmysql_path }}:mysql41" |