Skip to content

Instantly share code, notes, and snippets.

View omariosouto's full-sized avatar

Mario Souto omariosouto

View GitHub Profile
<?php
$hoje = strtotime('now');
$data_ref = strtotime('2016-01-04');
if( $hoje >= $data_ref ) {
the_content('<p class="serif">' . __('Read the rest of this page &raquo;', 'pt_BR') . '</p>');
} else {
the_field('post_agendado');
}
<video autoplay poster="https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/polina.jpg" id="bgvid" loop>
<!-- WCAG general accessibility recommendation is that media such as background video play through only once. Loop turned on for the purposes of illustration; if removed, the end of the video will fade in the same way created by pressing the "Pause" button -->
<source src="//demosthenes.info/assets/videos/polina.webm" type="video/webm">
<source src="//demosthenes.info/assets/videos/polina.mp4" type="video/mp4">
</video>
<div id="polina">
<h1>Polina</h1>
<p>filmed by Alexander Wagner 2011
<p><a href="//demosthenes.info/blog/777/Create-Fullscreen-HTML5-Page-Background-Video">original article</a>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur porta dictum turpis, eu mollis justo gravida ac. Proin non eros blandit, rutrum est a, cursus quam. Nam ultricies, velit ac suscipit vehicula, turpis eros sollicitudin lacus, at convallis mauris magna non justo. Etiam et suscipit elit. Morbi eu o
@omariosouto
omariosouto / readme.md
Last active February 17, 2016 11:12
Bower - Tips

Bower

Instalando o bower

Para instalar o bower é necessário ter o NodeJS

  1. Com o node já instalado execute o comando "npm install -g bower"
  2. Para verificar se a instalação foi concluída basta executar um "bower help", esse comando serve também para ver a lista dos principais comandos.

@omariosouto
omariosouto / readme.md
Created February 17, 2016 00:42
Gulp - Tips

Gulp

Introdução

/*
true = Disponivel
false = Indisponivel
*/
//-------------------------------------------------------------------------------------------
var poltronas = [false, true, false, true, true, true, false, true, false];
@omariosouto
omariosouto / contact-form7.scss
Created March 9, 2016 19:24 — forked from renanlara/contact-form7.scss
Checkbox and Radio Button Custom - Contact Form 7
.wpcf7-checkbox, .radio {
display: block;
margin: 10px 0 0;
.wpcf7-list-item {
display: block;
input[type=checkbox], input[type=radio] {
display: none;
@omariosouto
omariosouto / sublimetext.md
Last active March 25, 2016 16:09
Sublime Text - Plugins

Sublime Initial Config

  • Package Control: Copy the text from 'https://packagecontrol.io/installation' and paste in the console 'view > show console' (after it restart the program)
  • Show Sidebar: view > sidebar > showsidebar

Sublime Theme

  • Material Theme: install package > material theme. After go to 'Preferences > Settings User' and paste

"theme": "Material-Theme.sublime-theme",

http://components.underscores.me/#generator
@omariosouto
omariosouto / init.php
Created May 11, 2016 15:44
WP - Redirect Posts
function wp_single_template_filter($single_template) {
$cat = get_the_category();
if(is_single() && $cat[0]->term_id == 33) :
wp_redirect( get_permalink(67) , 301 );
endif;
// if(is_single() && get_post_type() == 'painel-rotativo') :
// wp_redirect( get_permalink(8) , 301 );
// endif;