Skip to content

Instantly share code, notes, and snippets.

View jahrmando's full-sized avatar
🏠
Working from home

Arm.do jahrmando

🏠
Working from home
View GitHub Profile
@jahrmando
jahrmando / kitty.conf
Last active July 25, 2024 19:40
My Kitty Terminal Configuration
## Fonts
# Family
font_family Hack Nerd Font Mono
bold_font Hack Nerd Font Mono Bold
italic_font Hack Nerd Font Mono Italic
bold_italic_font Hack Nerd Font Mono Bold Italic
# Font Size
font_size 13.0
disable_ligatures never
@jahrmando
jahrmando / manage_privs_db.sh
Created September 21, 2021 21:49
Postgresql - Assign privileges to a user using GRANT command
#!/bin/bash
usage()
{
cat << EOF
usage: $0 options
OPTIONS:
-h Show this message
-d Database name
@jahrmando
jahrmando / update_format_key_pem.md
Created July 5, 2021 18:58
Change your private key formant from OPENSSL to PEM

Change your private key formant from OPENSSL (--BEGIN OPENSSH PRIVATE KEY--) to PEM (--BEGIN RSA PRIVATE KEY--)

$ ssh-keygen -p -m pem -f my_private_file
@jahrmando
jahrmando / table_extract.md
Last active July 5, 2021 19:00
Extract a limit records from a table and restore it on postgresql

Extract a limit records from a table and restore it on postgresql

  1. Create a temp table
SELECT p.*
    INTO TABLE tmp_my_table
from my_table p

Keybase proof

I hereby claim:

  • I am jahrmando on github.
  • I am armanroot (https://keybase.io/armanroot) on keybase.
  • I have a public key ASAsLhuepovy0jD5AGZA9_Sh1p618Cltr_xUSraKBCOOBQo

To claim this, I am signing this object:

@jahrmando
jahrmando / postgresql_backup.sh
Last active May 3, 2021 16:35
PostgreSQL backups
#!/bin/bash
## usage
# default: ./postgresql_backup.sh
# load envs
# Create a file .backup_envs
# DB_NAME=mydb
# DB_HOST=myhost
# DB_PORT=5432
# DB_USER=my_user
# DB_PASS="supersecretstring"
@jahrmando
jahrmando / docker-compose.yml
Last active August 7, 2023 10:46
Docker Compose - Mongo, Redis, Elasticsearch, postgresql96
version: '3'
services:
database:
image: 'mongo:3.6'
command: --serviceExecutor adaptive
container_name: 'mongodb-service'
volumes:
- mongo_data:/data/db
@jahrmando
jahrmando / change_db_owner.sh
Last active September 6, 2024 20:37 — forked from gingerlime/change_db_owner.sh
Postgresql - Changing ownership on all tables, funtions and views
#!/bin/bash
usage()
{
cat << EOF
usage: $0 options
This script set ownership for all table, sequence and views for a given database and schema.
NOTES: