This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command
$ docker-compose up -d
# To Tear Down
$ docker-compose down --volumes
#!/bin/bash | |
# vjoin: Junta dois vídeos usando nomes parciais e concatena com ou sem reencodificação | |
# Uso: vjoin <arquivo1-parcial> <arquivo2-parcial> [nome-destino] [--force] | |
# ------------------------------------------ | |
# Instalando como comando global vjoin | |
# ------------------------------------------ | |
# Salve o script acima com o nome vjoin (sem .sh). |
#!/bin/bash | |
# vcut: Corta um trecho de um vídeo baseado no nome parcial e tempos de início/fim. | |
# Uso: | |
# vcut <nome-parcial> <início-MM:SS> <fim-MM:SS> [nome-destino-sem-extensão] | |
# ------------------------------------------ | |
# Instalando como comando global vcut | |
# ------------------------------------------ |
#!/bin/bash | |
# vcompress: comprime um vídeo encontrado por nome parcial. | |
# Uso: | |
# vcompress <nome-parcial> [--height <H>] [--crf <N>] [--noaudio] | |
# | |
# Padrões: | |
# --height <H> Altura do vídeo (padrão: 1440). Ex.: 720, 900, 1080, 1440 | |
# --crf <N> Qualidade CRF (padrão: 20). 0–51 (menor = melhor) | |
# --noaudio Remove a trilha de áudio | |
# |
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
$_evento = get_proximos_eventos(1); | |
$evento = $_evento[0]; | |
$unixtimestamp_inicio = strtotime($evento['data_inicio']); | |
echo date_i18n('M', $unixtimestamp_inicio); // Abril | |
// Depending on your blog settings you will see the date displayed in your local format, for example: 15. november 1976. | |
echo date_i18n( get_option( 'date_format' ), strtotime( '11/15-1976' ) ); |
// ============================================================================= | |
// String Replace | |
// ============================================================================= | |
@function str-replace($string, $search, $replace: '') { | |
$index: str-index($string, $search); | |
@if $index { | |
@return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace); | |
} |
/* | |
This .scss loop will create "margin helpers" and "padding helpers" for use in your web projects. | |
It will generate several classes such as: | |
.m-r-10 which gives margin-right 10 pixels. | |
.m-r-15 gives MARGIN to the RIGHT 15 pixels. | |
.m-t-15 gives MARGIN to the TOP 15 pixels and so on. | |
.p-b-5 gives PADDING to the BOTTOM of 5 pixels | |
.p-l-40 gives PADDING to the LEFT of 40 pixels |
/* ---------------- | |
This is an inplace message component (not dialog, toaster, snackbar or modal) | |
It must be used with Material UI | |
Usage: | |
<Message | |
type="success" | |
title="Congratulations!" | |
content="Your documents fulfill all the requirements. We'll contact you soon." /> |
/* ---------------- | |
It changes the output HTML of Wordpress default gallery | |
Originally implemented by t31os (Wordpress Stack Exchange) | |
Alan | |
----------------- */ |