Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

José Juan Reyes Zuñiga neodevelop

🏠
Working from home
View GitHub Profile
View vim-shortcuts.md

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 / .gitconfig
Last active Aug 18, 2021
Sharing my alias to work with git
View .gitconfig
[user]
name = Jose Juan Reyes
email = neodevelop@gmail.com
[core]
editor = vim
pager = less -FRSX
whitespace=fix,-indent-with-non-tab,trailing-space,cr-at-eol
quotepath = false
excludesfile = /Users/makingdevs/.gitignore_global
commentChar = ";"
@neodevelop
neodevelop / .vimrc
Created Jul 25, 2021 — forked from lorenzosinisi/.vimrc
Vimrc config for Elixir
View .vimrc
"""""""""""""""""""""""""""""""""""""
" Lorenzo Sinisi Vimrc configuration
"""""""""""""""""""""""""""""""""""""
set nocompatible
syntax on
set nowrap
set ignorecase
set smartcase
set encoding=utf8
set mouse=nicr
@neodevelop
neodevelop / psql-error-fix.md
Created May 5, 2020 — forked from AtulKsol/psql-error-fix.md
Solution of psql: FATAL: Peer authentication failed for user “postgres” (or any user)
View psql-error-fix.md

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 / .tmux.conf
Last active Apr 12, 2020
Tmux config file
View .tmux.conf
set-option -g default-command "reattach-to-user-namespace -l ${SHELL}"
set -g prefix C-a
unbind C-b
set -sg escape-time 1
set -g base-index 1
setw -g pane-base-index 1
bind r source-file ~/.tmux.conf \; display "Configuración recargada"
bind C-a send-prefix
bind | split-window -h -c "#{pane_current_path}"
@neodevelop
neodevelop / plant_care.ino
Created Apr 4, 2020
Arduino program for plants care
View plant_care.ino
void setup() {
Serial.begin(57600);
for(int i = 2; i <= 10; i+=2){
pinMode(i, OUTPUT);
}
}
void loop() {
String s = "";
View color_the_log.sh
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 / requesting_devs.md
Last active Jan 15, 2019
Buscando desarrollador Java
View requesting_devs.md

Hola,

Estamos buscando un desarrollador Java para la Ciudad de México, que tenga conocimientos sólidos de desarrollo web. Los requisitos son los siguientes:

  • Java (buenas bases)
  • Spring (necesario)
  • Hibernate (necesario)
  • JavaScript (necesario)
  • Git como control de versiones
View atm_kata.md

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.
@neodevelop
neodevelop / Haskell_lecture_2.adoc
Last active Jun 17, 2018
Haskell Lecture - Session 2
View Haskell_lecture_2.adoc

Haskell Class

chapter 3 - Types and classes

A type is a collection of related values

For example type Bool