Skip to content

Instantly share code, notes, and snippets.

View dougkusanagi's full-sized avatar
🏠
Working from home

Douglas Lopes dougkusanagi

🏠
Working from home
View GitHub Profile
@dougkusanagi
dougkusanagi / graphql-client-guzzle.php
Last active October 18, 2023 22:12 — forked from mohamedhafezqo/example.php
GraphQL Client For PHP Using Guzzle
<?php
$endPoint = 'https://api.github.com/graphql';
$query = <<<'GRAPHQL'
query getUsers {
user {
id
name
}
@dougkusanagi
dougkusanagi / run-artisan-from-nodejs
Created September 22, 2024 19:02
How to run artisan (or other commands) from node easylly
import { spawn } from "node:child_process";
import { fileURLToPath } from "node:url";
import path from "node:path";
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
function startLaravelServer(config = {}) {
const {
host = "127.0.0.1",
@dougkusanagi
dougkusanagi / INSTALL_WARP_TERMINAL_WSL2.md
Last active January 29, 2025 15:30
How to install warp terminal in WSL2 working 31/12/2024
# Required library
sudo apt-get install libasound2t64

# Download installer
wget https://app.warp.dev/download?package=deb -O warp.deb

# Install warp
sudo apt install -y ./warp.deb
# or use `sudo dpkg -i warp.deb`
# PHP
sudo LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php &&
sudo apt install php8.3-common \
	php-json \
	mysql-client \
	mysql-server \
	php8.3-mysql \
	php8.3-xml \