Skip to content

Instantly share code, notes, and snippets.

View jeffersongoncalves's full-sized avatar
🇺🇦
Stand with Ukraine

Jefferson Gonçalves jeffersongoncalves

🇺🇦
Stand with Ukraine
View GitHub Profile
@jeffersongoncalves
jeffersongoncalves / .env
Created April 11, 2025 14:29 — forked from aguinaldotupy/.env
Docker Laravel Octane / PHP 8.4 / Swoole
OCTANE_SERVER="swoole"
OCTANE_HTTPS="true"
WWWGROUP=1004
WWWUSER=1004
<?php
namespace App\Traits;
trait PostsPerMonthSeries
{
protected function getChartData(): array
{
return [
'data' => [
@jeffersongoncalves
jeffersongoncalves / .my_setup_oh-my-zsh
Created January 7, 2025 18:01 — forked from andrelugomes/.my_setup_oh-my-zsh
Install oh-my-zsh, plugins and theme
- ok-my-zsh
- p10k.zsh : custon
- .zshrc : Plugins
@jeffersongoncalves
jeffersongoncalves / theme.css
Created September 2, 2024 18:06 — forked from saade/FilamentServiceProvider.php
Filament Custom Theme
@import '/vendor/filament/filament/resources/css/theme.css';
@config 'tailwind.config.js';
html:not(:has(.fi-topbar-with-navigation)) {
.fi-sidebar,
.fi-sidebar-header,
aside {
@apply !ring-0 !shadow-none;
}
@jeffersongoncalves
jeffersongoncalves / pint.json
Last active May 16, 2024 16:35 — forked from JustSteveKing/pint.json
Laravel Pint configuration
{
"preset": "psr12",
"rules": {
"align_multiline_comment": true,
"array_indentation": true,
"array_syntax": true,
"binary_operator_spaces": {
"default": "single_space"
},
"blank_line_after_namespace": true,
Please take a look at the original article (http://www.softwareprojects.com/resources/programming/t-optimizing-nginx-and-php-fpm-for-high-traffic-sites-2081.html) as it includes excellent configuration file examples.
1. Switch from TCP to UNIX domain sockets:
When communicating to processes on the same machine UNIX sockets have better performance the TCP because there's less copying and fewer context switches.
2. Adjust Worker Processes:
Set the worker_processes in your nginx.conf file to the number of cores your machine has and increase the number of worker_connections.
3. Setup upstream load balancing:
Multiple upstream backends on the same machine produce higher throughout than a single one.
<?php
namespace App\Helper;
trait WpTrait
{
/**
* Replaces double line-breaks with paragraph elements.
@jeffersongoncalves
jeffersongoncalves / setup.sh
Created March 31, 2022 17:45 — forked from jjvillavicencio/setup.sh
Install Android SDK on Windows Bash (WSL)
cd /home/<user>/
sudo apt-get install unzip
wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip
unzip sdk-tools-linux-4333796.zip -d Android
rm sdk-tools-linux-4333796.zip
sudo apt-get install -y lib32z1 openjdk-8-jdk
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export PATH=$PATH:$JAVA_HOME/bin
printf "\n\nexport JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64\nexport PATH=\$PATH:\$JAVA_HOME/bin" >> ~/.bashrc
cd Android/tools/bin
@jeffersongoncalves
jeffersongoncalves / rearct-native-app-in-wsl2.md
Created March 31, 2022 17:45 — forked from bergmannjg/rearct-native-app-in-wsl2.md
Building a react native app in WSL2
@jeffersongoncalves
jeffersongoncalves / README.md
Created March 13, 2022 22:19 — forked from magnetikonline/README.md
List all Git repository objects by size.

List all Git repository objects by size

Summary

Bash script to:

  • Iterate all commits made within a Git repository.