Exibe um pom.xml do Maven com as configuraçes para o Maven criar um arquivo FatJar.
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 | |
# This is a custom script to download and install Oracle JDK from archive file | |
# Please note that this script was only tested only on: | |
# Raspberry Pi 5 running Raspberry Pi OS (64-bit) (Debian Bookworm port) | |
# This script is provided as is and you are free to use it at your own risk | |
# The author is not responsible for any damage caused by this script | |
if [ "$(id -u)" -ne 0 ]; then | |
echo "Please run as root with sudo -i command" |
These are the steps I followed enable VirtualBox on my laptop without disabling UEFI Secure Boot. They're nearly identical to the process described on [Øyvind Stegard's blog][blog], save for a few key details. The images here are borrowed from the [Systemtap UEFI Secure Boot Wiki][systemtap].
- Install the VirtualBox package (this might be different for your platform).
src='https://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo'
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 | |
for modfile in /lib/modules/$(uname -r)/*.ko; do | |
echo "Signing $modfile" | |
/usr/src/kernels/$(uname -r)/scripts/sign-file sha256 \ | |
/root/module-signing/MOK.priv \ | |
/root/module-signing/MOK.der "$modfile" | |
done | |
modprobe vboxdrv |
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
const waitFor = (ms) => new Promise(r => setTimeout(r, ms)) | |
const asyncForEach = async (array, callback) => { | |
for (let index = 0; index < array.length; index++) { | |
await callback(array[index], index, array) | |
} | |
} | |
const start = async () => { | |
await asyncForEach([1, 2, 3], async (num) => { | |
await waitFor(50) |
Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/
sudo amazon-linux-extras install docker
sudo service docker start
sudo usermod -a -G docker ec2-user
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
SELECT | |
CONCAT('`', TABLE_SCHEMA, '`.`', TABLE_NAME, '`') AS `OBJECT NAME`, | |
ROUND((DATA_LENGTH / 1024 / 1024), 2) AS `OBJECT SIZE (MB)`, | |
`RATIO`, | |
ROUND((DATA_FREE / 1024 / 1024), 2) AS `LOOSE SPACE (MB)`, | |
`DDL` | |
FROM | |
( | |
SELECT | |
TABLE_SCHEMA, |
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
axios({ | |
url: 'http://localhost:5000/static/example.pdf', | |
method: 'GET', | |
responseType: 'blob', // important | |
}).then((response) => { | |
const url = window.URL.createObjectURL(new Blob([response.data])); | |
const link = document.createElement('a'); | |
link.href = url; | |
link.setAttribute('download', 'file.pdf'); | |
document.body.appendChild(link); |
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 | |
function validar_cnpj($cnpj) | |
{ | |
$cnpj = preg_replace('/[^0-9]/', '', (string) $cnpj); | |
// Valida tamanho | |
if (strlen($cnpj) != 14) | |
return false; |