Skip to content

Instantly share code, notes, and snippets.

View patrickmaciel's full-sized avatar
🙏
Jesus is coming!

Patrick Maciel patrickmaciel

🙏
Jesus is coming!
View GitHub Profile
@patrickmaciel
patrickmaciel / package.json
Last active November 5, 2022 05:06
React Native Expo WSL2 Fix Ip Address QR Code
{
"scripts": {
"startwsl": "REACT_NATIVE_PACKAGER_HOSTNAME=$(netsh.exe interface ip show address 'Wi-Fi 2' | grep 'IP Address' | sed -r 's/^.*IP Address:\\W*//') expo start",
}
}
@patrickmaciel
patrickmaciel / keychron_linux.md
Created August 19, 2022 17:03 — forked from andrebrait/keychron_linux.md
Keychron keyboards on Linux + Bluetooth fixes

Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.

Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.

Make Fn + F-keys work

Keychron Keyboards on Linux use the hid_apple driver (even in Windows/Android mode), both in Bluetooth and Wired modes. By default, this driver uses the F-keys as multimedia shortcuts and you have to press Fn + the key to get the usual F1 through F12 keys.

@WillianTomaz
WillianTomaz / wsl-info.md
Last active November 16, 2024 13:06
Instruções do WSL (Instalação, Backup e Restauração)

LinkedIn

Instruções para Instalação, Backup e Restauração do WSL 2

  • Observação:

    • Sempre buscar pela documentação oficial, este documento é um tutorial
      que pode não te atender conforme tenha novas atualizações do processo de instalação.
    • As referências estão no final do documento.
  • Foi utilizado:

@patrickmaciel
patrickmaciel / default.conf
Last active May 6, 2022 22:57
p4dev - setup debian server with php mysql (mariadb) nginx composer
server {
listen 80;
listen [::]:80;
server_name localhost;
root /var/www/html;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
@patrickmaciel
patrickmaciel / configuracoes.md
Created April 18, 2021 00:30
Laragon + Mailhog
@the-codinator
the-codinator / bash-stuff.sh
Last active September 25, 2023 18:37
Some good to have configs for bash (or zsh) for your terminal
###################
##### SOURCES #####
###################
##### Aliases #####
## Git
export GH_HOST=github.com
function clone { [[ -z "$1" ]] && echo "Error: Missing repo name parameter" && return 2; local git_org=$(basename $(pwd)); echo "Cloning [$git_org/$1] ..."; git clone "git@$GH_HOST:$git_org/$1.git"; }
@andrebrait
andrebrait / keychron_linux.md
Last active November 7, 2024 08:48
Keychron keyboards on Linux + Bluetooth fixes

Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.

Note: many newer Keychron keyboards use QMK as firmware and most tips here do not apply to them. Maybe the ones related to Bluetooth can be useful, but everything related to Apple's keyboard module (hid_apple) on Linux, won't work. As far as I know, all QMK-based boards use the hid_generic module instead. Examples of QMK-based boards are: Q, Q-Pro, V, K-Pro, etc.

Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.

Make Fn + F-keys work (NOT FOR QMK-BASED BOARDS)

Older Keychron keyboards (those not based on QMK) use the hid_apple driver on Linux, even in the Windows/Android mode, both in Bluetooth and Wired modes.

Live Reload (Lavarel no VSCode → Chrome)

Isso permite que a aba com o laravel no navegador seja automaticamente atualizada a cada arquivo modificado no projeto. Ou seja, cada vez que você editar um arquivo no Visual Code, ao salvar esse arquivo o resultado será refletido automaticamente na aba do chrome.

Instale os seguintes itens

Configuração no Google Chrome

@skynet
skynet / upgrade-php7.sh
Created December 29, 2018 03:52 — forked from heathdutton/upgrade-php7.sh
Upgrade PHP to 7.3 on Amazon Linux (specifically for Elastic Beanstalk but should work elsewhere)
#!/usr/bin/env bash
# Upgrade an Amazon Linux EC2 to PHP 7.3
#
# Last tested w/ PHP 7.2 AWS Linux version 2.8.5
#
# Must be ran as sudo:
# sudo bash upgrade-php7.sh
#
# Can be added to ./.ebextensions/20_php.config like so:
# container_commands:
@vluzrmos
vluzrmos / phpstorm.cmder.md
Last active September 13, 2021 03:30
Configurar o Laragon CMDER dentro do PHPSTORM

1- Adicionar a variável de ambiente CMDER_ROOT com o caminho para C:\laragon\bin\cmder (local do cmder no computador)

2- Abrir o phpstorm, ir em File (Menu) > Settings > Tools > Terminal e alterar o caminho padrão "cmd.exe" para:

"cmd.exe" /k ""%CMDER_ROOT%\vendor\init.bat""

3- Pode acontecer de a variável CMDER_ROOT não estar pronta, você pode precisar reiniciar sua máquina.