Skip to content

Instantly share code, notes, and snippets.

View erickpatrick's full-sized avatar
🎯
Focusing

Erick Patrick erickpatrick

🎯
Focusing
View GitHub Profile
@erickpatrick
erickpatrick / Homestead-Magento.yaml
Last active January 8, 2024 01:50
Laravel Homestead on Windows with SMB ("faster shared folders")
---
ip: "192.168.10.10"
memory: 4096
cpus: 2
provider: virtualbox
authorize: C:/Users/<your-user>/.ssh/id_rsa.pub
keys:
- C:/Users/<your-user>/.ssh/id_rsa
@erickpatrick
erickpatrick / xdebug-homestead-config.txt
Created January 17, 2018 15:12
Configuration for xDebug with Homestead
zend_extension=xdebug.so
xdebug.remote_autostart=1
xdebug.remote_host=10.0.2.2 // same as the one showed when vagrant ssh "last log in from"
xdebug.remote_enable = 1
xdebug.remote_log=/home/vagrant/output.txt
xdebug.remote_handler=dbgp
xdebug.collect_params=1
xdebug.show_local_vars=1
xdebug.remote_port = 9000
xdebug.max_nesting_level = 512
@erickpatrick
erickpatrick / magento-aliases-functions.sh
Last active March 22, 2019 09:47
BASH function for daily work with Homestead+Magento2+Yarn+Webpack
function setup:recompile() {
cd ~/code
php bin/magento setup:upgrade
php bin/magento setup:di:compile
cd -
}
function setup:di:compile() {
cd ~/code
php bin/magento setup:di:compile
@erickpatrick
erickpatrick / making-xdebug-work-with-vagrant-phpstorm-vscode-laravel-homestead.md
Last active July 6, 2023 15:28
Making xdebug work with Vagrant, PHPStorm and Laravel Homestead on Windows

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

@erickpatrick
erickpatrick / undo-like-tweets.js
Last active August 16, 2019 07:12
Unlike all liked tweets I have
let likeToUndo = document.querySelectorAll('[data-testid=unlike]')
likeToUndo.forEach(node => {setTimeout(() => node.click(), 500)})
@erickpatrick
erickpatrick / undo-saved-stories.js
Created July 11, 2018 14:42
Unsave all saved medium publications I have
let savedPosts = document.querySelectorAll('[data-action=remove-from-queue]')
savedPosts.forEach(button => button.click())
@erickpatrick
erickpatrick / fzf-colored-preview.md
Created November 10, 2018 00:36
When working with FZF use Rouge gem to have coloured output of preview pane
@erickpatrick
erickpatrick / .zshrc
Created November 10, 2018 00:57
my ZSHCONFIG
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 / xcode.md
Last active November 15, 2018 20:34
Xcode interesting things