I hereby claim:
- I am dotmanila on github.
- I am revin (https://keybase.io/revin) on keybase.
- I have a public key ASC8Pyeju_P3M6mAtkHvr-iB048ggm73oKYWbrRIKxIq6Qo
To claim this, I am signing this object:
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| from datetime import datetime | |
| from optparse import OptionParser | |
| import json | |
| import namedtupled | |
| import operator | |
| import os | |
| import pymysql.cursors |
| #!/bin/bash | |
| OC=/usr/bin/orchestrator-client | |
| IPADDR=$(/sbin/ip ad sh dev eth0 scope global | grep -oE "inet\s(.*)\/" | grep -oE "([0-9]{1,3}\.){3}[0-9]{1,3}") | |
| RAFTLEADER=$($OC -c raft-leader | cut -d: -f1) | |
| if [ "x${IPADDR}" != "x${RAFTLEADER}" ]; then | |
| exit 0 | |
| fi |
| #!/bin/bash | |
| export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin | |
| export ORCHESTRATOR_API="$1" | |
| OC=orchestrator-client | |
| PSQL='mysql --defaults-file=/etc/proxysql/user.cnf -P6032 -h127.1' | |
| VER=$(date +%s) | |
| $OC -c raft-leader > /dev/null 2>&1 |
| #!/usr/bin/env python | |
| from SimpleHTTPServer import SimpleHTTPRequestHandler | |
| import BaseHTTPServer | |
| import optparse | |
| import time | |
| import socket | |
| import simplejson |
| multi_source_repl: | |
| query: "SELECT service_state, COUNT(service_state) AS service_state_count FROM performance_schema.replication_connection_status GROUP BY service_state;" | |
| metrics: | |
| - service_state: | |
| usage: "LABEL" | |
| description: "Replication thread state name" | |
| - service_state_count: | |
| usage: "COUNTER" | |
| description: "Count by service state name" | |
| multi_source_repl_delay: |
| { | |
| "annotations": { | |
| "list": [ | |
| { | |
| "builtIn": 1, | |
| "datasource": "-- Grafana --", | |
| "enable": true, | |
| "hide": true, | |
| "iconColor": "rgba(0, 211, 255, 1)", | |
| "name": "Annotations & Alerts", |
| # LightDM greeter uses display :2 so we have ti login first | |
| sudo x11vnc -auth /var/run/lightdm/root/:2 -forever -shared -rfbauth /home/revin/.vnc/passwd \ | |
| -rfbport 5900 -xkb -norc -noxrecord -noxdamage -nomodtweak -desktop :2 -display :2 | |
| # Once logged in, we can connect to the desktop | |
| sudo x11vnc -auth /var/run/lightdm/root/:0 -forever -shared -rfbauth /home/revin/.vnc/passwd \ | |
| -rfbport 5900 -xkb -norc -noxrecord -noxdamage -nomodtweak -desktop :0 -display :0 |
| #!/bin/sh | |
| xsetroot -solid grey | |
| export XKL_XMODMAP_DISABLE=1 | |
| #autocutsel -fork | |
| openbox & | |
| /usr/bin/lxsession -s Lubuntu & |
I hereby claim:
To claim this, I am signing this object:
| #!/bin/bash | |
| # File should have first column as numeric | |
| FILE=$1 | |
| cat $FILE | sort -rn > $FILE.sort | |
| cat $FILE.sort | awk 'NR%2==0' > $FILE.1 | |
| cat $FILE.sort | awk 'NR%2==1' > $FILE.2 | |
| rm -rf $FILE.sort |