Skip to content

Instantly share code, notes, and snippets.

View brunopulis's full-sized avatar
:octocat:
Vá devagar, mas vá

Bruno Pulis brunopulis

:octocat:
Vá devagar, mas vá
View GitHub Profile
@brunopulis
brunopulis / validPhone.js
Created July 31, 2019 02:47 — forked from kaweski/validPhone.js
Valida telefones do Brasil com DDD, o 9º dígito e obrigatoriamente contendo 9 dígitos, mais espaços e caracteres de separação.
let regex = /^\([1-9]{2}\) 9 [7-9][0-9]{3}\-[0-9]{4}$/;
if( regex.test(c.value) ) {
return null;
} else {
return { phoneError: true };
}
function my_remove_wp_seo_meta_box() {
remove_meta_box('wpseo_meta', YOUR_POST_TYPE_NAME_HERE, 'normal');
}
add_action('add_meta_boxes', 'my_remove_wp_seo_meta_box', 100);
@brunopulis
brunopulis / .htaccess file - HTML5 Boilerplate
Last active September 24, 2019 17:09 — forked from erickarbe/.htaccess file - HTML5 Boilerplate
HTML5 Boilerplate .htaccess file - easy access
# Apache configuration file
# httpd.apache.org/docs/2.2/mod/quickreference.html
# Note .htaccess files are an overhead, this logic should be in your Apache config if possible
# httpd.apache.org/docs/2.2/howto/htaccess.html
# Techniques in here adapted from all over, including:
# Kroc Camen: camendesign.com/.htaccess
# perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/
# Sample .htaccess file of CMS MODx: modxcms.com
@brunopulis
brunopulis / perfectelementary.bash
Created June 30, 2016 02:31
HowTo Install the perfect Elementary-OS
#Download Elementary OS from here:
#http://sourceforge.net/projects/elementaryos/files/stable/
#First you update your system
sudo apt-get update && sudo apt-get dist-upgrade
#Install Google Chrome
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
@brunopulis
brunopulis / 0_reuse_code.js
Created December 14, 2015 12:07
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="robots" content="noodp, noydir" />
<link rel="dns-prefetch" href="//cdnjs.cloudflare.com">
<link rel="canonical" href="http://mysite.com/" />
<link rel="stylesheet" href="http://mysite.com/style.css" type="text/css" />
@brunopulis
brunopulis / Fetch.sublime-settings
Created November 13, 2012 13:08
Sublime Text 2 Fetch Settings
{
"files":
{
"Dynamic-Carousel": "https://raw.github.com/Wilto/Dynamic-Carousel/master/plugin.js",
"FitText": "https://raw.github.com/davatron5000/FitText.js/master/jquery.fittext.js",
"FitVids": "https://raw.github.com/davatron5000/FitVids.js/master/jquery.fitvids.js",
"Lettering.js": "https://raw.github.com/davatron5000/Lettering.js/master/jquery.lettering.js",
"Normalize.css": "https://raw.github.com/necolas/normalize.css/master/normalize.css",
"Sass-Css3-Mixins": "https://raw.github.com/matthieua/Sass-Css3-Mixins/master/css3-mixins.scss",
"_rem.scss": "https://raw.github.com/ry5n/rem/master/stylesheets/_rem.scss",