Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Nasrul Hazim Bin Mohamad nasrulhazim

🎯
Focusing
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
nasrulhazim / create-pdo-informix.md
Last active Aug 25, 2019
Create PDO for Informix for MacOS
View create-pdo-informix.md

Download targeted Informix Client SDK

Extract the installer:

$ tar -xvf filename.tar

Install the Client SDK:

@nasrulhazim
nasrulhazim / install-informix.md
Created Aug 23, 2019
Informix DB Installation
View install-informix.md

Create Informix Group & User

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

Password: informix

@nasrulhazim
nasrulhazim / .php_cs
Created Jul 6, 2019 — forked from jwage/.php_cs
php-cs-fixer git pre commit hook
View .php_cs
<?php
return Symfony\CS\Config\Config::create()
->level(Symfony\CS\FixerInterface::SYMFONY_LEVEL)
->fixers([
'short_array_syntax',
'ordered_use',
])
;
@nasrulhazim
nasrulhazim / github.sh
Created May 23, 2019
Personal Access Token for CLI - GitHub
View github.sh
composer config github-oauth.github.com your-personal-access-token
@nasrulhazim
nasrulhazim / composer.json
Created May 23, 2019
Private Repository in Application
View composer.json
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
@nasrulhazim
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
# 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
trigger:
- develop
pool:
vmImage: 'Ubuntu-16.04'
@nasrulhazim
nasrulhazim / DuskTestCase.php
Created May 21, 2019
Use SQLite in Laravel Dusk
View DuskTestCase.php
<?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
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
nasrulhazim / navigation.blade.php
Created May 14, 2019
Leave impersonate Button
View navigation.blade.php
@impersonating
<li class="nav-item mt-2">
<a class="btn btn-primary" href="{{ route('impersonate.leave') }}">{{ __('Leave Impersonation') }}</a>
</li>
@endImpersonating
@nasrulhazim
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>
</a>
@endif
{{-- 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.