Skip to content

Instantly share code, notes, and snippets.

View daniloroddrigues's full-sized avatar

Danilo Rodrigues daniloroddrigues

  • Full Stack Developer
View GitHub Profile
@daniloroddrigues
daniloroddrigues / form-step-jquery.html
Last active February 21, 2022 21:33
Form step jQuery
<form action=""
method="post">
<div id="wizard">
<!-- form-field -->
<h4></h4>
<section class="form-field">
<div>
<label for="name">Como devo te chamar? <span class="text-red-600">*</span></label>
@daniloroddrigues
daniloroddrigues / estados.txt
Created February 15, 2022 22:58
Lista de estados e siglas
Acre (AC)
Alagoas (AL)
Amapá (AP)
Amazonas (AM)
Bahia (BA)
Ceará (CE)
Distrito Federal (DF)
Espírito Santo (ES)
Goiás (GO)
Maranhão (MA)
function tirarAcentos($string){
return preg_replace(array("/(á|à|ã|â|ä)/","/(Á|À|Ã|Â|Ä)/","/(é|è|ê|ë)/","/(É|È|Ê|Ë)/","/(í|ì|î|ï)/","/(Í|Ì|Î|Ï)/","/(ó|ò|õ|ô|ö)/","/(Ó|Ò|Õ|Ô|Ö)/","/(ú|ù|û|ü)/","/(Ú|Ù|Û|Ü)/","/(ñ)/","/(Ñ)/", "/�/"),explode(" ","a A e E i I o O u U n N 1"),$string);
}
function urlizer($string) {
$acentos = array(
'A' => '/À|Á|Â|Ã|Ä|Å/',
'a' => '/à|á|â|ã|ä|å/',
'C' => '/Ç/',
'c' => '/ç/',
<div>
<h5>Address</h5>
<p>
<input name="saida-cep" type="text" id="saida-cep" class="cep" value="" size="10" maxlength="9" onblur="pesquisacep(this.value);" placeholder="Digite o CEP do Local" aria-required="true" /></p>
<p class="content-50">
<input name="saida-uf" type="text" id="saida-uf" size="2" placeholder="UF" aria-required="true" aria-required="true" /> </p>
<p class="content-50">
<input name="saida-cidade" type="text" id="saida-cidade" size="40" placeholder="Cidade" aria-required="true" /> </p>
<p class="content-50">
/*
jQuery Masked Input Plugin
Copyright (c) 2007 - 2014 Josh Bush (digitalbush.com)
Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license)
Version: 1.4.0
*/
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){var b,c=navigator.userAgent,d=/iphone/i.test(c),e=/chrome/i.test(c),f=/android/i.test(c);a.mask={definitions:{9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},autoclear:!0,dataName:"rawMaskFn",placeholder:"_"},a.fn.extend({caret:function(a,b){var c;if(0!==this.length&&!this.is(":hidden"))return"number"==typeof a?(b="number"==typeof b?b:a,this.each(function(){this.setSelectionRange?this.setSelectionRange(a,b):this.createTextRange&&(c=this.createTextRange(),c.collapse(!0),c.moveEnd("character",b),c.moveStart("character",a),c.select())})):(this[0].setSelectionRange?(a=this[0].selectionStart,b=this[0].selectionEnd):document.selection&&document.selection.createRange&&(c=documen
@daniloroddrigues
daniloroddrigues / .htaccess
Created April 5, 2021 20:28
Simple WP htaccess
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php73” package as the default “PHP” programming language.
<IfModule mime_module>
AddHandler application/x-httpd-ea-php73 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
# BEGIN WordPress
# As diretrizes (linhas) entre "BEGIN WordPress" e "END WordPress" são
; cPanel-generated php ini directives, do not edit
; Manual editing of this file may result in unexpected behavior.
; To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
; For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI)
display_errors = Off
max_execution_time = 180
max_input_time = 180
max_input_vars = 1000
memory_limit = 1000M
@daniloroddrigues
daniloroddrigues / wp_migration.sql
Last active March 11, 2022 01:23
SQLMigration
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl');
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl');
# MOD DEFLATE
<IfModule mod_deflate.c>
# Compress HTML, CSS, JavaScript, Text, XML and fonts
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-truetype
@daniloroddrigues
daniloroddrigues / app.js
Created April 5, 2021 02:43 — forked from ozknozsrt/app.js
WordPress API - how to fetch and paginate posts with Vue.js
import Vue from 'vue';
import posts from './components/posts.vue';
window.axios = require('axios');
window.Vue = Vue;
Vue.component('posts', posts);
const app = new Vue({
el: '#app',