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
$:.unshift("/Library/RubyMotion/lib")
require File.join(File.dirname(__FILE__), 'version')
require 'motion/project'
require 'bundler'
Bundler.require
@neodevelop
neodevelop / tomcat.sh
Created November 22, 2012 02:35 — forked from valotas/tomcat.sh
Tomcat init.d script
#!/bin/bash
#
# tomcat7 This shell script takes care of starting and stopping Tomcat
#
# chkconfig: - 80 20
#
### BEGIN INIT INFO
# Provides: tomcat7
# Required-Start: $network $syslog
# Required-Stop: $network $syslog
@neodevelop
neodevelop / Writing Tools Writeup.markdown
Created December 8, 2016 05:43 — forked from mojavelinux/Writing Tools Writeup.markdown
How To Write A Technical Book (One Man's Modest Suggestions)
@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 / 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
Created July 25, 2021 15:42 — forked from lorenzosinisi/.vimrc
Vimrc config for Elixir
"""""""""""""""""""""""""""""""""""""
" Lorenzo Sinisi Vimrc configuration
"""""""""""""""""""""""""""""""""""""
set nocompatible
syntax on
set nowrap
set ignorecase
set smartcase
set encoding=utf8
set mouse=nicr
@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 / 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"