Skip to content

Instantly share code, notes, and snippets.

Luis Carlos Hernandez Macias luiskhernandez

  • Colombia
Block or report user

Report or block luiskhernandez

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@luiskhernandez
luiskhernandez / init.vim
Created Mar 21, 2019 — forked from celso/init.vim
Neovim setup for OSX users
View init.vim
syntax on
set ruler " Show the line and column numbers of the cursor.
set formatoptions+=o " Continue comment marker in new lines.
set textwidth=0 " Hard-wrap long lines as you type them.
set modeline " Enable modeline.
set esckeys " Cursor keys in insert mode.
set linespace=0 " Set line-spacing to minimum.
set nojoinspaces " Prevents inserting two spaces after punctuation on a join (J)
" More natural splits
set splitbelow " Horizontal split below current.
@luiskhernandez
luiskhernandez / gist:647976badb46a41b4d81
Created Dec 28, 2015
Issue running rubocop in vim, wrong ruby version.
View gist:647976badb46a41b4d81
rvm also has this problem. If zsh is your default shell when it starts /etc/zshenv gets executed.
This executes /usr/libexec/path_helper. That sets up the path based on the contents /etc/paths and /etc/paths.d/.
The faq for rvm mentions moving /etc/zshenv to /zsh/zshrc. I did this and it removed the /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin from the start of my path in macvim.
@luiskhernandez
luiskhernandez / gist:e5df26e2129ee823ca3d
Created Dec 12, 2015
Install vim with python and ruby support
View gist:e5df26e2129ee823ca3d
brew install vim --with-features=huge --enable-interp=lua,ruby,perl,python
@luiskhernandez
luiskhernandez / Api controller
Last active Jul 15, 2018
Devise authenticate_user_from_token
View Api controller
class ApplicationController < ActionController::API
before_action :authenticate_user_from_token!
def authenticate_user_from_token!
auth_token = request.headers['Authorization']
auth_token ? authenticate_with_token!(auth_token) : authentication_error
end
def authenticate_with_token!(token)
unless token.include?(':')
You can’t perform that action at this time.