Skip to content

Instantly share code, notes, and snippets.

View RafaelChefe's full-sized avatar

Rafael Santos RafaelChefe

  • Melbourne, Australia
  • 13:44 (UTC +10:00)
View GitHub Profile
@RafaelChefe
RafaelChefe / bla.sh
Created November 15, 2021 08:42
bla
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\[\033[94m\]\w\[\033[31m\]\$(parse_git_branch)\[\033[00m\] $ "
@RafaelChefe
RafaelChefe / before.json
Last active April 29, 2021 06:41
before
{
"data":{
"id":"1",
"type":"anonymUserData",
"attributes":{
"currentLocation":{
"id":1,
"countryCode":null,
"currency":"EUR",
"legalJurisdiction":null
[114, 150, 156].map.with_index { |elem, ind| a.slice(0..ind) }
@RafaelChefe
RafaelChefe / outage.md
Created September 5, 2018 00:02
the outage document

Check ec2 instance monitoring for any anomalies

  • login to the aws console: https://flippa.signin.aws.amazon.com/console
  • go to the ec2 section
  • on the ec2 dashboard, click instances
  • start by checking key apps, including proxy, rails, search, mfe and workers. Use this search terms to find the desired instances:
    • proxy-production-v1 (proxy)
    • marketplace-webapp-production-v3 (flippa rails)
    • search-production-v17 (search)
  • frontend-marketplace-production-v10 (marketplace frontend)
@RafaelChefe
RafaelChefe / infinity_marathon.md
Last active May 19, 2018 04:57
The Infinity Marathon

The Infinity Marathon

Image of Yaktocat

Phase One

  • Iron Man (5/5, $0.99, GooglePlay)
  • The Incredible Hulk (5/5, $4.99, GooglePlay)
  • Iron Man 2 (5/5, $4.99, GooglePlay)
  • Thor (6/5, $4.99, GooglePlay)
Dir.glob('/usr/local/lib/pry/gems/*').each do |p|
$LOAD_PATH << File.join(p, 'lib')
end
require 'pry'
require 'awesome_print'
AwesomePrint.pry!
if defined?(Rails)
require 'pry-rails'
@RafaelChefe
RafaelChefe / merda.rb
Created February 2, 2016 13:38
Outra obra prima... =)
class Merda
def dar_merda
raise 'deu merda'
end
end
# color and syntax reference:
# http://misc.flogisoft.com/bash/tip_colors_and_formatting
if defined?(Rails)
colors = HashWithIndifferentAccess.new({
development: 32, # green
test: 33, # yellow
production: 31 # red
})