Skip to content

Instantly share code, notes, and snippets.

View yekowele's full-sized avatar
🎯
Focus

Yek yekowele

🎯
Focus
View GitHub Profile
@yekowele
yekowele / EnhancedEnum.php
Created September 19, 2022 20:15 — forked from aneesdev/EnhancedEnum.php
EnhancedEnum PHP trait
<?php
trait EnhancedEnum
{
/**
* Get the enum value from the name. e.g case INVOICE = 'invoice'; will return 'invoice'
*
* @param string $name
* @return static
*/
@yekowele
yekowele / whm-change-document-root.md
Last active March 19, 2019 10:56 — forked from Bodom78/whm-change-document-root.md
WHM/cPanel - Changing an accounts document root

To properly edit an accounts DocumentRoot go to /var/cpanel/userdata/username/ (replace username with the actual cPanel username for the account), then edit the file domain.com (where domain.com is your primary domain name).

You will see something like this in that file:

documentroot: /home/username/public_html

You will also see the cgi-bin area in this section:

scriptalias:
@yekowele
yekowele / webpack.mix.js
Last active May 15, 2023 21:13
Laravel Webpack Mix - Mix all files separately in directory.
const mix = require('laravel-mix');
let fs = require('fs');
let getFiles = function (dir) {
// get all 'files' in this directory
// filter directories
return fs.readdirSync(dir).filter(file => {
return fs.statSync(`${dir}/${file}`).isFile();
});
@yekowele
yekowele / README.md
Created November 29, 2018 09:50 — forked from hofmannsven/README.md
My simply MySQL Command Line Cheatsheet