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
@nogara
nogara / ConvertDOCtoPDF.scpt.source
Last active May 20, 2024 13:21
Convert old Microsoft .doc files to PDFs
on run {input_file, output_file}
try
-- Ensure input and output paths are POSIX paths (macOS paths)
set input_path to POSIX file input_file
set output_path to POSIX file output_file
tell application "Microsoft Word"
-- Start Microsoft Word if not already running
if not application "Microsoft Word" is running then
launch
@nogara
nogara / weather.sh
Last active September 21, 2023 19:11
Simple alternative to wttr.in using OpenWeatherMap
#!/bin/bash
# Check for debug flag
DEBUG=0
if [ "$1" == "--debug" ]; then
DEBUG=1
shift
fi
# Check if location is provided
@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",
@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 / 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

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 / 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
@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 / 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 / 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: