Skip to content

Instantly share code, notes, and snippets.

View nasrulhazim's full-sized avatar
🎯
Focusing

Nasrul Hazim Bin Mohamad nasrulhazim

🎯
Focusing
View GitHub Profile
@syahzul
syahzul / how-to-install-php-oci8-for-macos-ventura-sonoma-and-above-on-apple-silicon-macs.md
Last active February 17, 2024 23:38
How to install PHP OCI8 for macOS Ventura/Sonoma on Apple Silicon Macs

How to install PHP OCI8 for macOS Ventura/Sonoma on Apple Silicon Macs

Note
If your using macOS Monterey or below, please refer to How to install OCI8 on macOS (Monterey) M1 Processor with PHP 8.1

macOS Ventura and above, duplicating and renaming Terminal.app are disabled by Apple. In order to install the OCI8, we need to switch between arm64 and x86_64 architecture.

Install Rosetta

In Terminal, there is no automatic detection for missing Rosetta to run older architecture command line tools.

@syahzul
syahzul / how-to-install-oci8-on-macos-monterey-m1-processor-with-php-81.md
Last active November 29, 2023 02:17
How to install OCI8 on macOS (Monterey) M1 Processor with PHP 8.1
@adbrsln
adbrsln / mulitple-mysqlrouter.md
Last active April 5, 2022 05:18
Multiple MySQL Router Client (Different Cluster) on Single Server

Introductions

Planning to connect to multiple Cluster at once from a single server? heres the plan...

  • Cluster 1
    • c1-node-1
    • c1-node-2
    • c1-node-3
  • Cluster 2
    • c2-node-1
    • c2-node-2
@LordGhostX
LordGhostX / blockchain.go
Last active March 27, 2024 20:34
Blockchain POC with Golang
package main
import (
"crypto/sha256"
"encoding/json"
"fmt"
"strconv"
"strings"
"time"
)
@zanechua
zanechua / azure-pipelines.yml
Last active April 11, 2023 11:51
Azure Pipeline + Laravel + MySQL + PHPUnit + Laravel Dusk
# PHP
# Test and package your PHP project.
# Add steps that run tests, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/php
pool:
vmImage: 'Ubuntu 16.04'
variables:
phpVersion: 7.2
<VirtualHost *:80>
ServerAdmin admin@example.com
DocumentRoot /var/www/html/
ServerName example.com
<Directory /var/www/html/ebiddi-api/public>
Options +FollowSymlinks
AllowOverride All
Require all granted
</Directory>
@jakebathman
jakebathman / logslaravel.sh
Created August 19, 2018 00:06
Tail Laravel logs and filter out the stack traces
tail -f -n 450 storage/logs/laravel*.log \
| grep -i -E \
"^\[\d{4}\-\d{2}\-\d{2} \d{2}:\d{2}:\d{2}\]|Next [\w\W]+?\:" \
--color
@viktorpetryk
viktorpetryk / mailhog-install.md
Last active January 27, 2023 09:08
MailHog installation on Ubuntu

Install & Configure MailHog

  1. Download and make it executable
wget https://github.com/mailhog/MailHog/releases/download/v1.0.0/MailHog_linux_amd64
sudo cp MailHog_linux_amd64 /usr/local/bin/mailhog
sudo chmod +x /usr/local/bin/mailhog
  1. Make MailHog as a service
@nafiesl
nafiesl / codeship-setup-commands-laravel-mysql.txt
Last active February 23, 2021 13:07
Codeship Setup Commands for Laravel that uses MySQL Database
phpenv local 7.0
echo "memory_limit = 512M" >> /home/rof/.phpenv/versions/$(phpenv version-name)/etc/php.ini
# install dependencies
COMPOSER_HOME=${HOME}/cache/composer
composer install --prefer-dist --no-interaction
# set up environment variables
touch .env
echo "APP_ENV=testing" >> .env
echo "APP_DEBUG=true" >> .env
echo "APP_KEY=base64:sQPFP80eWJQGo0SDPc+M2Tib+GLUocRYRw4RLsfM27I=" >> .env
@jeffochoa
jeffochoa / RouterServiceProvider.php
Created July 30, 2017 20:28
Get collection of available routes in Laravel
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Route;
use Illuminate\Routing\Route as Router;
class RouterServiceProvider extends ServiceProvider
{