Skip to content

Instantly share code, notes, and snippets.

View lucasrenan's full-sized avatar

Lucas Renan lucasrenan

View GitHub Profile
{
"auto_completecommiton_tab": true,
"bold_folder_labels": true,
"color_scheme": "Packages/Color Scheme - Default/Solarized (Dark).tmTheme",
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
"folder_exclude_patterns":
[
".svn",
".git",
require 'rails_helper'
feature 'authentication' do
let!(:user) { create(:user, password: '12345678', password_confirmation: '12345678') }
before do
visit root_path
fill_in :user_email, with: user.email
fill_in :user_password, with: '12345678'
click_button 'Sign in'
@lucasrenan
lucasrenan / gist:ec726b9f1b2b9ef1e01b
Created October 17, 2014 03:57
brazilian states by region
STATES = {
REGION_SOUTH => ['PR', 'RS', 'SC'],
REGION_SOUTHEAST => ['ES', 'MG', 'RJ', 'SP'],
REGION_MIDWEST => ['DF', 'GO', 'MT', 'MS'],
REGION_NORTH => ['AC', 'AM', 'AP', 'PA', 'RO', 'RR', 'TO'],
REGION_NORTHEAST => ['AL', 'CE', 'BA', 'MA', 'PB', 'PE', 'PI', 'RN', 'SE']
}
---
layout: project
title: "Project 1"
subtitle: "Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diamsit e nonummy nibh euismod tincidunt ut laoreet magna aliquam."
date: 2014-09-05 17:49:49
categories: projects
description: "Descrição do projeto no thumbnail com mouse over consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore lorem ipsum sit dolor amet hyperlink aliquam erat volutpat. Ut wisi enim ad minim veniam, veniam, quis nostrud exerci tation aliquip ex ea commodo consequat."
authors: ["lionelmessi", "cristianoronaldo", "frankribery"]
---
var App = App || {};
App.ac_appender = {
/*
* ========================================
*
* requires jquery autocomplete
*
* ========================================
@lucasrenan
lucasrenan / 10periodic
Last active January 3, 2016 09:39
server config
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::AutocleanInterval "7";
APT::Periodic::Unattended-Upgrade "1";
@lucasrenan
lucasrenan / shitty.rb
Created December 2, 2013 22:16
shitty code
def create_calculations_by_product_ids(ids)
actual_product_ids = product_ids
destroy_product_ids = (actual_product_ids - ids).uniq
calculations.in(product_id: destroy_product_ids).destroy_all
new_product_ids = (ids - actual_product_ids).uniq
new_products = Product.find(new_product_ids)
new_products.each do |product|
@lucasrenan
lucasrenan / exs.rb
Last active December 18, 2015 17:59
# construir um algoritmo que recebe via console a
# idade de uma pessoa e retorna algo como:
# - maior de idade
# - menor de idade
# ps. utilize métodos :)
puts "idade:"
age = gets.chomp
@lucasrenan
lucasrenan / mongo_install
Created June 11, 2013 17:33
install mongodb ubuntu
http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
Create a /etc/apt/sources.list.d/10gen.list file using the following command.
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/10gen.list
sudo apt-get update
@lucasrenan
lucasrenan / lucas_profile.txt
Created March 22, 2013 02:31
performance driven
Performance Driven
Key Characteristics:
• Goal/Results-driven
• Commitment to Results
• Personal Effectiveness
• Stakeholder Focus
You are customer and results-oriented. You know that people have limited time. Words and ideas may be important to you, but you care most about actions.