This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# can you boot with USB install manjro ( USB boot not the disk ) | |
# open a terminal | |
manjaro-chroot -a ( select 1 if one line ) && | |
pacman -Syy ( check ip on ) && | |
cat /etc/fstab ( check UUID) && | |
grub-mkconfig -o /boot/grub/grub.cfg ( generate grub config ) && | |
mkinitcpio -P ( create all img kernel ) && | |
update-grub && | |
exit( always for quit chroot) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Documentation | |
# https://docs.gitlab.com/ce/api/projects.html#list-projects | |
if [[ `whoami` == "root" ]]; then | |
echo "DO NOT run this program as root! Quitting." | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
provisioner "remote-exec" { | |
connection { | |
host = "var.ip[count.index]" | |
user = "login" | |
password = "senha" | |
} | |
inline = [ | |
"echo senha | sudo -S growpart /dev/sda 2", | |
"sudo growpart /dev/sda 5", | |
"sudo pvresize /dev/sda5", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function terraform-install() { | |
[[ -f ${HOME}/bin/terraform ]] && echo "`${HOME}/bin/terraform version` already installed at ${HOME}/bin/terraform" && return 0 | |
LATEST_URL=$(curl -sL https://releases.hashicorp.com/terraform/index.json | jq -r '.versions[].builds[].url' | egrep 'terraform_[0-9]\.[0-9]{1,2}\.[0-9]{1,2}_linux.*amd64' | sort -V | tail -1) | |
curl ${LATEST_URL} > /tmp/terraform.zip | |
mkdir -p ${HOME}/bin | |
(cd ${HOME}/bin && unzip /tmp/terraform.zip) | |
if [[ -z $(grep 'export PATH=${HOME}/bin:${PATH}' ~/.bashrc) ]]; then | |
echo 'export PATH=${HOME}/bin:${PATH}' >> ~/.zshrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt install -y software-properties-common | |
sudo apt-add-repository -y ppa:ansible/ansible | |
sudo apt update -y | |
sudo apt install -y ansible |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openssl s_client -starttls smtp -showcerts -connect 0.0.0.0:25 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Script prerequisite > install jq > https://stedolan.github.io | |
# ******************************************************************************************** | |
# UPDATE: Check out Robert's repo here https://github.com/robertpeteuil/terraform-installer | |
# Robert's repo is more built out and has more options around the installation process. | |
# Cheers! -Adron | |
# ******************************************************************************************** | |
cd ~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for ((i = 22 ; i <= 66 ; i++)); do | |
wp user delete $i --yes | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python -c 'import crypt; print(crypt.crypt("suasenha", crypt.mksalt(crypt.METHOD_SHA512)))' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Overview | |
Content rot has a tendency to creep up on you as a website or application ages. The last thing your visitors want when they reach your site, after clicking a link to it, is to be face planted with a 404 error. To make matters worse, too many 404s will have an impact on your search engine site rankings. | |
We can battle 404s with redirect rules written in our Nginx configurations. The rules can either suggest to the web browser, search engine and anything that the content has permanently moved, or we suggest the content has only moved temporarily. Either way, you have a chance to guide the user to the new location of your content in a transparent manner. | |
Permanent Vs. Temporary | |
Two type of redirects exist. As you probably figured out from the heading, we can do either a permanent redirect (301) or a temporary redirect (302), depending on what our needs are. A permanent redirect tells user agents, including search engines, to update their indexes to replace the link with the new location, whereas tempo |