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 database; | |
create database <db_name>; | |
# create schema <db_name>; | |
use <db_name>; | |
show tables; | |
# mariadb não suporta domínios | |
# Exemplo de domínio: sexo, assumindo somente os valores F ou M |
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
# como baixar repositório pela primeira vez | |
git clone <url-do-repositório> | |
# sobre .gitignore | |
# evita versionar arquivos de determinada extensão | |
# README.md | |
# Página principal com informações sobre o repositório. | |
# como saber quais arquivos foram ou não versionado... |
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
tmux | |
tmux ls | |
tmux attach-session -t my_session | |
ctrl + b: | |
1) ": divides pane horizontally (up and down) | |
2) %: divides pane vertically (left and right) | |
3) (holiding ctrl+b) right/left/up/down arrows: resize pane |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include "config.h" | |
#include "test.h" | |
#if HAVE_OPENSSL_SHA_H |
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 | |
# Dependencies | |
# tpm2-tools-4.0.1-1.fc31.x86_64 | |
# tpm2-tss-2.3.1-1.fc31.x86_64 | |
# tpm2-tss-engine-master | |
set -euxo pipefail | |
export TPM2TOOLS_TCTI="device:/dev/tpmrm0" |
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
GNU nano 4.3 disk-encryption.sh | |
#!/bin/bash | |
set -euxo pipefail | |
rpm -qa clevis* cryptsetup* luks* tpm2* e*fspr* | sort | |
# Creation | |
# dd if=/dev/zero of=/dev/sda1 bs=1M status=progress |
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 | |
set -euxo pipefail | |
export TPM2TOOLS_TCTI="device:/dev/tpmrm0" | |
export TPM2_PKCS11_TCTI="device:/dev/tpmrm0" | |
#export TPM2_PKCS11_LOG_LEVEL=2 | |
tpm2_print_handles () { | |
for i in transient saved-session loaded-session; |
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 | |
set -euo pipefail | |
cat /sys/kernel/security/ima/ascii_runtime_measurements | awk '{print $5}' | sort | uniq -c | sort -n -r |
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
shift+v: select lines | |
y: copy selected lines | |
d: delete selected lines | |
p: paste | |
u: undo | |
insert (once): add text | |
insert (twice): replace |
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
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 | |
mvn package #jar goes to target dir | |
## DOCKERFILE | |
FROM openjdk:8-jdk-alpine #or sconecuratedimages/apps:8-jdk-alpine | |
RUN apk --upgrade add maven | |
ADD . / | |
RUN mvn package | |
COPY ${JAR_FILE} app.jar | |
ENTRYPOINT ["java","-jar","/app.jar","arg1","arg2"] |
NewerOlder