Skip to content

Instantly share code, notes, and snippets.

View fabianoalmeida's full-sized avatar
🎯
Focusing

Fabiano Almeida fabianoalmeida

🎯
Focusing
  • São Paulo, Brazil
View GitHub Profile
@fabianoalmeida
fabianoalmeida / mailbox_spec.rb
Created December 19, 2012 18:42
Testing Mailbox #24 issue
it "should return all unread conversations at inbox" do
first = FactoryGirl.create(:user)
second = FactoryGirl.create(:user)
third = FactoryGirl.create(:user)
fourth = FactoryGirl.create(:user)
fifth = FactoryGirl.create(:user)
first_receipt = first.send_message(second, "Body", "Subject")
second_receipt = second.reply_to_sender(first_receipt, "Body")
third_receipt = first.reply_to_sender(second_receipt, "Body")
@fabianoalmeida
fabianoalmeida / index.html.erb
Created January 28, 2013 12:29
Structure based on friendly_id
<h1>Places</h1>
<ul>
<% @places.each do |place| %>
<li><%= link_to place.name, [:new, place, :ticket] %></li>
<% end %>
</ul>
===========================================================================
<h1><%= "New Ticket for %s" % @place.name %></h1>
@fabianoalmeida
fabianoalmeida / install_postgresql_mac
Last active December 17, 2015 09:59
I'm showing step by step how to install PostgreSQL on Mac OSX.
# Uninstall all versions
http://stackoverflow.com/questions/8037729/completely-uninstall-postgresql-9-0-4-from-mac-osx-lion
# Download .dmg from http://postgresapp.com/
# Unzip the file and copy do Applications folder
# Run Postgres.app
# After this action will appear an elephant on menu bar: Postgres server is running
# Follow this steps from documentation: http://postgresapp.com/documentation#toc_1
# On command line execute
@fabianoalmeida
fabianoalmeida / git_config.sh
Last active December 24, 2015 07:09
Listing all steps to install and configure git in a company
# Install git
http://git-scm.com/book/en/Getting-Started-Installing-Git
# Define a bigger http post buffer
git config http.postbuffer 524288000 # 500 MiB
This file has been truncated, but you can view the full file.
13:42:18,445 INFO [org.jboss.modules] JBoss Modules version 1.1.1.GA
13:42:19,202 INFO [org.jboss.msc] JBoss MSC version 1.0.2.GA
13:42:19,283 INFO [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting
13:42:21,442 INFO [org.xnio] XNIO Version 3.0.3.GA
13:42:21,442 INFO [org.jboss.as.server] JBAS015888: Creating http management service using socket-binding (management-http)
13:42:21,459 INFO [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA
13:42:21,476 INFO [org.jboss.remoting] JBoss Remoting version 3.2.3.GA
13:42:21,524 INFO [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers
13:42:21,705 INFO [org.jboss.as.webservices] JBAS015537: Activating WebServices Extension
13:42:21,656 INFO [org.jboss.as.security] JBAS013101: Activating Security Subsystem
@fabianoalmeida
fabianoalmeida / cert-manager-nginx-ingress-gke-recipe.md
Last active February 18, 2020 18:54
A quickstart guide to deploying cert-manager and nginx-ingress on GKE

This is a quick recipe for deploying cert-manager and nginx-ingress on GKE to obtain SSL certificates from Lets Encrypt. Whilst this recipe is designed for Google Cloud Platform, it can easily be adapted for other cloud platforms.

We'll begin with a Kubernetes cluster, and we'll obtain authentication credentials.

Step 0 - Get Credentials and Install Helm Client

$ gcloud container clusters get-credentials my-test-app