Skip to content

Instantly share code, notes, and snippets.

👾

Denis Kadyshev METAJIJI

👾
Block or report user

Report or block METAJIJI

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@METAJIJI
METAJIJI / generate_ca.sh
Created Dec 3, 2019
self signed certificates
View generate_ca.sh
#!/bin/sh
#
# Required OpenSSL 1.1.1, providing subjectAltName directly on command line:
# https://security.stackexchange.com/questions/74345/provide-subjectaltname-to-openssl-directly-on-the-command-line
#
openssl req -x509 \
-nodes \
-subj "/CN=$1" \
@METAJIJI
METAJIJI / powerdns_to_ansible.py
Created Aug 24, 2019
Powerdns database to ansible vars
View powerdns_to_ansible.py
import sqlite3
import yaml
def dict_factory(cursor, row):
d = {}
for idx, col in enumerate(cursor.description):
d[col[0]] = row[idx]
return d
View install-megacli.md

download

wget https://docs.broadcom.com/docs-and-downloads/raid-controllers/raid-controllers-common-files/8-07-14_MegaCLI.zip

or

curl -LO https://docs.broadcom.com/docs-and-downloads/raid-controllers/raid-controllers-common-files/8-07-14_MegaCLI.zip
View READ_JIRA_UPGRADE_INSTALL.md
  1. Install OS requirements:
yum install -y openssl-devel gcc apr-devel
  1. Check java version:
# /opt/atlassian/jira/jre/bin/java -version
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
@METAJIJI
METAJIJI / speedtest.sh
Created Mar 24, 2019
speedtest oneliner
View speedtest.sh
curl -sL https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | python
@METAJIJI
METAJIJI / README.md
Created Mar 23, 2019
nspawn or docker containers reboot host
View README.md

systemd 231-4

Reboot host-system from container:

[root@box ~]# echo b > /proc/sysrq-trigger 

Other things m - Will dump current memory info to your console.

@METAJIJI
METAJIJI / ANSIBLE_COW_PATH.sh
Last active Mar 21, 2019
lolcat wrap cowsay
View ANSIBLE_COW_PATH.sh
#!/bin/sh
cowsay $@ | lolcat -f
View bash_exit_codes.md

for e in $(seq 0 1000); do sh -c "exit $e"; echo $e:$?; done

View postfix-relay.sh
#!/bin/sh
SMTP_HOST=smtp.domain.ltd
SMTP_USER=user
SMTP_PASSWORD=ToPs3cR3t
# Edit main.cf
postconf -e 'mydestination = $myhostname, localhost.$mydomain, localhost'
postconf -e 'smtp_generic_maps = hash:/etc/postfix/smtp_maps'
postconf -e "relayhost = $SMTP_HOST"
@METAJIJI
METAJIJI / netdata_kickstart.sh
Created Dec 18, 2018
Install netdata on alpine oneliner
View netdata_kickstart.sh
wget -qO- https://my-netdata.io/kickstart-static64.sh | sh -s -- --non-interactive
You can’t perform that action at this time.