Skip to content

Instantly share code, notes, and snippets.

View nogara's full-sized avatar

Luiz Gustavo Nogara nogara

  • Square Knowledge Ventures
  • Rio de Janeiro
View GitHub Profile
# Redis
God.watch do |w|
w.name = "redis"
w.interval = 30.seconds
w.start = "/etc/init.d/redis start"
w.stop = "/etc/init.d/redis stop"
w.restart = "/etc/init.d/redis restart"
w.start_grace = 10.seconds
w.restart_grace = 10.seconds
@nogara
nogara / install-graphite-ubuntu-11.10.sh
Created March 8, 2012 22:32 — forked from Iristyle/install-graphite-ubuntu-11.10.sh
Install Graphite 0.9.9 on Ubuntu 11.10 on EC2 with NGinx, uwsgi, supervisord, statsite, nagios agent
#!/bin/bash
####################################
# BASIC REQUIREMENTS
# http://graphite.wikidot.com/installation
# Forked from: http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/
# Ubuntu 11.10 Oneiric Ocelot
# Forked from https://gist.github.com/1287170
# Modified to use NGinx + uwsgi instead of Apache, as well as memcached and supervisord, incorporating ideas from
# http://blog.adku.com/2011/10/scalable-realtime-stats-with-graphite.html
@nogara
nogara / rails_admin.pt-BR.yml
Created July 31, 2012 15:31 — forked from fernandomm/rails_admin.pt-BR.yml
Portuguese (pt-BR) translation for RailsAdmin 3.2
pt-BR:
views:
pagination:
previous: "« Anterior"
next: "Próximo »"
truncate: "…"
admin:
home:
name: Home
misc:
@nogara
nogara / original_text_file.txt
Created August 22, 2014 14:27
AlchemyAPI error example
ALFA 1 Química – Setor 1321 99
1 CLASSIFICAÇÃO PERIÓDICA DOS ELEMENTOS
H
Br Kr
Cl Ar
@nogara
nogara / osx_install.sh
Created November 9, 2016 15:39 — forked from t-io/osx_install.sh
Install most of my Apps with homebrew & cask
#!/bin/sh
echo Install all AppStore Apps at first!
# no solution to automate AppStore installs
read -p "Press any key to continue... " -n1 -s
echo '\n'
echo Install and Set San Francisco as System Font
ruby -e "$(curl -fsSL https://raw.github.com/wellsriley/YosemiteSanFranciscoFont/master/install)"
echo Install Homebrew, Postgres, wget and cask
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
@nogara
nogara / thin.sh
Created February 20, 2017 15:50 — forked from sbeam/thin.sh
/etc/init.d/thin - replacement that runs bundle exec thin within each site
#!/bin/bash
### BEGIN INIT INFO
# Provides: thin
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: S 0 1 6
# Short-Description: thin initscript
# Description: thin
### END INIT INFO

Keybase proof

I hereby claim:

  • I am nogara on github.
  • I am nogara (https://keybase.io/nogara) on keybase.
  • I have a public key ASBU-f0_QzVkJ1H23oqw2o0H10RjlwIFU25Qe-IHWlYC1wo

To claim this, I am signing this object:

@nogara
nogara / docker-cheat-sheat.md
Created September 14, 2017 19:48 — forked from dwilkie/docker-cheat-sheat.md
Docker Cheat Sheet

Build docker image

$ cd /path/to/Dockerfile
$ sudo docker build .

View running processes

@nogara
nogara / move_keenio_files.README.md
Last active December 5, 2018 19:20
KeenIO - move streamed files from default folder structure to alternate folder structure

According to documentation in https://keen.io/docs/streams/amazon-s3/, we were using the default format. For some applications (AWS Athena mostly), we began using the alternate format, and we needed to move the files in the old places to the new folder structure.

This is a very simple script provided as is. Comments are welcome :)

@nogara
nogara / clean-roles.py
Created September 11, 2023 22:36
Script to remove roles that were created by other scripts
import boto3
import json
from concurrent.futures import ThreadPoolExecutor
# Initialize a session using Amazon IAM
client = boto3.client('iam')
# The trusted entity policy string
trusted_entity_policy = '''{
"Version": "2012-10-17",