Skip to content

Instantly share code, notes, and snippets.

View UnderGrounder96's full-sized avatar
🌀

Lucio Afonso UnderGrounder96

🌀
View GitHub Profile
@UnderGrounder96
UnderGrounder96 / ansible_vars
Created August 9, 2023 18:20
Ansible predefined vars
HOSTVARS (ANSIBLE GATHERED, group_vars, host_vars) :
ansible_check_mode: false
ansible_config_file: /Users/x/.ansible.cfg
ansible_diff_mode: false
ansible_facts: {discovered_interpreter_python: /usr/bin/python3}
ansible_forks: 5
ansible_inventory_sources: [/Users/x/wksc/video_converter/ansible/inventory]
ansible_playbook_python: /opt/homebrew/Cellar/ansible/8.2.0_2/libexec/bin/python
ansible_run_tags: [all]
@UnderGrounder96
UnderGrounder96 / pokemon.csv
Created August 14, 2021 09:39 — forked from HansAnonymous/pokemon.csv
pokemon.csv
NUMBER CODE SERIAL NAME TYPE1 TYPE2 COLOR ABILITY1 ABILITY2 ABILITY HIDDEN GENERATION LEGENDARY MEGA_EVOLUTION HEIGHT WEIGHT HP ATK DEF SP_ATK SP_DEF SPD TOTAL
1 1 11 Bulbasaur Grass Poison Green Overgrow Chrolophyll 1 0 0 0.7 6.9 45 49 49 65 65 45 318
2 1 21 Ivysaur Grass Poison Green Overgrow Chrolophyll 1 0 0 1 13 60 62 63 80 80 60 405
3 1 31 Venusaur Grass Poison Green Overgrow Chrolophyll 1 0 0 2 100 80 82 83 100 100 80 525
3 2 32 Mega Venusaur Grass Poison Green Thick Fat 1 0 1 2.4 155.5 80 100 123 122 120 80 625
4 1 41 Charmander Fire Red Blaze Solar Power 1 0 0 0.6 8.5 39 52 43 60 50 65 309
5 1 51 Charmeleon Fire Red Blaze Solar Power 1 0 0 1.1 19 58 64 58 80 65 80 405
6 1 61 Charizard Fire Flying Red Blaze Solar Power 1 0 0 1.7 90.5 78 84 78 109 85 100 534
6 2 62 Mega Charizard X Fire Dragon Black Tough Claws 1 0 1 1.7 110.5 78 130 111 130 85 100 634
6 3 63 Mega Charizard Y Fire Flying Red Drought 1 0 1 1.7 90.5 78 104 78 159 115 100 634
@UnderGrounder96
UnderGrounder96 / install_centos_8_libvirt.sh
Last active October 5, 2021 18:44
Install qemu-kvm libvirt
#!/usr/bin/env bash
# WIP from: https://linuxhint.com/install_kvm_qemu_centos_8/
sudo groupadd polkit
sudo usermod -aG polkit ${USER}
sudo yum install -y \
qemu \
dhclient \
@UnderGrounder96
UnderGrounder96 / Tux
Created May 4, 2021 13:56
Linux' Tux
\ .--.
\ |o_o |
|:_/ |
// \ \
(| | )
/'\_ _/`\
\___)=(___/
@UnderGrounder96
UnderGrounder96 / Bash.sh
Last active July 22, 2023 17:50
Topics of my Linux, Bash, Git, Jenkins, Virtualisation and Docker
Use case:
http://gitlab.com/UnderGrounder96/awx_install.git
Reference Bash:
https://tutorialkart.com/bash-shell-scripting/bash-tutorial/
shebang: #!/bin/bash
1 - Variables
SYSTEM VARIABLES vs USER VARIABLES
@UnderGrounder96
UnderGrounder96 / firewalld_config.yml
Created April 29, 2021 08:04
Deprive access to the server using firewalld (and flush iptables)
---
# Sample run: ansible-playbook -i 127.0.0.1, firewalld_config.yml
- hosts: all
name: Setup and configure firewalld
gather_facts: false
# connection: local
become: true # perform this play as root
user: root
vars:
network_ip_list:
@UnderGrounder96
UnderGrounder96 / install_ruby.sh
Last active June 27, 2021 08:36
Install ruby in Centos 8
#!/usr/bin/env bash
# Install ruby in Centos 8
sudo dnf install -y epel-release
sudo dnf install -y @development python3
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
cd ~/.rbenv && src/configure && make -C src
@UnderGrounder96
UnderGrounder96 / Dockerfile
Last active May 13, 2021 20:27
random_notes
FROM baseImage # specifies base image
LABEL maintainer="UnderGrounder96"
ENV hello "Yo!"
WORKDIR /root # changes pwd, creates dir
# similar to ADD, but doesn't extract from compressed files
COPY . /tmp/ # copies . to /tmp, inside the container
#COPY [".", "/tmp"] # same as above
@UnderGrounder96
UnderGrounder96 / pytest_log.ini
Last active November 16, 2020 09:58
Basic logging pytest
[pytest]
log_level = ERROR ; sets both log_cli_level and log_file_level
log_cli = True
log_cli_format = %(message)s
log_file = reports/report.log
log_file_date_format= %d/%b/%Y %H:%M:%S
log_file_level = CRITICAL ; or one can set it via log_level for values above WARNING
log_file_format = %(asctime)s (%(filename)s:%(lineno)s) [%(levelname)8s]: %(message)s
@UnderGrounder96
UnderGrounder96 / .bash_aliases
Last active September 27, 2023 19:19
Fresh Linux install script
# User specific aliases and functions
alias diffs="sdiff -s" # sdiff -s <(cat -n ${1}) <(cat -n ${2})
alias ggrep="grep -nir --exclude=*{.md,.txt,*lock*} --exclude-dir={.git,node_modules,*cache*,log}"
# git
alias g="git"
alias gc="g config"
alias gcl="g config --list"
alias gcg="g config --global"