Skip to content

Instantly share code, notes, and snippets.

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

Guga Guichard gustavoguichard

🏠
Working from home
View GitHub Profile
@gustavoguichard
gustavoguichard / gist:3948168
Created October 24, 2012 19:07
Wordpress sublime project config
{
"folders":
[
{
"path": "/Users/Guga/Sites/sim/wp-content/themes/Sim",
"file_exclude_patterns": ["*.pot", "*.mo", "*.txt"],
"folder_exclude_patterns": [".sass-cache", "images"]
},
{
"path": "/Users/Guga/Sites/sim/wp-content/plugins",
@gustavoguichard
gustavoguichard / gist:3948216
Created October 24, 2012 19:17
Wordpress query
<?php $my_query = new WP_Query('showposts=3&tag=tag'); ?>
<?php if($my_query->have_posts()) : ?><?php while($my_query->have_posts()) : $my_query->the_post(); ?>
<?php the_content(); ?>
<?php endwhile; endif; wp_reset_query(); ?>
@gustavoguichard
gustavoguichard / gist:3959974
Created October 26, 2012 17:06
Future Sass gem
// This code isn't yet fully tested
// CUSTOM HTML RESETS
html
text-rendering: optimizeLegibility
-webkit-font-smoothing: antialiased
= css-techniques($font-size: 16)
html
@gustavoguichard
gustavoguichard / gist:4024379
Created November 6, 2012 12:36
Use case of my gem
.copyright
+outerRow
display: block
font-size: relative-size(11,14)
+move(68px, bottom)
+decorative-content
+sprite-replace("bird")
bottom: 48px
+absolute-centering(30px, right, 320px)
+context(".contact-page")
@gustavoguichard
gustavoguichard / gist:4024390
Created November 6, 2012 12:40
Compiled CSS
.copyright {
width: 1000px;
max-width: 100%;
min-width: 768px;
margin: 0 auto;
display: block;
font-size: 0.78571em;
bottom: -68px;
position: relative;
}
@gustavoguichard
gustavoguichard / page.php
Created November 6, 2012 17:00
A simple page.php
<?php get_header(); ?>
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<article>
<header>
<?php $page_quoted_title = get_post_meta($post->ID, 'page_quoted_title', true);?>
<h2><?php if($page_quoted_title){echo nl2br($page_quoted_title);} else {the_title();} ?></h2>
</header>
<?php the_content();?>
</article>
<?php $extra_content = get_post_meta($post->ID, 'extra_content', true);?>
@gustavoguichard
gustavoguichard / cria-page.php
Created November 6, 2012 17:04
WP Template page example
<?php
/**
* Template Name: Cria Page
*
* @package WordPress
* @subpackage Cria Ideias
* @since Gustavo Guichard 2012
*/
get_header(); ?>
@gustavoguichard
gustavoguichard / gist:4073942
Created November 14, 2012 18:44
Semantic-mixins use case
#site_overview
background-color: $aqua
padding: 2*$base-margin 0
+decorative-content
$name: "star"
+sprite-replace($name)
+absolute-centering(sprites-sprite-width($name))
bottom: - sprites-sprite-height($name)/2
.post_overview
@gustavoguichard
gustavoguichard / gist:4073966
Created November 14, 2012 18:50
Semantic-mixin use case compiled
#site_overview {
background-color: #e5edf3;
padding: 2.8em 0;
position: relative;
}
#site_overview:after {
background: url('../images/sprites-s2d93560836.png') no-repeat;
content: "";
display: block;
@gustavoguichard
gustavoguichard / gist:4087005
Created November 16, 2012 12:38
open iPhone simulator from terminal
alias iPhone="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app/Contents/MacOS/iPhone\ Simulator"