Skip to content

Instantly share code, notes, and snippets.

View eliasfaical's full-sized avatar
🏠
Working from home

Elias Faiçal eliasfaical

🏠
Working from home
View GitHub Profile
@eliasfaical
eliasfaical / query.php
Last active March 6, 2021 20:52
Loop post type WP
<?php
/*
* Loop post type: V1
*/
$posts = array(
array( 'post_type' => 'post1', 'post_per_page' => -1 ),
array( 'post_type' => 'post2', 'post_per_page' => -1 ),
array( 'post_type' => 'post3', 'post_per_page' => -1 )
);
@eliasfaical
eliasfaical / single.php
Created May 23, 2013 14:56
Other pages single
<?php
$postTypeCurrent = get_post_type();
switch ($postTypeCurrent) {
case 'noticias':
include_once TEMPLATEPATH . '/app/single-noticias.php';
break;
case 'agenda':
@eliasfaical
eliasfaical / media-queries
Created July 1, 2013 13:25
Media Queries - CSS
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* STYLES GO HERE */
}
/* Smartphones (landscape) ----------- */
@media only screen
and (min-width : 321px) {
@eliasfaical
eliasfaical / pong
Created July 1, 2013 13:28
Pong HTML5 - by: Vitor Rigoni
<!DOCTYPE html>
<html>
<head>
<title>Pong - Vitor Rigoni</title>
</head>
<body>
<canvas id="canvas" width="800" height="400"></canvas>
<p>Controles:</p>
<dl>
@eliasfaical
eliasfaical / form-validate
Created July 4, 2013 14:17
Formulário: validação - input - envio
(function($){
// Mascara - tem que usar o plugin jquery-maskedinput.js
if($('#telefone').length > 0) {
$("#telefone").mask("(99) 9999-9999");
}
// controla os inputs
$('form input:text, form textarea').each(function(){
var default_value = $(this).attr('title');
@eliasfaical
eliasfaical / phpmailer
Created July 4, 2013 14:19
Envio de e-mail com php
<?php
/*
* Template Name: Ajax Contato
*/
include_once('phpmailer/class.phpmailer.php');
if(isset($_POST['nome']) && isset($_POST['telefone']) && isset($_POST['email']) && isset($_POST['telefone']) && isset($_POST['mensagem'])){
$str_nome = trim($_POST['nome']);
@eliasfaical
eliasfaical / plugin_sublime_text
Last active December 19, 2015 10:49
Lista de Plugin para Sublime Text
- Prefixr ( CRTL + ALT + X )
- Emment
- Placeholders
- Clipboard History
- Bracket Highlighter
- Sublimipsum
- AdvancedNewFile
- SideBarEnhancements
- AutoFileName
/* The Grid ---------------------- */
.lt-ie9 .row { width: 940px; max-width: 100%; min-width: 768px; margin: 0 auto; }
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.lt-ie9 .row.large-collapse .column,
.lt-ie9 .row.large-collapse .columns { padding: 0; }
.lt-ie9 .row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }
.lt-ie9 .row .row.large-collapse { margin: 0; }
.lt-ie9 .column, .lt-ie9 .columns { float: left; min-height: 1px; padding: 0 15px; position: relative; }
.lt-ie9 .column.large-centered, .columns.large-centered { float: none; margin: 0 auto; }
@eliasfaical
eliasfaical / carregar-widget
Created July 12, 2013 14:31
Carregamento de Widget ( facebook, Twitter)
$(window).load(function(){
$('#facebook_like_box')
.html('<iframe src="https://www.facebook.com/plugin...></iframe>');
});