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 | |
# Obtém o último commit de merge | |
LAST_MERGE_COMMIT=$(git log --merges -n 1 --pretty=format:"%H") | |
# Obtém todos os commits desde o último merge | |
COMMITS=$(git log $LAST_MERGE_COMMIT..HEAD --pretty=format:"%s") | |
# Inicializa os incrementos de versão | |
MAJOR=0 |
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 | |
# Gera a nova versão | |
NEW_VERSION=$(./commands/generate_version.sh) | |
# Obtém o último commit de merge | |
LAST_MERGE_COMMIT=$(git log --merges -n 1 --pretty=format:"%H") | |
# Obtém todas as mensagens de commits desde o último merge | |
COMMITS=$(git log $LAST_MERGE_COMMIT..HEAD --pretty=format:"%s" --no-merges) |
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
# (VIRTUALBOX) Adicionando dependencias (virtualbox ubuntu server 20.04) | |
sudo add-apt-repository -y multiverse && | |
sudo apt update && | |
sudo apt install -y virtualbox-guest-dkms virtualbox-guest-x11 openssh-server && | |
# Instala o cli da aws (necessário somente para subir o sistema) | |
sudo apt install awscli -y && | |
# (BACK) Instala as dependências | |
sudo apt install build-essential -y && |
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
# Cache node modules - speeds up future builds | |
cache: | |
paths: | |
- node_modules | |
stages: | |
- build | |
- run | |
variables: |
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/sh | |
docker rm -f $(docker ps -qa) | |
docker volume rm $(docker volume ls -q) | |
cleanupdirs="/var/lib/etcd /etc/kubernetes /etc/cni /opt/cni /var/lib/cni /var/run/calico /opt/rke /opt/rancher" | |
for dir in $cleanupdirs; do | |
echo "Removing $dir" | |
rm -rf $dir | |
done |
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
Show hidden characters
{ | |
"env": { | |
"es6": true, | |
"node": true, | |
"jest": true | |
}, | |
"extends": [ | |
"airbnb-base", | |
"plugin:@typescript-eslint/recommended", | |
"prettier/@typescript-eslint", |
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
#!/usr/bin/env python3 | |
import subprocess | |
db_prochot_loc = '0x1fc' | |
def main(): | |
p = subprocess.run(['rdmsr', db_prochot_loc], stdout=subprocess.PIPE, encoding='utf8') | |
orig_str = p.stdout.rstrip() | |
v = int('0x' + orig_str, 16) ^ 0b1 |
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
version: '2' | |
services: | |
cloudflare-ddns: | |
image: oznu/cloudflare-ddns:armhf # use 'latest' para linux ou 'armhf' or 'aarch64' se usar um Raspberry Pi | |
restart: always | |
environment: | |
- [email protected] # coloque o e-mail utilizado no cadastro da cloudflare | |
- API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # coloque sua chave de api da cloudflare | |
- ZONE=homelab.srv.br # coloque o seu dominio | |
- SUBDOMAIN=blog # coloque o registro A que voce criou na cloudflare |
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
FROM node:10.16 | |
EXPOSE 8080 | |
WORKDIR /app/ | |
COPY . . | |
COPY package*.json ./ | |
RUN npm install | |
RUN npm run build | |
RUN echo "finished building" | |
RUN ls -afl dist | |
FROM node:10.16-alpine |
NewerOlder