Skip to content

Instantly share code, notes, and snippets.

@goja288
goja288 / create-db-readonly-user-pg.sh
Created August 24, 2024 20:27
This Bash script creates a read-only PostgreSQL user and grants SELECT privileges on specified schemas in multiple databases.
#!/bin/bash
# Load environment variables from the .env file, ignoring comments and empty lines
if [ -f .env ]; then
export $(grep -v '^#' .env | xargs)
else
echo ".env file not found!"
exit 1
fi
@goja288
goja288 / profile-snippet-sshargcomplete.ps1
Created February 16, 2023 14:16 — forked from backerman/profile-snippet-sshargcomplete.ps1
Enable tab completion for ssh hostnames in PowerShell
using namespace System.Management.Automation
Register-ArgumentCompleter -CommandName ssh,scp,sftp -Native -ScriptBlock {
param($wordToComplete, $commandAst, $cursorPosition)
$knownHosts = Get-Content ${Env:HOMEPATH}\.ssh\known_hosts `
| ForEach-Object { ([string]$_).Split(' ')[0] } `
| ForEach-Object { $_.Split(',') } `
| Sort-Object -Unique
# For now just assume it's a hostname.
@goja288
goja288 / es_jenkins-ssh-pentaho.md
Last active October 14, 2022 03:59
Configurar jenkins para poder ejecutar por ssh jobs y transformaciones de Pentaho (o cualquier script por ssh :D)

Configurar jenkins para poder ejecutar por ssh jobs y transformaciones de Pentaho

Pre-requisitos

  1. Jenkins instalado (un poco obvio, pero en fin).
  2. PDI instalado en un server accesible por ssh.
  3. Contar con una llave ssh valida del servidor donde se encuentra instalado pentaho y donde va a ejecutar los jobs/transformaciones
  4. Contar con scripts bash que ejecuten las transformaciones jobs. Ejemplo:
@goja288
goja288 / pentaho.service
Last active September 21, 2022 23:30
Install Pentaho Server as Linux Service
[Unit]
Description=Pentho Server
Before=multi-user.target
Before=multi-user.target
Before=multi-user.target
Before=graphical.target
After=network.service
After=network.target
After=syslog.target
@goja288
goja288 / DisableWebcamMicrophone.md
Last active November 20, 2024 14:40
Disable Webcam Microphone Logitech C922 - Ubuntu 22.04

Disable/Block Webcam Microphone Logitech C922 - Ubuntu 22.04

These instructions are for disabling the webcam's microphone as the audio input device.

Tested only with Logitech, Inc. C922 Pro on Ubuntu, but you can change idVendor and idProduct for other webcams.

List connected usb devices to get vendorId and productId

$ lsusb
@goja288
goja288 / rocksdb-install.sh
Last active June 16, 2022 02:42 — forked from srimaln91/rocksdb-install.sh
Install RocksDB on Ubuntu
#!/bin/bash
ROCKSDB_VERSION=5.3.6
#Run as a root user
if [ "$EUID" -ne 0 ]
then echo "Please run as root (with sudo command)"
exit
fi
# editorconfig.org
root = true
[*]
indent_style = space
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
@goja288
goja288 / Instalaciones-React.md
Last active May 7, 2022 23:39 — forked from Klerith/Instalaciones-React.md
Instalaciones recomendadas para mi curso de React de cero a experto
@goja288
goja288 / obs.md
Created April 3, 2022 15:59
OBS Ubuntu
@goja288
goja288 / ubuntu-on-asus-g14.md
Created December 20, 2021 15:14 — forked from vijay-prema/ubuntu-on-asus-g14.md
Ubuntu on Asus ROG Zephyrus G14 2021

Ubuntu on Asus ROG Zephyrus G14 2021 (Setup guide)

Here is a way to do a robust install of Ubuntu (+ optional Windows 11 dual boot and LUKS encryption) on an Asus laptop, with minimal usable hardware support, without a significant amount of tinkering that may break in future or require frequent technical attention.

Specs:

  • AMD R7 5800 8 core 16 thread (onboard Radeon graphics)
  • NVIDIA RTX 3050 4GB (60W +15W boost)
  • 40GB RAM (8GB soldered + 32GB stick)
  • 2TB SSD
  • 14inch 1920x1080 Display @144Hz