- Crie uma pasta no
/var/www/
chamada.ssh
.
mkdir -p /var/www/.ssh
- Crie uma chave para o usuário
www-data
.
#!/bin/bash | |
[ "${USER}" != "root" ] && echo "Rode como root"; exit 2 | |
for dev in $(find /dev/ -maxdepth 1 -name "sd*1" ! -name "*sda1"); do | |
mkfs.fat -F32 -v -I "$dev" & | |
done | |
wait # Expects all jobs finished second plan. |
#!/bin/bash | |
SOURCE_DIR="$1" | |
if [ "${SOURCE_DIR}x" = "x" ]; then | |
SOURCE_DIR="/home/${USER}/Downloads/Fortaleza2040/" # the last / is important! | |
fi | |
[ ! -d "${SOURCE_DIR}" ] && echo "${SOURCE_DIR} is not a dir. Usage: $0 <dir>" && exit 2 | |
for mount_point in $(find /media/${USER}/ -maxdepth 1 -type d); do |
<VirtualHost *:80> | |
ServerName hom.sgps.fortaleza.ce.gov.br | |
DocumentRoot /var/www/meusistema | |
ErrorLog ${APACHE_LOG_DIR}/meusistema_error.log | |
CustomLog ${APACHE_LOG_DIR}/meusistema_access.log combined | |
<Directory /var/www/meusistema/public> | |
DirectoryIndex index.html index.php | |
Options -Indexes | |
AllowOverride All |
#!/bin/bash | |
# | |
# este script é interativo, ou seja, requer intervenção do usuário | |
# | |
# Não abrevie as informações nem utilize caracteres especiais incluindo | |
# letras acentuadas. | |
# | |
# Country Name (Código de país de 2 letras) | |
# State or Province Name (Estado, por extenso) | |
# Locality Name (Cidade, por extenso) |
#!/bin/sh | |
set -e | |
mkdir -p rfc2196 | |
cd rfc2196 | |
wget -r -nH -nd -np http://penta.ufrgs.br/gereseg/rfc2196/ | |
docker run -v $PWD:/tmp traumfewo/docker-wkhtmltopdf $(ls | sed "s|^|file:///tmp/|g" | xargs) "/tmp/rfc2196.pt-br.pdf" |
#!/bin/bash -e | |
IFADDR="192.168.3.1/24" | |
if [[ ! ip link show docker0 ]]; then | |
ip link add docker0 type bridge | |
ip addr add "$IFADDR" dev docker0 | |
ip link set docker0 up | |
iptables -t nat -A POSTROUTING -s "$IFADDR" ! -d "$IFADDR" -j MASQUERADE | |
fi |
#!/bin/bash | |
# | |
## Backup das configurações do pfSense de forma remota | |
##################### | |
# Configurações # | |
##################### | |
DIR="/backups/pfsense" # sem o barra no final | |
COD_RETORNO=0 # 0-OK | 1-Erro de login | 2-Arquivo não é XML | |
PROTOCOLO="https" # https ou http |
CREATE FUNCTION lower_unaccent(text) RETURNS text | |
LANGUAGE sql IMMUTABLE STRICT | |
AS $_$ | |
SELECT lower(translate($1 | |
, '¹²³áàâãäåāăąÀÁÂÃÄÅĀĂĄÆćčç©ĆČÇĐÐèéêёëēĕėęěÈÊËЁĒĔĖĘĚ€ğĞıìíîïìĩīĭÌÍÎÏЇÌĨĪĬłŁńňñŃŇÑòóôõöōŏőøÒÓÔÕÖŌŎŐØŒř®ŘšşșߊŞȘùúûüũūŭůÙÚÛÜŨŪŬŮýÿÝŸžżźŽŻŹ' | |
, '123aaaaaaaaaaaaaaaaaaacccccccddeeeeeeeeeeeeeeeeeeeeggiiiiiiiiiiiiiiiiiillnnnnnnooooooooooooooooooorrrsssssssuuuuuuuuuuuuuuuuyyyyzzzzzz' | |
)); | |
$_$; |
#!/bin/bash | |
# This script needs "mkvsrtadd" script | |
# (available on https://gist.github.com/samirfor/6dd0d0e8e2344ba3d093) | |
# to work properly. Make sure you have it in the same path of this script. | |
self=$(basename "$0") | |
selfdir=$(dirname "$0") | |
PWD=$(pwd -P) # resolving symbolic links | |
usage="[i] Usage: $self \"pattern\" \nBe sure pattern is into double quotes." |