Skip to content

Instantly share code, notes, and snippets.

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

Zainal Hasan zhanang19

🏠
Working from home
View GitHub Profile
shortcut={all_shortcuts:{},add:function(a,b,c){var d={type:"keydown",propagate:!1,disable_in_input:!1,target:document,keycode:!1};if(c)for(var e in d)"undefined"==typeof c[e]&&(c[e]=d[e]);else c=d;d=c.target,"string"==typeof c.target&&(d=document.getElementById(c.target)),a=a.toLowerCase(),e=function(d){d=d||window.event;if(c.disable_in_input){var e;d.target?e=d.target:d.srcElement&&(e=d.srcElement),3==e.nodeType&&(e=e.parentNode);if("INPUT"==e.tagName||"TEXTAREA"==e.tagName)return}d.keyCode?code=d.keyCode:d.which&&(code=d.which),e=String.fromCharCode(code).toLowerCase(),188==code&&(e=","),190==code&&(e=".");var f=a.split("+"),g=0,h={"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":":","'":'"',",":"<",".":">","/":"?","\\":"|"},i={esc:27,escape:27,tab:9,space:32,"return":13,enter:13,backspace:8,scrolllock:145,scroll_lock:145,scroll:145,capslock:20,caps_lock:20,caps:20,numlock:144,num_lock:144,num:144,pause:19,"break":19,insert:45,home:36,"delete":46,end:35,pageup:33,page_
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class User extends Model
{
/**
* Get the user's first name.
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Product extends Model
{
/**
* Get the formatted price.
@zhanang19
zhanang19 / installing-phpmyadmin-on-subdomain.md
Created January 13, 2020 03:13 — forked from harryfinn/installing-phpmyadmin-on-subdomain.md
How to install PHPMyAdmin on a subdomain

Installing PHPMyAdmin on a subdomain

I was recently tasked with adding PHPMyAdmin to one of our LAMP servers for a 3rd party with little/no ssh knowledge to use in order to access the MySQL database(s). This gist documents how I configured PHPMyAdmin on the LAMP server on a subdomain with an SSL.

Prerequisites

Before following this guide, it is assumed that you already have a LAMP server up

{
"autoload": {
"psr-4": {
"App\\": "app/",
"Gazeboin\\": "app/Gazeboin/src"
},
},
}
    app/
        Console/
        Events/
        Exceptions/
            CustomException.php
        Gazeboin/
            src/
                Event/
                    Application/
<?php
namespace App\Http\Controllers\API\V1;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Gazeboin\Event\Domain\Services\AttemptEventService;
use Gazeboin\Event\Domain\Entities\EventEntity;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
<?php
namespace Gazeboin\Event\Domain\Entities;
use Illuminate\Database\Eloquent\Model;
class EventEntity extends Model
{
protected $table = 'events';
<?php
namespace Gazeboin\Event\Domain\Services;
use Gazeboin\Event\Domain\Entities\EventEntity;
use Gazeboin\Event\Domain\Entities\EventAttemptEntity;
class AttemptEventService
{
public function attempt($eventId, $data)
@zhanang19
zhanang19 / README.md
Last active May 30, 2020 13:18
Tailwind + Laravel Mix setup

Tailwind + Laravel Mix Setup

This is a gist to setup TailwindCSS on your Laravel project. Give me an advice if you have a better idea about this.

How to Use

  • Copy and compare this file to your Laravel project
  • Run yarn run dev:css to build dev version
  • Run yarn run build:css to build production-ready version

Donate