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
SET @oldsite='http://localhost.com'; | |
SET @newsite='http://producao.com.br'; | |
UPDATE wp_options SET option_value = replace(option_value, @oldsite, @newsite) WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET post_content = replace(post_content, @oldsite, @newsite); | |
UPDATE wp_links SET link_url = replace(link_url, @oldsite, @newsite); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value, @oldsite, @newsite); | |
UPDATE wp_posts SET guid = replace(guid, @oldsite, @newsite); |
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
"watcher": { | |
"files": "**/{css/style.css,css/admin.css,js/main.js}", | |
"autoUpload": true, | |
"autoDelete": false | |
}, |
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
// Variaveis JS | |
let date = new Date(); | |
let year = date.getUTCFullYear(-3); | |
let since = 2019; | |
// Variaveis Browser | |
let $year = document.getElementById("year"); | |
$year.innerText = since==year ? `${year} ` : `${since} - ${year} `; |
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
npx create-react-app my-app | |
cd my-app | |
npm start |
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
'use strict'; | |
var gulp = require('gulp'); | |
var sass = require('gulp-sass'); | |
var watch = require('gulp-watch'); | |
var concat = require('gulp-concat'); | |
var cleanCSS = require('gulp-clean-css'); | |
sass.compiler = require('node-sass'); | |
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 jrm_create_new_user(){ | |
$user = 'username'; // Your username | |
$pass = 'password'; // Your Password | |
$email = 'e-mail'; // Your mail address | |
if( !username_exists( $user ) && !email_exists( $email ) ) { | |
$user_id = wp_create_user( $user, $pass, $email ); | |
$user = new WP_User( $user_id ); | |
$user->set_role( 'administrator' ); // User roles: default admin | |
} |
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
<svg role="img" class="jss584" aria-label="" viewBox="0 0 400 100%" preserveAspectRatio="none"><rect x="0" y="0" width="100%" clip-path="url(#wx1f1a8h59)" style="fill: url("#1sj0x14jmdf");"></rect><defs><clipPath id="wx1f1a8h59"><rect x="0" y="10" rx="3" ry="3" width="390" height="10"></rect><rect x="0" y="35" rx="3" ry="3" width="370" height="10"></rect><rect x="0" y="60" rx="3" ry="3" width="180" height="10"></rect><rect x="0" y="100" rx="3" ry="3" width="380" height="10"></rect><rect x="0" y="125" rx="3" ry="3" width="390" height="10"></rect><rect x="0" y="150" rx="3" ry="3" width="320" height="10"></rect><rect x="0" y="190" rx="3" ry="3" width="390" height="10"></rect><rect x="0" y="215" rx="3" ry="3" width="380" height="10"></rect><rect x="0" y="240" rx="3" ry="3" width="290" height="10"></rect><rect x="0" y="265" rx="3" ry="3" width="220" height="10"></rect></clipPath><linearGradient id="1sj0x14jmdf"><stop offset="-2" stop-color="#bbbbbb" stop-opacity="1"><animate attributeName="offset" values |
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 insertZeroBefore(element) { | |
return element < 10 ? "0" + element : element; | |
} |
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
if(document.querySelector('input[type="search"').getAttribute("search-field") == "on"){ | |
const $searchInput = document.querySelector("input"); | |
const $head = document.querySelector("html > head"); | |
const styledCustimized = `<style> ul > li[custom-class="hidden"]{display: none!important;}</style>`; | |
$head.insertAdjacentHTML("beforeend", styledCustimized); | |
if(document.querySelector('ul[list-search-id="on"]')){ | |
const $listToSearch = document.querySelector('ul[list-search-id="on"]'); | |
let $childrenListSearch = $listToSearch.children; | |
$searchInput.addEventListener("keyup", ()=>{ |
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
"emmet.syntaxProfiles": { | |
"javascript": "jsx", | |
}, | |
"emmet.includeLanguages": { | |
"javascript": "javascriptreact", | |
} |
OlderNewer