Skip to content

Instantly share code, notes, and snippets.

View iandark's full-sized avatar
:electron:

Derkian Afonso iandark

:electron:
  • Juiz de Fora, Brazil
View GitHub Profile
@iandark
iandark / MySQL8_PasswordStrength_CLI.txt
Last active February 24, 2021 05:50
MySQL 8 change password strengh in mysql console
// 1 - Enter in mysql console
$ mysql -u root
// 1.1 (optional) - if you can't login into mysql console add this in [mysqld] section in your my.cnf file (/etc/mysql/my.cnf):
skip-grant-tables
// 2 - See your password strength
mysql> SHOW VARIABLES LIKE 'validate_password%';
// your output will be something like this:
@iandark
iandark / MySQL8_PasswordStrength.txt
Last active February 24, 2021 05:49
MySQL 8 change password strengh in my.cnf
// 1 - Edit your my.cnf
$ sudo nano /etc/mysql/my.cnf
// 2 - In your my.cnf, add this to section [mysqld], if your file doesn't have this section you should create
[mysqld]
validate_password.length = 4
validate_password.policy = low
validate_password.mixed_case_count = 0
validate_password.number_count = 0
validate_password.special_char_count = 0
@iandark
iandark / Python2.7_MariaDB.sh
Created February 25, 2021 03:11
Python2.7 with MariaDB
#!/bin/bash
# requires sudo
apt-get install libmariadb-client-lgpl-dev
ln -s /usr/bin/mariadb_config /usr/bin/mysql_config
@iandark
iandark / UpdatePackagesInRepo.sh
Last active February 28, 2021 21:13
Clone a repo and update your package.json and lock files in origin
#!/bin/bash
# Because of cd inside script exec with ./ will not work. To exec this you can use . scriptname.sh or source scriptname.sh
# Do not use the exit command because it then closes your connection
# To use this you might update your npm to latest
updatePackage() {
repoUrl="$1"
repoUrlToRemove="/$2/"
git clone "$repoUrl"
@iandark
iandark / readFileRepo.sh
Last active March 1, 2021 07:17
Read file .txt with node repositories to update package.json and lock files
#!/bin/bash
# Because of cd inside script exec with ./ will not work. To exec this you can use . scriptname.sh or source scriptname.sh
# Do not use the exit command because it then closes your connection
# To use this you might update your npm to latest
readFile() {
filename=$1
dirAtual="$PWD"
@iandark
iandark / how-to-take-psm-I-scrum-org.md
Created August 20, 2021 04:33 — forked from paulera/how-to-take-psm-I-scrum-org.md
A practical guide to prepare and take the PSM I (Professional Scrum Master 1) certification, from Scrum.org, entirely by yourself (no course required).

How to take the PSM I certification from Scrum.org entirely by yourself

Some people ask me about Scrum.org certifications: what to study, how to apply for the exam and advice for taking it. So I decided to write a guide for those interested in preparing and taking PSM I (Professional Scrum Master) without spending a fortune with training. With discipline, in around a month (or two), you should be ready to take the test.

The advice compiled here came from experienced agile coaches. Worked very well for me and I hope they will also help those who are seeking directions.

Table of Contents

@iandark
iandark / deluge.sh
Created September 6, 2021 02:40
Update to deluge 2.0.3 in raspberry
#!/bin/bash
## This works on raspbian with raspberry pi 2b
echo 'deb [trusted=yes] http://ppa.launchpad.net/deluge-team/stable/ubuntu/ xenial main' > /etc/apt/sources.list
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C5E6A5ED249AD24C
sudo apt update
sudo apt install deluged deluge-web deluge-console python-mako
@iandark
iandark / internetIsOn.sh
Created September 9, 2021 05:50
Check if internet is on and restart VPN if is down
## First you need to create a job in crontab, you must execute this with 'sudo' first to guarantee the root user routine
## $ sudo crontab -e
## Append a line at the end of the file, here i use a every 1 hour schedulle execution with the path to script.
## 0 */1 * * * /home/USERNAME/internetIsOn.sh
## Optional: if you want to create a simple log to count how many hours you lost your connection follow these steps
## 1 - Create a log directory
## $ sudo mkdir -p /var/log/internetIsOn
## 2 - Change ownership of directory to make this available to your user anytime
## $ sudo chown -R USER:USERGROUP /var/log/internetIsOn
@iandark
iandark / ManjaroWifiFix.md
Last active October 17, 2021 07:21
Corrigir WiFi no Manjaro

Set regulatory domain for country BR:

sudo iw reg set BR
iw reg get
@iandark
iandark / restore-redis-rdb.sh
Last active January 18, 2022 05:04
restore rdb file into redis
#!/bin/bash
## Make sure you have set; appendonly 'no' in redis.conf
## This script is an enhanced copy from https://github.com/msherer/redis_rdb_import/blob/master/redisImport.sh
## Thanks Matt Sherer, who ever who you are
set -e
##
# Paths for the original RDB file