Skip to content

Instantly share code, notes, and snippets.

View jgraffin's full-sized avatar

Julio Graffin jgraffin

View GitHub Profile
@jgraffin
jgraffin / 0_reuse_code.js
Created January 4, 2016 16:38
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
@jgraffin
jgraffin / gist:15b1d3b7bd673bc4aaf9
Created December 18, 2015 19:26
Adicionando link para slug de pagina interna
<a href="echo get_permalink( get_page_by_slug( 'blog' ) )">ver todos os posts</a>
@jgraffin
jgraffin / gist:9704968ae1972919ec03
Last active December 18, 2015 19:10
Adicionando imagem destacada no fundo da div - pagina interna
$imagem_destacada = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );
background-image: url('<?php echo $imagem ?>')
@jgraffin
jgraffin / gist:6fbbfd5e1d322af8e3a2
Last active December 18, 2015 18:57
Hack para pegar somente Safari
_::-webkit-full-page-media, _:future, :root body {
border:1px solid red !important;
}
@jgraffin
jgraffin / gist:fd9b2a5435176617b60e
Created December 16, 2015 20:00
API Facebook - Autorizando botão para download
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '1217349928306957',
xfbml : true,
version : 'v2.5'
});
};
(function(d, s, id){
@jgraffin
jgraffin / identify-browser-and-os.php
Last active August 31, 2015 20:56 — forked from celsofabri/identify-browser-and-os.php
Identify browser and os / Identifica navegador e sistema operacional
<?php
function mv_browser_body_class($classes) {
global $is_lynx, $is_gecko, $is_IE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone;
if($is_lynx) $classes[] = 'lynx';
elseif($is_gecko) $classes[] = 'gecko';
elseif($is_opera) $classes[] = 'opera';
elseif($is_NS4) $classes[] = 'ns4';
elseif($is_safari) $classes[] = 'safari';
elseif($is_chrome) $classes[] = 'chrome';
@jgraffin
jgraffin / SassMeister-input-HTML.html
Last active August 29, 2015 14:20
Generated by SassMeister.com.
<!DOCTYPE html>
<html>
<head>
<title>Boxes</title>
</head>
<link href="css/styles.css" rel="stylesheet" />
<body>
<div id="wrapper">
<div class="content">
<div class="boxGreen">
@jgraffin
jgraffin / SassMeister-input.scss
Created April 26, 2015 01:28
Generated by SassMeister.com.
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
nav {
ul {
list-style:none;
margin: 0px;
padding: 0px;