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 August 9, 2023 17:04
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 / load_envs_secrets.sh
Created September 9, 2021 23:28
Script bash to load .env file to Github Secrets
#!/bin/bash
## Usage: ./load_envs_secrets.sh PREFIX(optional)
##
##
PREFIX=${1:-""}
while read SECRT ; do
if [[ $SECRT =~ ^([A-Z0-9_]*)=(.*) ]]; then
S_KEY=${PREFIX}${BASH_REMATCH[1]}
S_VALUE=${BASH_REMATCH[2]}
@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 June 19, 2020 23:17 — 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
Credit: Based on http://stackoverflow.com/a/2686185/305019 by Alex Soto