Skip to content

Instantly share code, notes, and snippets.


Nasrul Hazim Bin Mohamad nasrulhazim

Block or report user

Report or block nasrulhazim

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
nasrulhazim /
Last active Aug 25, 2019
Create PDO for Informix for MacOS

Download targeted Informix Client SDK

Extract the installer:

$ tar -xvf filename.tar

Install the Client SDK:

nasrulhazim /
Created Aug 23, 2019
Informix DB Installation

Create Informix Group & User

# groupadd -g 1001 informix
# useradd -u 1001 -g informix informix
# passwd informix

Password: informix

nasrulhazim / .php_cs
Created Jul 6, 2019 — forked from jwage/.php_cs
php-cs-fixer git pre commit hook
View .php_cs
return Symfony\CS\Config\Config::create()
nasrulhazim /
Created May 23, 2019
Personal Access Token for CLI - GitHub
composer config your-personal-access-token
nasrulhazim / composer.json
Created May 23, 2019
Private Repository in Application
View composer.json
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"license": "MIT",
"require": {
nasrulhazim / azure-pipelines.yml
Last active May 21, 2019 — forked from zanechua/azure-pipelines.yml
Azure Pipeline + Laravel + PHPUnit + Laravel Dusk
View azure-pipelines.yml
# Test and package your PHP project.
# Add steps that run tests, save build artifacts, deploy, and more:
- develop
vmImage: 'Ubuntu-16.04'
nasrulhazim / DuskTestCase.php
Created May 21, 2019
Use SQLite in Laravel Dusk
View DuskTestCase.php
namespace Tests;
use Facebook\WebDriver\Chrome\ChromeOptions;
use Facebook\WebDriver\Remote\DesiredCapabilities;
use Facebook\WebDriver\Remote\RemoteWebDriver;
use Laravel\Dusk\TestCase as BaseTestCase;
use Illuminate\Contracts\Console\Kernel;
nasrulhazim / get-database-size.sql
Created May 16, 2019
Get Databases Size in MB and GB
View get-database-size.sql
SELECT table_schema AS "Database",
ROUND(SUM(data_length + index_length) / 1024 / 1024, 2) AS size_in_mb,
ROUND(SUM(data_length + index_length) / 1024 / 1024 / 1024, 2) AS size_in_gb
FROM information_schema.TABLES
GROUP BY table_schema
order by size_in_gb desc;
nasrulhazim / navigation.blade.php
Created May 14, 2019
Leave impersonate Button
View navigation.blade.php
<li class="nav-item mt-2">
<a class="btn btn-primary" href="{{ route('impersonate.leave') }}">{{ __('Leave Impersonation') }}</a>
nasrulhazim / actions.blade.php
Last active May 14, 2019
Impersonate Icons
View actions.blade.php
<div class="btn-group" role="group" aria-label="actions">
@if(auth()->guard('api')->user()->can('update-' . $permission))
<a href="{{ route('users.edit', $user->id) }}" class="btn btn-sm btn-outline-primary" title="{{ __('View') }}">
<i class="far fa-edit"></i>
{{-- Don't display in production, and also if the current logged in user don't have permission to update --}}
@if('production' != app()->environment() && auth()->guard('api')->user()->can('update-' . $permission))
<a href="{{ route('impersonate', $user->id) }}" class="btn btn-sm btn-primary" title="{{ __('Impersonate') }}">
<i class="far fa-user"></i>
You can’t perform that action at this time.