Skip to content

Instantly share code, notes, and snippets.

View kedazo's full-sized avatar
💭

David Kedves kedazo

💭
View GitHub Profile

Keybase proof

I hereby claim:

  • I am kedazo on github.
  • I am kedz (https://keybase.io/kedz) on keybase.
  • I have a public key ASAGV5dDRaXMBof_cQhP_Ffig-MJ1xQTSMp55lW7b9A2Kwo

To claim this, I am signing this object:

@kedazo
kedazo / patched_junit_index.jelly
Created October 26, 2020 15:06
junit.jar jenkins patch to show HTML output properly
<!--
The MIT License
Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Daniel Dyer, Seiji Sogabe, Tom Huybrechts
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
@kedazo
kedazo / install-lxd.sh
Created November 28, 2019 08:25
auto install and configure lxd
#!/bin/bash
# Run this script as root ( or sudo ) and pass username as argument.
# Version v0.1 (initial)
# David Kedves <kedazo@severalnines.com>
USERNAME=$1
apt-get install -y snapd
# /snap/bin must be in path
grep '/snap/bin' /etc/profile 2>/dev/null || echo 'export PATH=/snap/bin:${PATH}' >> /etc/profile
grep '/snap/bin' /root/.bashrc 2>/dev/null || echo 'export PATH=/snap/bin:${PATH}' >> /root/.bashrc
@kedazo
kedazo / PS1
Created July 31, 2019 07:51
PS1
export PS1="\[\033[01;32m\]\u@🏠\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$(__git_ps1)\$ "
@kedazo
kedazo / gist:f564fc045ad98ab7fcf4fe8d5ae0e5bd
Created April 24, 2019 18:26
debian stretch clustercontroll install logs
$ lxc exec cmon-test-node4 bash
root@cmon-test-node4:~# ls
root@cmon-test-node4:~# wget 'https://severalnines.com/scripts/install-cc'
--2019-04-24 20:22:35-- https://severalnines.com/scripts/install-cc
Resolving severalnines.com (severalnines.com)... 107.154.148.155, 107.154.238.155
Connecting to severalnines.com (severalnines.com)|107.154.148.155|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 57287 (56K) [text/x-shellscript]
Saving to: ‘install-cc’
#!/bin/bash
# Arguments: private-key-file username [URL]
echo "$0 - RPCv2 authenticator"
KEYFILE=$1
if [ "${KEYFILE}x" == "x" ]; then
KEYFILE=./user.key
fi
USERNAME=$2
@kedazo
kedazo / s9s_stats.sh
Created September 24, 2018 13:28
Clustercontrol stress tester
#! /bin/bash
clusterids=`s9s cluster --list --long --batch | cut -d' ' -f1`
graphs+="cpuuser diskfree diskreadspeed diskreadwritespeed diskwritespeed "
graphs+="diskutilization memfree memutil neterrors netreceivedspeed "
graphs+="netreceiveerrors nettransmiterrors netsentspeed netspeed "
graphs+="sqlcommands sqlcommits sqlconnections sqlopentables sqlqueries "
graphs+="sqlreplicationlag sqlslowqueries swapfree"
@kedazo
kedazo / cmontop.sh
Last active September 20, 2018 07:26
#!/bin/bash
#
# A command to show the cmon process threads, note any cmon running
# inside containers will be skipped.
#
IFS='
'
CMONPIDS=`pgrep cmon`
SELECTED=''
clustercontrol-controller.postinst
#!/usr/bin/env bash
# for mysql binary
set PATH=${PATH}:/usr/bin
echo "*** If you are upgrading from an older version to v1.2.12,"
echo "*** you must also upgrade the DB schema manually."
echo "***"
echo "*** Starting from version 1.2.12, cmon will attempt to auto-upgrade the schema"
@kedazo
kedazo / 2018_oracle_mysql_repo_gpg_key_new.asc
Created May 22, 2018 14:07
Oracle MySQL Repo new GPG key
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.5 (GNU/Linux)
mQGiBD4+owwRBAC14GIfUfCyEDSIePvEW3SAFUdJBtoQHH/nJKZyQT7h9bPlUWC3
RODjQReyCITRrdwyrKUGku2FmeVGwn2u2WmDMNABLnpprWPkBdCk96+OmSLN9brZ
fw2vOUgCmYv2hW0hyDHuvYlQA/BThQoADgj8AW6/0Lo7V1W9/8VuHP0gQwCgvzV3
BqOxRznNCRCRxAuAuVztHRcEAJooQK1+iSiunZMYD1WufeXfshc57S/+yeJkegNW
hxwR9pRWVArNYJdDRT+rf2RUe3vpquKNQU/hnEIUHJRQqYHo8gTxvxXNQc7fJYLV
K2HtkrPbP72vwsEKMYhhr0eKCbtLGfls9krjJ6sBgACyP/Vb7hiPwxh6rDZ7ITnE
kYpXBACmWpP8NJTkamEnPCia2ZoOHODANwpUkP43I7jsDmgtobZX9qnrAXw+uNDI