Skip to content

Instantly share code, notes, and snippets.

Bruno Fernando dos Santos Silva 3runoDesign

Block or report user

Report or block 3runoDesign

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@3runoDesign
3runoDesign / wp-core.scss
Created Aug 26, 2015
Style WP CORE with Bourbon
View wp-core.scss
// ALIGNMENTS TEXT
// ===========================
%align-default { margin: 5px 20px 20px 0; }
@each $a in ('none', 'right', 'left') {
.align#{$a} { @extend %align-default; }
a img.align#{$a} { @extend %align-default; }
.wp-caption.align#{$a} { @extend %align-default; }
}
View getnameurlyoutubelist.js
var els = document.querySelectorAll('.feed-item-container .post-item .feed-item-main .feed-item-main-content .yt-lockup .yt-lockup-dismissable');
for (var i = 0; i < els.length; i++ ) {
var regExp = /^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]{11,11}).*/;
var url = els[i].querySelector('.yt-uix-tile-link').href.match(regExp);
var title = els[i].querySelector('.yt-uix-tile-link').text;
console.log(
"id_yt:" + url[2] +
"\nname:" + title +
View open-graph.md

##Open Graph Code Snippet Put this in the header of your site. Update the info below with dynamic content leaving article as is.

<meta property="og:title" content="Site Title" />
<meta property="og:type" content="article" />
<meta property="og:image" content="Image URL" />
<meta property="og:url" content="Page URL" />
<meta property="og:description" content="Page Description" />
View setting_sublime.json
{
"tab_size": 2,
"translate_tabs_to_spaces": true,
"ensure_newline_at_eof_on_save": true,
"trim_trailing_white_space_on_save": true,
"save_on_focus_lost": true,
"highlight_modified_tabs": true
# http://designosfera.blogspot.com.br/2013/04/sublime-text-2-configuracoes-like-boss.html
}
@3runoDesign
3runoDesign / README.md
Last active Aug 29, 2015
Git branch all
View README.md

Git all branch

Criar uma pasta dos seus scripts:

mkdir ~/scripts && $_
touch gitallbranch.sh
View .editorconfig
http://editorconfig.org
root = true
# General Files
[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
View download_wp.sh
curl -O https://wordpress.org/latest.tar.gz && tar -xvzf latest.tar.gz && mv wordpress/* . && rmdir wordpress/ && rm latest.tar.gz && rmdir wordpress/ && rm latest.tar.gz && cp wp-config-sample.php wp-config.php
@3runoDesign
3runoDesign / MontarSoma.js
Last active Apr 11, 2016
Soma dos produtos favoritos do ML. ( Quantidade e frete são informados manualmente )
View MontarSoma.js
var soma = '';
$('.itemList').each(function( e ){
var nameItem = $( this ).find( '.itemTitle' ).text().replace( /\t/g, '' ).replace( /\n/g, '' ).replace( ' ', '' ).replace( ' ', '' );
var price_txt = $( this ).find( '.itemsSecondaryInfo .price-info' ).text();
price_txt = price_txt.replace( /\s/g, '' ).replace( 'R$', '' ).replace( '.', '' );
var c = price_txt.substr( ( price_txt.length - 2 ) , 2 ),
r = price_txt.substr( 0, ( price_txt.length - 2 ) ),
price = ( r + '.' + c );
View estados-cidades.json
{
"estados": [
{
"sigla": "AC",
"nome": "Acre",
"cidades": [
"Acrelândia",
"Assis Brasil",
"Brasiléia",
"Bujari",
You can’t perform that action at this time.