This file contains hidden or 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
git diff --name-only {{ circle_branch.stdout }} | \ | |
xargs -n1 dirname | \ | |
sort | \ | |
uniq | \ | |
xargs -I{} find ../../{} -maxdepth 1 -type f -name 'main.tf' ! -path '*.terraform*' | \ | |
xargs -n1 dirname |
This file contains hidden or 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 | |
DATADOG_API_KEY=ZZZ | |
DATADOG_APP_KEY=ZZZ | |
FILENAME=output | |
INDEX=0 | |
response=$(curl -L -X POST "https://api.datadoghq.com/api/v2/logs/events/search" \ | |
-H "Content-Type: application/json" \ | |
-H "DD-API-KEY: $DATADOG_API_KEY" \ | |
-H "DD-APPLICATION-KEY: $DATADOG_APP_KEY" --data-raw '{ |
This file contains hidden or 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
# fix work iconv library with alphine | |
RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ --allow-untrusted gnu-libiconv | |
ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so php |
This file contains hidden or 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
# I found at https://dreisbach.us/articles/simple-ansible-makefile/ | |
# Replace this | |
# ansible-playbook -i hosts --vault-password-file=.vault-password.txt site.yml | |
# For this | |
tags = $(subst roles/,,$(wildcard roles/*)) | |
.PHONY: all $(tags) | |
all: | |
ansible-playbook -i hosts --vault-password-file=.vault-password.txt site.yml | |
$(tags): |
This file contains hidden or 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
Example | |
client$ iptables -I INPUT 1 --src 192.168.254.0/24 -j ACCEPT | |
client$ iptables -t raw -I PREROUTING 1 --src 192.168.254.0/24 -j NOTRACK | |
server$ iptables -I INPUT 1 --src 192.168.254.0/24 -j ACCEPT | |
server$ iptables -t raw -I PREROUTING 1 --src 192.168.254.0/24 -j NOTRACK | |
Example | |
receiver$ iptables -I INPUT 1 -p udp --dport 4321 -j ACCEPT | |
receiver$ iptables -t raw -I PREROUTING 1 -p udp --dport 4321 -j NOTRACK |
This file contains hidden or 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
Determinado usuário Linux tem "blank screen" após login. | |
sudo find . -type f -name "*displays*" | |
mv ~/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml ~/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml.bak | |
sudo reboot | |
OU | |
mv $(sudo find . -type f -name "*displays*") /opt/displays.xml.bak |
This file contains hidden or 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
*LOCALHOST|TEST PURPOSE ONLY* | |
# Exemplo 2 | |
# Ou exemplo "Docker Compose" | |
https://www.zabbix.com/documentation/3.0/manual/installation/containers | |
# Link'em all | |
docker network create zabbix | |
# Banco de dados |
This file contains hidden or 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
<?php | |
require_once __DIR__.'/../vendor/autoload.php'; | |
// Look for | |
// https://github.com/laravel/lumen/pull/132 | |
// PoC | |
// Illuminate\Support\Env::disablePutenv(); |
This file contains hidden or 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 | |
if ! [ -x "$(command -v docker)" ] | |
then | |
echo "⛔ Oh, my Gosh! You don't even have Docker on it." | |
exit 1; | |
else | |
sudo systemctl start docker | |
fi | |
if [ "$(egrep --color 'vmx|svm' /proc/cpuinfo)" == "" ] |
This file contains hidden or 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
It's useful whenever your lastest version of Fedora has no Docker on its repository. | |
For instance, Fedora 30 had no Docker (stable) available when released. | |
Then, you can go with the test version. | |
Prepare | |
sudo dnf -y update | |
sudo dnf -y install dnf-plugins-core |
NewerOlder