This file contains 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
// Gerar certificado do servidor | |
// Onde tem leobaianotest.dev deve ser alterado para seu host | |
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout server.key -out server.crt -subj '/CN=leobaianotest.dev/O=leobaianotest.dev' | |
# Gerar CA root que assinará o certificado do cliente e ficará no servidor | |
openssl req -x509 -sha256 -newkey rsa:4096 -keyout ca.key -out ca.crt -days 356 -nodes -subj '/CN=Autoridade Cliente' | |
# Gerar csr para gerar certificado do cliente | |
openssl req -new -newkey rsa:4096 -keyout client.key -out client.csr -nodes -subj '/CN=Cliente' |
This file contains 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
{"lastUpload":"2020-01-30T17:45:26.941Z","extensionVersion":"v3.4.3"} |
This file contains 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
Para todas as instâncias | |
docker stop $(docker ps -a -q) | |
Remove todas as instâncias | |
docker rm $(docker ps -a -q) | |
Para todas as imagens | |
docker image rm $(docker image ls -a -q) |
This file contains 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
$ cd /Applications/MAMP/Library/bin/ | |
$ ./mysqldump --host=localhost -uroot -proot source_database > ~/Desktop/database_name-dump.sql |
This file contains 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
docker stop $(docker ps -a -q) | |
docker rm $(docker ps -a -q) |
This file contains 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 atom_search_where($where){ | |
global $wpdb; | |
if (is_search()) | |
$where .= "OR (t.name LIKE '%".get_search_query()."%' AND {$wpdb->posts}.post_status = 'publish')"; | |
return $where; | |
} | |
function atom_search_join($join){ | |
global $wpdb; |
This file contains 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 | |
$estados = array ( | |
'AC'=>'Acre', | |
'AL'=>'Alagoas', | |
'AP'=>'Amapá', | |
'AM'=>'Amazonas', | |
'BA'=>'Bahia', | |
'CE'=>'Ceará', | |
'DF'=>'Distrito Federal', | |
'ES'=>'Espírito Santo', |
This file contains 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
function onOpen() { | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var tsvMenuEntries = [{name: "export as TSV files", functionName: "saveAstsv"}]; | |
ss.addMenu("tsv", tsvMenuEntries); | |
}; | |
function saveAstsv() { | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var sheets = ss.getSheets(); | |
// create a folder from the name of the spreadsheet |
This file contains 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
<script> | |
function send_events( category, action, label ){ | |
ga( 'create', 'UA-xxxxx' ); | |
ga( 'send', 'event', { | |
eventCategory:category, | |
eventAction:action, | |
eventLabel:label | |
} | |
); | |
} |
This file contains 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 | |
$args = [ | |
'post_type' => 'slider', | |
'posts_per_page' => 5, | |
'tax_query' => array( | |
array( | |
'taxonomy' => 'slider', | |
'field' => 'slug', | |
'terms' => array ('institutional-slider', 'image-slider') | |
) |
NewerOlder