copy code snippet and create a file anywhere in your server:
cd ~
mkdir scripts
cd scripts
touch install-app-dependencies
chmod +x install-app-dependencies
<?php | |
use App\Contracts\Builder; | |
use App\Contracts\Menu; | |
it('runs on PHP 8.3 or above') | |
->expect(phpversion()) | |
->toBeGreaterThanOrEqual('8.3.0'); | |
it('does not use debugging functions') |
copy code snippet and create a file anywhere in your server:
cd ~
mkdir scripts
cd scripts
touch install-app-dependencies
chmod +x install-app-dependencies
#!/bin/bash | |
# Function to display usage | |
usage() { | |
echo "Usage: $0 -d <project_directory> [-p <ports>]" | |
echo " -d <project_directory> : The directory to be used by the web server (mandatory)" | |
echo " -p <ports> : Comma-separated list of http ports (default: 80,443)" | |
exit 1 | |
} |
{ | |
"meta": { | |
"theme": "elegant", | |
"version": "v1.0.0", | |
"canonical": "https://github.com/jsonresume/resume-schema/blob/v1.0.0/schema.json" | |
}, | |
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json", | |
"basics": { | |
"name": "Nasrul Hazim Mohamad", | |
"label": "Solution Architect, Software Engineer, IT Trainer & Consultant", |
package main | |
import ( | |
"crypto/sha256" | |
"encoding/json" | |
"fmt" | |
"strconv" | |
"strings" | |
"time" | |
) |
<?php | |
namespace App\Exceptions; | |
use Exception; | |
class ContractException extends Exception | |
{ | |
public static function throwIf(bool $condition, string $method, ...$args) | |
{ |
<?php | |
namespace App\Actions; | |
class MemoryUtilisation | |
{ | |
public $units = ['B','KB','MB','GB','TB','PB']; | |
public $start; | |
public $startTime; | |
public $end; |
CREATE proc [dbo].[sp_MSforeachtable] | |
@command1 nvarchar(2000), @replacechar nchar(1) = N'?', @command2 nvarchar(2000) = null, | |
@command3 nvarchar(2000) = null, @whereand nvarchar(2000) = null, | |
@precommand nvarchar(2000) = null, @postcommand nvarchar(2000) = null | |
AS | |
declare @mscat nvarchar(12) | |
select @mscat = ltrim(str(convert(int, 0x0002))) | |
if (@precommand is not null) | |
exec(@precommand) |
<?php | |
use Illuminate\Database\Eloquent\Builder; | |
if (! function_exists('dumpSql')) { | |
function dumpSql(Builder $builder) | |
{ | |
return array_reduce($builder->getBindings(), function ($sql, $binding) { | |
return preg_replace('/\?/', is_numeric($binding) ? $binding : "'".$binding."'", $sql, 1); |
<?php | |
use Illuminate\Database\Eloquent\Builder; | |
if (! function_exists('dumpSql')) { | |
function dumpSql(Builder $builder) | |
{ | |
return array_reduce($builder->getBindings(), function ($sql, $binding) { | |
return preg_replace('/\?/', is_numeric($binding) ? $binding : "'".$binding."'", $sql, 1); | |
}, $builder->toSql()); |