Skip to content

Instantly share code, notes, and snippets.

View syofyanzuhad's full-sized avatar
🇵🇸
FREE PALESTINE

Syofyan Zuhad 🇵🇸 syofyanzuhad

🇵🇸
FREE PALESTINE
View GitHub Profile
@syofyanzuhad
syofyanzuhad / laravel-socket-io.md
Created May 21, 2022 11:55 — forked from brainlagid/laravel-socket-io.md
Setup Laravel with Socket.io [Ubuntu 20.04]

Server Requirement

  • Redis sudo apt install redis-server
  • Composer here
  • npm sudo apt install nodejs npm
  • laravel-echo-server npm install -g laravel-echo-server

Laravel Dependencies Requirement

  • predis
  • laravel-echo
  • socket.io-client ^2.4.0 issue
@syofyanzuhad
syofyanzuhad / deploy.sh
Created March 31, 2022 10:17 — forked from BenSampo/deploy.sh
Laravel deploy script
# Change to the project directory
cd $FORGE_SITE_PATH
# Turn on maintenance mode
php artisan down || true
# Pull the latest changes from the git repository
# git reset --hard
# git clean -df
git pull origin $FORGE_SITE_BRANCH
1. Installing Informix Client SDK for Linux x86_64
1.1 Download Informix Client SDK 3.70 for Linux x86_64 from IBM website, https://www-01.ibm.com/marketing/iwm/tnd/search.jsp?rs=ifxdl
1.2 Extract the file, `cd /opt/informix; tar -xvf clientsdk.3.70.FC8DE.LINUX.tar`
1.3 Start installation, `./installclientsdk`, install all
2. Installing PDO Informix
@syofyanzuhad
syofyanzuhad / Informix install info
Created January 2, 2022 11:16 — forked from bjreath/Informix install info
Informix CSDK and ruby-informix install issues
sudo ./installclientsdk
Password:
Preparing to install...
Extracting the installation resources from the installer archive...
Configuring the installer for this system's environment...
Launching installer...
Picked up _JAVA_OPTIONS: -Djava.awt.headless=true
Preparing CONSOLE Mode Installation...
@syofyanzuhad
syofyanzuhad / PreviewOfUpcomingPackage.php
Created November 27, 2021 12:56 — forked from calebporzio/PreviewOfUpcomingPackage.php
A model trait that allows child models to use parent table names and relationship keys.
<?php
namespace App\Abilities;
use Illuminate\Support\Str;
use ReflectionClass;
/**
* Note: This is a preview of an upcoming package from Tighten.
**/
<?php
abstract class Template
{
public function make()
{
return $this
->addHotWater()
->addSugar()
->addPrimaryToppings()
<?php
class Coffee
{
public function addCoffee()
{
var_dump('Add proper amount of coffee');
return $this;
}
<?php
class Tea
{
public function addTea()
{
var_dump('Add proper amount of tea');
return $this;
}
<?php
abstract class AbstractClass
{
// Force Extending class to define this method
abstract protected function getValue();
public function printOut()
{
print $this->getValue() . "\n";
<?php
interface Logger
{
public function execute($message);
}
class LogToDatabase implements Logger
{
public function execute($message){