Skip to content

Instantly share code, notes, and snippets.

View gabrielpedepera's full-sized avatar

Gabriel Pereira gabrielpedepera

View GitHub Profile
@gabrielpedepera
gabrielpedepera / teste.rb
Created June 13, 2012 19:15
Testando Gist do GitHub
def teste
puts 'testando'
end
@gabrielpedepera
gabrielpedepera / Vagrantfile
Last active May 23, 2016 02:42
Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
config.vm.box = "centos/7"
config.ssh.insert_key = false
worker_processes 1;
error_log /opt/nginx/logs/nginx-error.log info;
pid /opt/nginx/logs/nginx.pid;
events {
worker_connections 1024;
}
http {
passenger_root /home/vagrant/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/passenger-5.0.28;
@gabrielpedepera
gabrielpedepera / nginx.service
Created May 22, 2016 22:34
CentOS7-nginx-passenger-systemd
[Unit]
Description=The nginx HTTP and reverse proxy server
After=syslog.target network.target remote-fs.target nss-lookup.target
[Service]
Type=forking
PIDFile=/opt/nginx/logs/nginx.pid
ExecStartPre=/opt/nginx/sbin/nginx -t
ExecStart=/opt/nginx/sbin/nginx
ExecReload=/bin/kill -s HUP $MAINPID
# app/views/posts/show.html.erb
<br><br>
<h2>Comments</h2>
<div id="comments">
<%# render partial: 'comments/comment', collection: @posts.comments %>
<%= render @post.comments %>
</div>
<%= render 'comments/new', post: @post %>
@gabrielpedepera
gabrielpedepera / SublimeLinter.sublime-settings
Created August 29, 2016 02:04
SublimeLinter.sublime-settings
{
"user": {
"debug": false,
"delay": 0.25,
"error_color": "D02000",
"gutter_theme": "Packages/SublimeLinter/gutter-themes/Default/Default.gutter-theme",
"gutter_theme_excludes": [],
"lint_mode": "background",
"linters": {
"rubocop": {
inherit_from: .rubocop_todo.yml
AllCops:
Exclude:
- db/schema.rb
- db/migrate/*
- bin/*
RunRailsCops: true
Documentation:
module.exports = {
config: {
copyOnSelect: true,
// default font size in pixels for all tabs
fontSize: 14,
// font family with optional fallbacks
fontFamily: '"Meslo LG S for Powerline", Menlo, "DejaVu Sans Mono", "Lucida Console", monospace',
@gabrielpedepera
gabrielpedepera / recursividade_hash_01.xml
Created March 14, 2017 11:48 — forked from prodis/recursividade_hash_01.xml
Ruby Fundamental - Usando recursividade para alterar valores de hash
<transaction>
<id>456</id>
<status>Aprovada</status>
<order_number>F2457</order_number>
<price>33.21</price>
<date_transaction>2012-12-13T12:35:30</date_transaction>
<date_release></date_release>
<payment>
<payment_method>Mastercard</payment_method>
<date_approval>2012-12-13T12:35:31</date_approval>

Keybase proof

I hereby claim:

  • I am gabrielpedepera on github.
  • I am gabrielpedepera (https://keybase.io/gabrielpedepera) on keybase.
  • I have a public key ASAuV2ttcYiLr3Fc4R8xdy-lPvJDbFbZLIDFhEa520u0vwo

To claim this, I am signing this object: