Skip to content

Instantly share code, notes, and snippets.

View brunohass's full-sized avatar
💭
I may be slow to respond.

Bruno Hass brunohass

💭
I may be slow to respond.
  • Florianópolis/SC - Brasil
View GitHub Profile
@brunohass
brunohass / ksuid.sql
Created July 10, 2024 19:00 — forked from fabiolimace/ksuid.sql
Functions for generating Segment's KSUIDs on PostgreSQL
/*
* MIT License
*
* Copyright (c) 2023 Fabio Lima
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@brunohass
brunohass / Cloudwatch Agent Install
Created April 26, 2021 01:15 — forked from chauhan-naveen/Cloudwatch Agent Install
Cloudwatch agent installation: Make sure to attach a cloudwatch role to your ec2 instance. amazon-cloudwatch-agent.json file should be created before hand (on your local machine or from where you are executing your ansible playbook), other wise cw_agent will not start. Below is the example of amazon-cloudwatch-agent.json.
---
###Cloudwatch role should be attached to the ec2 instance###
- hosts: dd ###servers on which you need to run the cw_agent
become: yes
remote_user: root
gather_facts: true
tasks:
- name: Check if Cloudwatch Agent is Installed Already
shell: /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -m ec2 -a status
register: init_status_result
@brunohass
brunohass / gzip.go
Created April 18, 2021 03:20 — forked from CJEnright/gzip.go
Idiomatic golang net/http gzip transparent compression, an updated version of https://gist.github.com/bryfry/09a650eb8aac0fb76c24
package main
import (
"net/http"
"compress/gzip"
"io/ioutil"
"strings"
"sync"
"io"
)