Skip to content

Instantly share code, notes, and snippets.

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

Rodrigo Antinarelli rodrigoea

🏠
Working from home
View GitHub Profile
@rodrigoea
rodrigoea / Box Sizing
Created January 24, 2014 13:43
The box-sizing property allows you to define certain elements to fit an area in a certain way.
*, *:before, *:after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}

Moving from jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
[
{ "keys": ["super+alt+7"], "command": "encode_html_entities" },
{ "keys": ["super+enter"], "command": "insert", "args": {"characters": "<br>"} },
{ "keys": ["super+alt+l"], "command": "insert_snippet", "args": {"contents": "<li>${0:$SELECTION}</li>" } },
{ "keys": ["super+alt+b"], "command": "insert_snippet", "args": {"contents": "<strong>${0:$SELECTION}</strong>" } },
{ "keys": ["super+alt+i"], "command": "insert_snippet", "args": {"contents": "<em>${0:$SELECTION}</em>" } },
{ "keys": ["super+alt+u"], "command": "insert_snippet", "args": {"contents": "<u>${0:$SELECTION}</u>" } },
{ "keys": ["super+alt+down"], "command": "insert_snippet", "args": {"contents": "<sub>${0:$SELECTION}</sub>" } },
{ "keys": ["super+alt+up"], "command": "insert_snippet", "args": {"contents": "<sup>${0:$SELECTION}</sup>" } },
@rodrigoea
rodrigoea / media-queries.css
Created June 9, 2014 19:03
Media Query Break Points
/*==================================================
= Bootstrap 3 Media Queries =
==================================================*/
/*========== Mobile First Method ==========*/
/* Custom, iPhone Retina */
@media only screen and (min-width : 320px) {
}
@rodrigoea
rodrigoea / gist:4b3fcb919b1951e12c2e
Last active October 14, 2016 23:25
Sublime packages
@rodrigoea
rodrigoea / gist:817479ef9913e91735c5
Created June 25, 2014 13:11
Update Wordpress URL in Database
UPDATE wpQd1_options SET option_value = replace(option_value, 'http://oldurl/', 'http://newurl/') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wpQd1_posts SET guid = replace(guid, 'http://oldurl','http://newurl');
UPDATE wpQd1_posts SET post_content = replace(post_content, 'http://oldurl', 'http://newurl');
UPDATE wpQd1_postmeta SET meta_value = replace(meta_value,'http://oldurl','http://newurl');
@rodrigoea
rodrigoea / gist:bb91d6d8323318995cab
Last active August 29, 2015 14:04
Procedimentos para clonar um repositório no servidor via SSH

##Procedimentos para clonar um repositório no servidor via SSH

Para todo novo repositório deve ser gerado uma chave pública SSH para que a conexão seja permitida.

##Criar chave pública SSH

ssh-keygen

##Copiar chave pública para o clipboard

@rodrigoea
rodrigoea / gist:26e3de0bf13af853565b
Last active August 29, 2015 14:05
Make local repository same as remote

git fetch --all

git reset --hard origin/master

<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php
*/
$args = array(
@rodrigoea
rodrigoea / CF - Estados
Last active August 29, 2015 14:05
Estados do Brasil - Wordpress & HTML
array(
'name' => 'Estado',
'desc' => '',
'id' => $prefix . 'oc_estado',
'type' => 'select',
'options' => array(
array( 'name' => 'Selecione um Estado', 'value' => '', ),
array( 'name' => 'Acre', 'value' => 'Acre', ),
array( 'name' => 'Alagoas', 'value' => 'Alagoas', ),
array( 'name' => 'Amapá', 'value' => 'Amapá', ),