Skip to content

Instantly share code, notes, and snippets.

@emanuelrosa
emanuelrosa / Perl-Intro.md
Created February 17, 2017 03:42
Um pequeno tutorial de Perl para meus amigos do Conhecimento livre

Mini Tutorial Perl

O perl possui uma vasta documentação(em ambientes linux execute perldoc) que já vem por default na sua instalação. Em ambientes linux, o perl já vem de fábrica =)

Bom, como já mencionado acima, você pode consultar a documentação como o comando perldoc <section>. A perldoc é dividida em sessões, abaixo irei listar algumas delas:

perlrun, perlsyn, perlvar, perlreftut, perllol, perlref, perldsc

Executando programas Perl

@emanuelrosa
emanuelrosa / Perl-Intro.md
Created February 17, 2017 03:42
Um pequeno tutorial de Perl para meus amigos do Conhecimento livre

Mini Tutorial Perl

O perl possui uma vasta documentação(em ambientes linux execute perldoc) que já vem por default na sua instalação. Em ambientes linux, o perl já vem de fábrica =)

Bom, como já mencionado acima, você pode consultar a documentação como o comando perldoc <section>. A perldoc é dividida em sessões, abaixo irei listar algumas delas:

perlrun, perlsyn, perlvar, perlreftut, perllol, perlref, perldsc

Executando programas Perl

@emanuelrosa
emanuelrosa / trello-css-guide.md
Created January 10, 2017 22:33 — forked from bobbygrace/trello-css-guide.md
Trello CSS Guide

Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets


Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

@emanuelrosa
emanuelrosa / find_relative_path.func.php
Created December 29, 2016 23:54 — forked from ohaal/find_relative_path.func.php
Find the relative path between two paths
/**
*
* Find the relative file system path between two file system paths
*
* @param string $frompath Path to start from
* @param string $topath Path we want to end up in
*
* @return string Path leading from $frompath to $topath
*/
function find_relative_path ( $frompath, $topath ) {
@emanuelrosa
emanuelrosa / mudando-url-no-wordpress.sql
Created December 29, 2016 12:27 — forked from vsoaresbruno/mudando-url-no-wordpress.sql
Wordpress : Alterando a URL no site todo - Change URL in all site (Options, GUID, Post content and meta values)
UPDATE wp_options SET option_value = replace(option_value, 'http://site-old.com', 'http://site-new.com') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = REPLACE (guid, 'http://site-old.com', 'http://site-new.com');
UPDATE wp_posts SET post_content = REPLACE (post_content, 'http://site-old.com', 'http://site-new.com');
UPDATE wp_postmeta SET meta_value = REPLACE (meta_value, 'http://site-old.com', 'http://site-new.com');
@emanuelrosa
emanuelrosa / _resize_thumbnails_wordpress.md
Created December 27, 2016 18:03
Resize width and height any image on media WordPress without add_image_size() function

Resize width and height any image on media WordPress without add_image_size() function

This function cut any image you uploaded on media WordPress, you can define width and height for each function you insert on your theme

You need include all the files code on functions.php

Usage

For use, only need add foxtemas_thumbnail($size, $thumb_id, $width, $height, $crop, $url) function with arguments

@emanuelrosa
emanuelrosa / Setup for Ruby on Rails development.md
Created December 4, 2016 21:12 — forked from fzrhrs/Setup for Ruby on Rails development.md
How to Install Xcode, Homebrew, Git, RVM, Ruby, Rails, Heroku Toolbelt and Postgres (Yosemite)

###Step 1: Install XCode

Check if the full Xcode package is already installed:

$ xcode-select -p

If you see:

/Applications/Xcode.app/Contents/Developer

@emanuelrosa
emanuelrosa / osx-setup.md
Created December 4, 2016 04:22 — forked from zenorocha/.hyper.js
Setup macOS Sierra (10.12)

Setup macOS

I'm in a hospital in Spain and my MacBook was stolen.

Hospital Commit

Now I bought a new one and need to configure it. I have an AirPort Time Capsule that backs up everything using Time Machine, but I don't want all the crap I had in the old one. So let's get our hands dirty!

1. Update OS to latest version

Folder Structure

Motivations

  • Clear feature ownership
  • Module usage predictibility (refactoring, maintainence, you know what's shared, what's not, prevents accidental regressions, avoids huge directories of not-actually-reusable modules, etc)