This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Livewire.hook('commit', ({ succeed }) => { | |
succeed(() => { | |
Alpine.nextTick(() => $('#select').select2()); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
use Http; | |
class HomeController extends Controller | |
{ | |
use UsingSEO; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", | |
"version": 2, | |
"final_space": true, | |
"blocks": [ | |
{ | |
"type": "prompt", | |
"alignment": "left", | |
"segments": [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"commandline": "C:\\Program Files\\Git\\bin\\bash.exe", | |
"guid": "{2cd05161-f869-4bbb-ad20-8ec1977fbdfe}", | |
"hidden": false, | |
"icon": "C:\\Program Files\\Git\\mingw64\\share\\git\\git-for-windows.ico", | |
"name": "Bash", | |
"startingDirectory": "E:\\work" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# To enable Install from "Anywhere" Source | |
sudo spctl --master-disable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/local/bin/php /home/USERNAME/public_html/artisan schedule:run >> /dev/null 2>&1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function isAndroid() | |
{ | |
if (isset($_SERVER['HTTP_USER_AGENT'])) { | |
return strpos($_SERVER['HTTP_USER_AGENT'], 'Android') ? true : false; | |
} | |
return false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Will format bu in en lang | |
$model->created_at->format('M, Y'); | |
// Will translate the format to ar lang | |
$model->created_at->locale('ar')->translatedFormat('M, Y'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# One Columns | |
UPDATE users SET email = CONCAT('lab_', email) | |
# Two Columns | |
UPDATE users SET email = CONCAT('lab_', email), phone = CONCAT('lab_', phone) | |
# Two Columns with condition | |
UPDATE users SET email = CONCAT('lab_', email), phone = CONCAT('lab_', phone) where type != 'admin' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Path | |
# /etc/mysql/mycnf | |
# ... | |
[mysqld] | |
innodb_buffer_pool_size = 4G | |
innodb_log_buffer_size = 256M | |
innodb_log_file_size = 1G | |
innodb_write_io_threads = 16 |
NewerOlder