Skip to content

Instantly share code, notes, and snippets.

Eduardo Dias edurodriguesdias

View GitHub Profile
View permissions.txt
chmod -R 755 wp-content
chmod -R 755 wp-admin
chmod -R 755 wp-includes
chmod 755 .
chmod 644 .htacces
@edurodriguesdias
edurodriguesdias / infoPlist
Created Sep 19, 2019
Description to access mobile resources
View infoPlist
"infoPlist": {
"NSCameraUsageDescription": "Habilite o acesso à câmera para tirar e cadastrar uma nova foto em seu perfil.",
"NSLocationWhenInUsageDescription": "Isso nos permite usar sua localização para encontrar a ficha técnica do imóvel que você está neste momento.",
"NSPhotoLibraryAddUsageDescription": "Habilite o acesso à sua galeria de fotos, com isso você poderá selecionar uma foto já existe para cadastrar em seu perfil.",
}
@edurodriguesdias
edurodriguesdias / estados-brasileiros-codigo-ibge.html
Created Aug 8, 2019
Select estados brasileiros com código IBGE
View estados-brasileiros-codigo-ibge.html
<select name="estado" id="estado" class="estado">
<option value="" data-code="">Selecione o estado</option>
<option value="AC" data-code="12">Acre</option>
<option value="AL" data-code="27">Alagoas</option>
<option value="AP" data-code="16">Amapá</option>
<option value="AM" data-code="13">Amazonas</option>
<option value="BA" data-code="29">Bahia</option>
<option value="CE" data-code="23">Ceará</option>
<option value="DF" data-code="53">Distrito Federal</option>
<option value="ES" data-code="32">Espírito Santo</option>
@edurodriguesdias
edurodriguesdias / list.php
Last active Jul 23, 2019
TABLE LIST USERS - PLUGIN DEVELOPMENT
View list.php
<?php
class Lista_Table extends WP_List_Table
{
public $items;
function __construct()
{
parent::__construct(
@edurodriguesdias
edurodriguesdias / magento2_permissions.txt
Last active Mar 26, 2019
Permissions for magento 2 project
View magento2_permissions.txt
find . -type f -exec chmod 664 {} \;
find . -type d -exec chmod 775 {} \;
find var pub/static pub/media app/etc -type f -exec chmod g+w {} \;
find var pub/static pub/media app/etc -type d -exec chmod g+ws {} \;
chmod u+x bin/magento
/*
*cd /var/www/html/magento2 && sudo find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} + && sudo *find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} + && sudo chmod *u+x bin/magento
*/
View wordpress-admin-template.html
<div id="wpbody">
<div id="wpbody-content" aria-label="Main content" tabindex="0" style="overflow: hidden;">
<div class="wrap">
<h2>Edit Something <a href="" class="add-new-h2">Enviar email</a> </h2>
<form name="post" action="" id="post">
<div id="poststuff">
<div id="post-body" class="metabox-holder columns-2">
<div id="post-body-content">
@edurodriguesdias
edurodriguesdias / custom.js
Last active Dec 14, 2018
Show only files with .zip or .pdf extension WP MEDIA - Wordpress
View custom.js
var image = wp.media({
title: 'Import file',
multiple: false, //if true, allow select multiple files
library: {
type: [ 'application/zip', 'application/pdf' ]
}
}).open()
.on('select', function(e){
//DO SOMETHING
});
View estados-brasileiros.html
//ESTADOS BRASILEIROS SELECT
<select id="estado" name="estado" required="required" class="form-input">
<option value="">Selecione um estado</option>
<option value="AC">Acre</option>
<option value="AL">Alagoas</option>
<option value="AP">Amapá</option>
<option value="AM">Amazonas</option>
<option value="BA">Bahia</option>
<option value="CE">Ceará</option>
@edurodriguesdias
edurodriguesdias / paises.html
Created Dec 7, 2018
Options countrys of world - Select países
View paises.html
//Paises do mundo
//Countrys of world
<select id="country" name="country" class="form-control">
<option value="Afghanistan">Afghanistan</option>
<option value="Åland Islands">Åland Islands</option>
<option value="Albania">Albania</option>
<option value="Algeria">Algeria</option>
<option value="American Samoa">American Samoa</option>
<option value="Andorra">Andorra</option>
@edurodriguesdias
edurodriguesdias / wp-config.php
Created Dec 5, 2018
Configurar SMTP Wordpress - wp_mail()
View wp-config.php
define( 'SMTP_USER', 'your-mail' ); // Username to use for SMTP authentication
define( 'SMTP_PASS', 'your-password' ); // Password to use for SMTP authentication
define( 'SMTP_HOST', 'smtp.gmail.com'); // The hostname of the mail server (it's for gmail servers)
define( 'SMTP_FROM', 'email-from' ); // SMTP From email address
define( 'SMTP_NAME', 'your-name' ); // SMTP From name
define( 'SMTP_PORT', '587' ); // SMTP port number - likely to be 25, 465 or 587
define( 'SMTP_SECURE', 'tls' ); // Encryption system to use - ssl or tls
define( 'SMTP_AUTH', true ); // Use SMTP authentication (true|false)
define( 'SMTP_DEBUG', 1 ); // for debugging purposes only set to 1 or 2
You can’t perform that action at this time.