Skip to content

Instantly share code, notes, and snippets.

View rabat's full-sized avatar

Rabat Chowdhury rabat

View GitHub Profile
@krisleech
krisleech / renew-gpgkey.md
Last active October 6, 2025 20:21
Renew Expired GPG key

Renew GPG key

Given that your key has expired.

$ gpg --list-keys
$ gpg --edit-key KEYID

Use the expire command to set a new expire date:

@cecilemuller
cecilemuller / 2019-https-localhost.md
Last active October 30, 2025 15:37
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@573
573 / Dockerfile
Created March 12, 2018 08:13
git clone when using docker-compose.yml
FROM alpine/git:1.0.4
CMD ["git", "version"]
@kevinadi
kevinadi / mongodb-ssl.sh
Last active March 24, 2025 10:32
Script to create self-signed CA certificates, server certificates, and client certificates for testing MongoDB with SSL
#!/bin/sh
# Generate self signed root CA cert
openssl req -nodes -x509 -newkey rsa:2048 -keyout ca.key -out ca.crt -subj "/C=AU/ST=NSW/L=Sydney/O=MongoDB/OU=root/CN=`hostname -f`/emailAddress=kevinadi@mongodb.com"
# Generate server cert to be signed
openssl req -nodes -newkey rsa:2048 -keyout server.key -out server.csr -subj "/C=AU/ST=NSW/L=Sydney/O=MongoDB/OU=server/CN=`hostname -f`/emailAddress=kevinadi@mongodb.com"
# Sign the server cert
@oanhnn
oanhnn / using-multiple-github-accounts-with-ssh-keys.md
Last active October 31, 2025 17:04
Using multiple github accounts with ssh keys

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.
@kevinbull
kevinbull / README.md
Last active April 12, 2022 12:12 — forked from jed/LICENSE.txt
Using JavaScript generate a 32 character hexadecimal universal id string.

generateUnid

Each call returns a random 32 character hexidecimal string. Based on the work done https://gist.github.com/jed/982883

Usage:

<script src="https://gist.github.com/kevinbull/f1cbc5440aa713bd5c9e.js"></script>

var unid = generateUnid();
@vitorbritto
vitorbritto / rm_mysql.md
Last active October 25, 2025 23:33
Remove MySQL completely from Mac OSX

Remove MySQL completely

  1. Open the Terminal

  2. Use mysqldump to backup your databases

  3. Check for MySQL processes with: ps -ax | grep mysql

  4. Stop and kill any MySQL processes

  5. Analyze MySQL on HomeBrew:

    brew remove mysql