Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Erick Patrick erickpatrick

🎯
Focusing
View GitHub Profile
@erickpatrick
erickpatrick / init.vim
Last active Oct 8, 2020
Neovim CoC Intelephense configuration
View init.vim
set nocompatible
filetype off
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
call plug#begin('~/.vim/plugged')
@erickpatrick
erickpatrick / changes-git-history.sh
Created Oct 25, 2019
renames user and changes email from git history
View changes-git-history.sh
git filter-branch --env-filter '
OLD_EMAIL="erick.alvarenga@erickpatrick.net"
CORRECT_NAME="erick patrick"
CORRECT_EMAIL="github@erickpatrick.net"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
export GIT_COMMITTER_NAME="$CORRECT_NAME"
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
fi
if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ]
@erickpatrick
erickpatrick / summary-creation-publication.md
Created Jan 18, 2019
Summary to create publications (scientific papers or not)
View summary-creation-publication.md

-- precise word use, past tense, active voice, brevity.

Title of post

  • categories

Abstract

225 chars

Introduction

  • not fully in details but more detailed than Abstract
@erickpatrick
erickpatrick / xcode.md
Last active Nov 15, 2018
Xcode interesting things
View xcode.md
View .zshrc
export PATH=/usr/local/bin:$PATH
# If you come from bash you might have to change your $PATH.
export ZSH="/Users/<user>/.oh-my-zsh"
ZSH_THEME="agnoster"
export UPDATE_ZSH_DAYS=7
plugins=(
git
)
@erickpatrick
erickpatrick / fzf-colored-preview.md
Created Nov 10, 2018
When working with FZF use Rouge gem to have coloured output of preview pane
View fzf-colored-preview.md
@erickpatrick
erickpatrick / undo-saved-stories.js
Created Jul 11, 2018
Unsave all saved medium publications I have
View undo-saved-stories.js
let savedPosts = document.querySelectorAll('[data-action=remove-from-queue]')
savedPosts.forEach(button => button.click())
@erickpatrick
erickpatrick / undo-like-tweets.js
Last active Aug 16, 2019
Unlike all liked tweets I have
View undo-like-tweets.js
let likeToUndo = document.querySelectorAll('[data-testid=unlike]')
likeToUndo.forEach(node => {setTimeout(() => node.click(), 500)})
@erickpatrick
erickpatrick / making-xdebug-work-with-vagrant-phpstorm-vscode-laravel-homestead.md
Last active Sep 23, 2020
Making xdebug work with Vagrant, PHPStorm and Laravel Homestead on Windows
View making-xdebug-work-with-vagrant-phpstorm-vscode-laravel-homestead.md

If you, like me, use a development machine provided by the company It department, it will probably be Windows based due security policies enforcement or something on these lines. That's ok, many of the new Windows based machines are really good and sturdy, and now, with the [Windows Subsystem for Linux] it can even work better for development that is not related to C#, .Net or related technologies.

The environment

However, when working with PHP and Laravel, we already have a nice way to run our code, inside the [Vagrant] VM from Laravel itself, [Homestead]. It comes with a bunch of software preinstalled that

You can’t perform that action at this time.