Skip to content

Instantly share code, notes, and snippets.

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

José Juan Reyes Zuñiga neodevelop

🏠
Working from home
View GitHub Profile
@neodevelop
neodevelop / documentos.md
Created May 18, 2026 19:15
Limpieza masiva de código Groovy con Vim: vimgrep, quickfix, cfdo y expresiones regulares

Limpieza masiva de código Groovy con Vim: vimgrep, quickfix, cfdo y expresiones regulares

Cuando trabajamos con código legado, especialmente en proyectos de Java y Groovy, es común encontrar ruido acumulado: punto y coma innecesario, modificadores redundantes, getters/setters generados automáticamente, comentarios antiguos o demasiadas líneas en blanco.

Vim puede convertirse en una herramienta extremadamente poderosa para limpiar todo eso sin salir del editor. Los comandos siguientes usan tres ideas centrales:

  1. Buscar patrones en múltiples archivos con :vimgrep
  2. Aplicar cambios masivos con :cfdo
  3. Eliminar bloques completos usando :g y expresiones regulares
@neodevelop
neodevelop / emit_log.exs
Created December 13, 2025 22:49 — forked from jeffweiss/emit_log.exs
RabbitMQ Tutorial - Elixir examples
{:ok, connection} = AMQP.Connection.open
{:ok, channel} = AMQP.Channel.open(connection)
message = Enum.join(System.argv, " ") || "Hello World!"
AMQP.Exchange.declare(channel, "logs", :fanout)
AMQP.Basic.publish(channel, "logs", "", message)
IO.puts " [x] Sent '#{message}'"
@neodevelop
neodevelop / descubre_elixir_y_phoenix.livemd
Created October 22, 2025 18:11
🧠 Descubre por qué tantos desarrolladores se están enamorando de Elixir y Phoenix

🧠 Descubre por qué tantos desarrolladores se están enamorando de Elixir y Phoenix

Mix.install([
  {:kino, "~> 0.13"},
  {:phoenix, "~> 1.7"},
  {:phoenix_live_view, "~> 0.20"},
  {:plug_cowboy, "~> 2.7"}
@neodevelop
neodevelop / fish-agent.sh
Created December 5, 2023 23:13 — forked from josh-padnick/fish-agent.sh
Run ssh-agent via fish shell
#!/bin/bash
#
# Convert ssh-agent output to fish shell
#
eval "$(ssh-agent)" >/dev/null
echo "set SSH_AUTH_SOCK \"$SSH_AUTH_SOCK\"; export SSH_AUTH_SOCK"
echo "set SSH_AGENT_PID \"$SSH_AGENT_PID\"; export SSH_AGENT_PID"
@neodevelop
neodevelop / vim-shortcuts.md
Created September 6, 2021 04:15 — forked from tuxfight3r/vim-shortcuts.md
VIM SHORTCUTS

VIM KEYBOARD SHORTCUTS

MOVEMENT

h        -   Move left
j        -   Move down
k        -   Move up
l        -   Move right
$        -   Move to end of line
0        -   Move to beginning of line (including whitespace)
@neodevelop
neodevelop / .vimrc
Last active December 19, 2025 02:37 — forked from lorenzosinisi/.vimrc
Vimrc config for Elixir
call plug#begin()
Plug 'tpope/vim-sensible'
Plug 'tpope/vim-fugitive'
Plug 'godlygeek/tabular', {'for': ['markdown', 'yml']}
Plug 'mattn/emmet-vim'
Plug 'itchyny/lightline.vim'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'catppuccin/vim', { 'as': 'catppuccin' }
@neodevelop
neodevelop / psql-error-fix.md
Created May 5, 2020 22:10 — forked from AtulKsol/psql-error-fix.md
Solution of psql: FATAL: Peer authentication failed for user “postgres” (or any user)

psql: FATAL: Peer authentication failed for user “postgres” (or any user)

The connection failed because by default psql connects over UNIX sockets using peer authentication, that requires the current UNIX user to have the same user name as psql. So you will have to create the UNIX user postgres and then login as postgres or use sudo -u postgres psql database-name for accessing the database (and psql should not ask for a password).

If you cannot or do not want to create the UNIX user, like if you just want to connect to your database for ad hoc queries, forcing a socket connection using psql --host=localhost --dbname=database-name --username=postgres (as pointed out by @meyerson answer) will solve your immediate problem.

But if you intend to force password authentication over Unix sockets instead of the peer method, try changing the following pg_hba.conf* line:

from

@neodevelop
neodevelop / plant_care.ino
Created April 4, 2020 23:53
Arduino program for plants care
void setup() {
Serial.begin(57600);
for(int i = 2; i <= 10; i+=2){
pinMode(i, OUTPUT);
}
}
void loop() {
String s = "";
@neodevelop
neodevelop / color_the_log.sh
Created August 29, 2019 17:46
Colorize the log!!!
tail -f faltas_suplencias.log | awk '
/info/ {print "\033[32m" $0 "\033[39m"}
/debug/ {print "\033[34m" $0 "\033[39m"}
/warn/ {print "\033[33m" $0 "\033[39m"}
/error/ {print "\033[31m" $0 "\033[39m"}
'
tail -f ecto_sql.log | awk '
/SELECT/ {print "\033[32m" $0 "\033[39m"}
/debug/ {print "\033[32m" $0 "\033[39m"}
@neodevelop
neodevelop / atm_kata.md
Created September 3, 2018 02:50
ATM Coding kata

ATM Machine Kata

El siguiente es un ejercicio para codificar, refactorizar y hacer pruebas, en el cual puedes invertir de 15 a 30 minutos para resolverlo gradualmente.

Antes de que empieces

  • Intenta no adelantar la lectura.
  • Realiza una tarea a la vez. El truco para aprender es el trabajo incremental.
  • Asegurate de hacer las pruebas para las entradas correctas. No hay necesidad de probar entradas inválidas.
  • De vez en cuando haz un refactor de tu código.