Skip to content

Instantly share code, notes, and snippets.

View paulocastellano's full-sized avatar
🚀
I may be slow to respond.

Paulo Castellano paulocastellano

🚀
I may be slow to respond.
View GitHub Profile

Manage Multiple Claude Code Accounts

Run two Claude Code accounts simultaneously on macOS without re-authenticating by using separate configuration directories.

Steps

  1. Create Separate Config Directories
    mkdir ~/.claude-account1
    mkdir ~/.claude-account2
@paulocastellano
paulocastellano / create-laravel-package.md
Created February 25, 2024 21:59 — forked from shankar-bavan/create-laravel-package.md
How to Build Laravel Package

Step #1: Install Laravel

Install the latest Laravel version i.e. Laravel 5.8. To do so go to the project directory and run the command:

composer create-project --prefer-dist laravel/laravel

Step #2: Create Package Directory

create folder from laravel root directory with this structure:

@paulocastellano
paulocastellano / User.php
Created June 5, 2023 19:19 — forked from atkaye/User.php
Setting the currency with Laravel Cashier
<?php
use Illuminate\Auth\UserInterface;
use Illuminate\Auth\Reminders\RemindableInterface;
use Laravel\Cashier\BillableInterface;
use Illuminate\Auth\UserTrait;
use Illuminate\Auth\Reminders\RemindableTrait;
use Laravel\Cashier\BillableTrait;
@paulocastellano
paulocastellano / .zshrc
Created January 22, 2023 01:16 — forked from bashbunni/.zshrc
CLI Pomodoro for Mac
# I'll be doing another one for Linux, but this one will give you
# a pop up notification and sound alert (using the built-in sounds for macOS)
# Requires https://github.com/caarlos0/timer to be installed
# Mac setup for pomo
alias work="timer 60m && terminal-notifier -message 'Pomodoro'\
-title 'Work Timer is up! Take a Break 😊'\
-appIcon '~/Pictures/pumpkin.png'\
-sound Crystal"
@paulocastellano
paulocastellano / widget.js
Created January 4, 2023 13:41 — forked from pie6k/widget.js
Scriptable widget showing app revenue
// Copy this code and paste it into Scriptable code editor on your phone
async function loadStats() {
const request = new Request("https://your-endpoint-giving-you-revenue-data.com");
const { todayUSD, todayOrders, revenue30USD, orders30 } = await request.loadJSON();
return { todayUSD, todayOrders, revenue30USD, orders30 };
}
const usdFormatter = new Intl.NumberFormat("en-US", { style: "currency", currency: "USD" });
@paulocastellano
paulocastellano / client.js
Created September 22, 2022 12:51 — forked from crtr0/client.js
A simple example of setting-up dynamic "rooms" for socket.io clients to join
// set-up a connection between the client and the server
var socket = io.connect();
// let's assume that the client page, once rendered, knows what room it wants to join
var room = "abc123";
socket.on('connect', function() {
// Connected, let's sign-up for to receive messages for this room
socket.emit('room', room);
});
@paulocastellano
paulocastellano / nginx-tuning.md
Created March 17, 2022 13:10 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

<option value="USD">United States Dollar - USD</option>
<option value="EUR">Euro - EUR</option>
<option value="GBP">British Pound - GBP</option>
<option value="AUD">Australian Dollar - AUD</option>
<option value="CAD">Canadian Dollar - CAD</option>
<option value="JPY">Japanese Yen - JPY</option>
<option value="BYR">Belarusian Ruble - BYR</option>
<option value="AED">United Arab Emirates Dirham - AED</option>
<option value="AFN">Afghan Afghani - AFN</option>
<option value="ALL">Albanian Lek - ALL</option>
@paulocastellano
paulocastellano / example.css
Created July 18, 2021 00:28 — forked from dillonchanis/example.css
Tailwind Utility for using gradients with text
@layer utilities {
.text-gradient {
background-clip: text;
-webkit-text-fill-color: transparent;
}
}
@paulocastellano
paulocastellano / keychron_linux.md
Created May 30, 2021 01:31 — forked from andrebrait/keychron_linux.md
Keychron keyboards on Linux (+ bluetooth fixes)

Here the best setup (I think so :D) for Keychron + Linux

Make Fn + F-keys work

  • Step 1: Set fkeyfirst by:
    • Create the file /etc/modprobe.d/hid_apple.conf. Add this line to the file: options hid_apple fnmode=2
    • Save the file and execute the following command: sudo update-initramfs -u
    • Reboot
  • Step 2: Use the keyboard in Windows/Android mode
  • Step 3: If get stuck with numpad mode: Double hit F6 or fn + F6. I've been using this config since the very first day, both bluetooth and cable with no problem.