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 / multi-git.md
Created May 10, 2017 23:29 — forked from rosswd/multi-git-win.md
Setting up a Github and Bitbucket account on the same computer.

Setting up github and bitbucket on the same computer

Github will be the main account and bitbucket the secondary.

Create SSH Keys

ssh-keygen -t rsa -C "github email"

Enter passphrase when prompted. If you see an option to save the passphrase in your keychain, do it for an easier life.

@neodevelop
neodevelop / setenv.sh
Created June 12, 2017 16:40 — forked from terrancesnyder/setenv.sh
./setenv.sh - example setenv.sh with defaults set for minimal time spent in garbage collection
#! /bin/sh
# ==================================================================
# ______ __ _____
# /_ __/___ ____ ___ _________ _/ /_ /__ /
# / / / __ \/ __ `__ \/ ___/ __ `/ __/ / /
# / / / /_/ / / / / / / /__/ /_/ / /_ / /
#/_/ \____/_/ /_/ /_/\___/\__,_/\__/ /_/
# Multi-instance Apache Tomcat installation with a focus
# on best-practices as defined by Apache, SpringSource, and MuleSoft
# migrating from https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/git/git.plugin.zsh
# Aliases
alias g='git'
#compdef g=git
alias gst='git status'
#compdef _git gst=git-status
alias gd='git diff'
#compdef _git gd=git-diff
alias gdc='git diff --cached'
@neodevelop
neodevelop / guess_my_number.c
Created March 9, 2018 23:07
Guess my number in C
#include <stdio.h>
void guess(int n, int low, int upper){
int guess_number = (upper + low) / 2;
if(guess_number < n){
printf("Tu número no es %d\n", guess_number);
guess(n, guess_number, upper);
}
if(guess_number > n){
printf("Tu número no es %d\n", guess_number);
@neodevelop
neodevelop / Haskell_lecture_1.adoc
Last active June 17, 2018 20:48
Haskell Lecture 1

Haskell

Functions

Is a mapping that takes one or more arguments and produces a single result.

  • Is defined using an equation with a name for the function

  • Each argument has a name

  • The body specifies how would be calculated in terms of the arguments

@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.
@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 / 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 / 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 / .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' }