Skip to content

Instantly share code, notes, and snippets.

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

Fernando Oliveira nandooliveira

🏠
Working from home
View GitHub Profile
@nandooliveira
nandooliveira / SOLID.markdown
Created April 30, 2017 17:08 — forked from emaraschio/SOLID.markdown
SOLID Principles with ruby examples

#SOLID Principles with ruby examples

##SRP - Single responsibility principle A class should have only a single responsibility.

Every class should have a single responsibility, and that responsibility should be entirely encapsulated. All its services should be narrowly aligned with that responsibility, this embrace the high cohesion.

##OCP - Open/closed principle Software entities should be open for extension, but closed for modification.

@nandooliveira
nandooliveira / jsconfar_2014.markdown
Created April 30, 2017 17:10 — forked from emaraschio/jsconfar_2014.markdown
My notes about JS Conf Arg 2014
@nandooliveira
nandooliveira / Ruby Test Info
Created April 30, 2017 17:11 — forked from emaraschio/Ruby Test Info
A few links about Testing with Ruby
Libraries:
http://cukes.info/
http://jnicklas.github.io/capybara/
https://github.com/teampoltergeist/poltergeist
http://phantomjs.org/
How to:
http://www.railsonmaui.com/tips/rails/capybara-phantomjs-poltergeist-rspec-rails-tips.html
https://github.com/teampoltergeist/poltergeist#installing-phantomjs
@nandooliveira
nandooliveira / rails.rb
Created May 10, 2017 15:47
Use SSL in Rails development. First: to create a local SSL certificate and start a SSL webserver checkout *shell.sh*. Second: to configure Rails checkout *rails.rb*
# To enable SSL in Rails you could now simply use *force_ssl* in your
# ApplicationController but there is two more things to think about:
# In development our SSL webserver is running on port 3001 so we would
# actually need to use *force_ssl port: 3001* but then this wouldn't
# work for production.
# Also there is a good chance you might not always want to use SSL in development
# so it would be nice if we could just enable or disable SSL in the config.
# To make all this work first copy the file *ssl_with_configured_port.rb* to
# your *lib* directory. Second to enable SSL add *config.use_ssl = true*

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@nandooliveira
nandooliveira / MySQL_macOS_Sierra.md
Created August 2, 2017 04:44 — forked from nrollr/MySQL_macOS_Sierra.md
Install MySQL on Sierra using Homebrew

Install MySQL on macOS Sierra

This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.

Install MySQL

At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :

@nandooliveira
nandooliveira / tmux.md
Created September 21, 2017 19:40 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@nandooliveira
nandooliveira / pull-request-template.md
Created March 6, 2018 03:19 — forked from Lordnibbler/pull-request-template.md
Sample Pull Request Template

Status

READY/IN DEVELOPMENT/HOLD

Migrations

YES | NO

Description

A few sentences describing the overall goals of the pull request's commits.

Related PRs