Skip to content

Instantly share code, notes, and snippets.

View kiddtang's full-sized avatar

Kidd Tang kiddtang

  • Dogcomp Solution
  • Malaysia
View GitHub Profile
@kiddtang
kiddtang / .env
Last active January 30, 2024 21:12
Host WordPress on your Win 11 / 10 with Free Docker Desktop
MYSQL_ROOT_PASSWORD=your_root_password
MYSQL_USER=your_wordpress_database_user
MYSQL_PASSWORD=your_wordpress_database_password
@kiddtang
kiddtang / Admin.php (Adding Traits)
Last active September 9, 2021 13:19
Build Free Pro Website with me - Part #2
<?php
namespace App\Models;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Backpack\CRUD\app\Models\Traits\CrudTrait;
use Spatie\Permission\Traits\HasRoles;
@kiddtang
kiddtang / 2014_10_12_000000_create_admins_table.php
Last active September 7, 2021 13:12
Build Free Pro Website with me - Part #1
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateAdminsTable extends Migration
{
/**
* Run the migrations.
@kiddtang
kiddtang / .env
Last active December 21, 2023 09:25
proxy-manager
APP_PORT=48080
FORWARD_DB_PORT=43306
FORWARD_REDIS_PORT=46379
FORWARD_MEILISEARCH_PORT=47700
FORWARD_MAILHOG_PORT=41025
FORWARD_MAILHOG_DASHBOARD_PORT=48025
@kiddtang
kiddtang / .env-Swoole
Last active June 14, 2023 06:29
Youtube - Boosts your Laravel Sail
OCTANE_SERVER=swoole
OCTANE_HTTPS=true
@kiddtang
kiddtang / docker-compose.yml
Created July 9, 2021 09:03
Concurrent PHP Serve & Swoole
version: '3'
services:
laravel.test:
build:
context: ./docker/8.0
dockerfile: Dockerfile
args:
WWWGROUP: '${WWWGROUP}'
XDEBUG: '${APP_DEBUG:-false}'
XDEBUG_PORT: '${SAIL_XDEBUG_PORT:-9000}'
@kiddtang
kiddtang / .env
Last active July 11, 2022 11:34
Laravel Sail with HTTPS Swoole
OCTANE_SERVER=swoole
OCTANE_HTTPS=true
@kiddtang
kiddtang / https_get_sim7600.ino
Last active June 27, 2021 07:23
SIM7600x samples
#if TINY_GSM_TEST_TCP && defined TINY_GSM_MODEM_HAS_TCP
if (!modem.isGprsConnected()) {
DBG("... not connected");
} else {
DBG("Connecting to ", server);
// Make a HTTPS GET request:
Serial.println("Making GET request securely...");
client.get(resource);
int status_code = client.responseStatusCode();
String response = client.responseBody();
@kiddtang
kiddtang / web.php
Created June 6, 2021 13:29
Laravel Simple Load Test Route
<?php
use Illuminate\Support\Facades\Route;
use App\Models\User;
Route::get('/', function () {
return view('welcome');
});
@kiddtang
kiddtang / Dockerfile
Last active October 16, 2021 08:42
Xdebug Laravel Sail project in VS Code
ARG XDEBUG
ARG XDEBUG_PORT
RUN if [ "${XDEBUG}" = 'true' ] ; then \
apt-get update \
&& apt-get install -y php-xdebug \
&& echo "[XDebug]" > /etc/php/8.0/cli/php.ini \
&& echo "zend_extension="$(find /usr/lib/php/20200930/ -name xdebug.so)" > /etc/php/8.0/cli/php.ini" \
&& echo "xdebug.mode = debug" >> /etc/php/8.0/cli/php.ini \
&& echo "xdebug.discover_client_host = true" >> /etc/php/8.0/cli/php.ini \
&& echo "xdebug.client_host = host.docker.internal" >> /etc/php/8.0/cli/php.ini \