Skip to content

Instantly share code, notes, and snippets.

View addomafi's full-sized avatar
🤓
Working

Adauto Martins addomafi

🤓
Working
View GitHub Profile
Moved to private Gist.
If you are a Mercado Livre Developer, type gist:dev_env on Slack or contact me to get the new Gist :)
@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active November 18, 2024 13:32
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@tomysmile
tomysmile / brew-java-and-jenv.md
Last active September 30, 2024 19:44
How To Install Java 8 on Mac

Install HomeBrew first

brew update
brew tap caskroom/cask
brew install brew-cask

If you get the error "already installed", follow the instructions to unlink it, then install again:

@iconara
iconara / queries.sql
Last active November 13, 2023 22:26
Low level Redshift cheat sheet
-- Table information like sortkeys, unsorted percentage
-- see http://docs.aws.amazon.com/redshift/latest/dg/r_SVV_TABLE_INFO.html
SELECT * FROM svv_table_info;
-- Table sizes in GB
SELECT t.name, COUNT(tbl) / 1000.0 AS gb
FROM (
SELECT DISTINCT datname, id, name
FROM stv_tbl_perm
JOIN pg_database ON pg_database.oid = db_id
@jaydansand
jaydansand / ssl_test.sh
Last active December 14, 2021 13:36
Use OpenSSL to scan a host for available SSL/TLS protocols and cipher suites
#!/bin/bash
# Author: Jay Dansand, Technology Services, Lawrence University
# Date: 10/17/2014
# OpenSSL requires a port specification; default to 443.
SERVER="$1:443"
SERVER_HOST=$(echo "$SERVER" | cut -d ":" -f 1)
SERVER_PORT=$(echo "$SERVER" | cut -d ":" -f 2)
if [[ -z "$SERVER_HOST" || -z "$SERVER_PORT" ]]; then
echo "Usage: $0 host[:port] [ciphers [delay in ms]]"
@bugs84
bugs84 / gist:514cd38ccd480305de1a
Created September 3, 2014 14:54
OQL how to write bytes in heapdump into file in VisualVM
//To get Id of object
//In VisualVM right click on instance of byte[] and select 'Copy ID'
var bytes = heap.findObject(0xe21b95d8);
var filePath = "c:/tmp/result.txt"
var fos = new java.io.FileOutputStream(filePath);
var len = bytes.length
for (var i=0; i<len; i++) {
fos.write(bytes[i]);
}
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active November 17, 2024 01:28
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@jagregory
jagregory / gist:710671
Created November 22, 2010 21:01
How to move to a fork after cloning
So you've cloned somebody's repo from github, but now you want to fork it and contribute back. Never fear!
Technically, when you fork "origin" should be your fork and "upstream" should be the project you forked; however, if you're willing to break this convention then it's easy.
* Off the top of my head *
1. Fork their repo on Github
2. In your local, add a new remote to your fork; then fetch it, and push your changes up to it
git remote add my-fork [email protected]