Skip to content

Instantly share code, notes, and snippets.

View fabianoleittes's full-sized avatar
🌍
Working from home

Fabiano Leite fabianoleittes

🌍
Working from home
View GitHub Profile
# 0 is too far away from reasonable numbers
set -g base-index 1
set -g renumber-windows on
setw -g pane-base-index 1
# Color key (Dracula Theme):
# #282a36 Background
# #44475a Current Line
# #44475a Selection
# #f8f8f2 Foreground
Ruby on Rails developer (freelancer/Remote)
# Descrição da vaga:
Você irá construir API's RESTfull usando RoR, Active Model Serializer, BDD e TDD.
# Skills e experiências necessárias:
* Experiência com Ruby.
* Experiência com Ruby on Rails
* Experiência com SOLID.
* Experiência com Design Pattern.
* Deve ter conhecimento com desenvolvimento de APIs RESTfull.
* Experiência com especificação JSON API.
server {
listen 80;
server_name example.com;
rewrite ^/(.*) https://$server_name permanent;
}
server {
# Your application host will be used as a convention for directories and other stuffs
set $application_host "example.com";
# Rails application server timeout (we have to match the value here to not display Gateway Timeout error)
module ApplicationHelper
def tenant_name
tenant_configuration.tenant_name
end
def full_title(page_title)
base_title = "#{app_display_name} Dashboard"
if page_title.empty?
base_title
else
group :development do
gem "guard-rspec", "~> 2.5.0"
gem "rb-fsevent", "~> 0.9"
end
group :development, :test do
gem "rspec-rails", "~> 2.13.2"
gem "factory_girl_rails", "~> 4.2.1"
end
# require_relative "hget"
# client = FBPublic.new("penaltybr")
# client.data # returns the Graph API public data
# if you need see response details use:
# client.response # returns a Net::HTTPFound instance
# if you need an alias to get the api response use:
# fb_data = FBPublic.get_data("penaltybr") # returns the Graph API public data
@fabianoleittes
fabianoleittes / hack.sh
Created November 29, 2012 16:04 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
class ChassisFinder
def self.search(code)
Customer.joins(possessions: :chassis).
where(possessions: { core_chassis: { code: code }})
end
end
describe "#full_name" do
it "returns concatenated name" do
user = create(:user, first_name: "Fabiano", last_name: "Leite")
expect(user.full_name).to eq("Fabiano Leite")
end
end
@fabianoleittes
fabianoleittes / database_cleaner.rb
Created November 27, 2012 17:37 — forked from dnagir/database_cleaner.rb
Using transactional DB cleanup
# spec/support/database_cleaner.rb
require 'database_cleaner'
RSpec.configure do |config|
config.before(:suite) do
DatabaseCleaner.clean_with :truncation # Delete leftovers if any
DatabaseCleaner.strategy = :transaction
end
config.before(:each) do