Skip to content

Instantly share code, notes, and snippets.

View m5lil's full-sized avatar
🏠
Working from home

Mahmoud Ahmed (محمود أحمد) m5lil

🏠
Working from home
View GitHub Profile
@m5lil
m5lil / settings.json
Created July 20, 2021 09:10
vscode settings (Laragon integrated)
{
"files.autoSave": "afterDelay",
"git.path": "C:\\laragon\\bin\\git\\bin\\git.exe",
"terminal.integrated.profiles.windows": {
"PowerShell": {
"source": "PowerShell",
"icon": "terminal-powershell"
},
"Command Prompt": {
"path": [
@m5lil
m5lil / how.md
Created June 29, 2021 16:40
[datatable component] laravel component datatable #laravel #component #datatable
<x-dg-datatable id="data_table" :heads="['#', 'Date', 'Hospital', 'Amount']" :buttons="true"/>
class Datatable extends Component
{
    public $beautify, $buttons;
    public $id;
    public $bordered, $hoverable, $condensed;
@m5lil
m5lil / AppServiceProvider.php
Created June 28, 2021 23:05
[View composers] Set Meta Titles with View Composers #laravel #example
<?php
namespace App\Providers;
use App\Http\ViewComposers\MetaViewComposer;
use Illuminate\Support\Facades\View;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
@m5lil
m5lil / reset.sh
Last active November 13, 2024 03:42
[reset jetbrains application trial] reset jetbrains ide evals v1.0.4 #others
#!/bin/bash
# reset jetbrains ide evals v1.0.4
OS_NAME=$(uname -s)
JB_PRODUCTS="IntelliJIdea CLion PhpStorm GoLand PyCharm WebStorm Rider DataGrip RubyMine AppCode"
if [ "$OS_NAME" == "Darwin" ]; then
echo 'macOS:'
for PRD in $JB_PRODUCTS; do
@m5lil
m5lil / app.js
Created July 18, 2020 20:35 — forked from echr/app.js
Simple Laravel + Vue + Laravel Mix + Firebase Notification (PWA, Offline)
// FILE PATH: /resources/js/app.js
require('./bootstrap');
// Import Service Worker Registry
require('./extensions/sw-registry');
import Vue from 'vue';
...
@m5lil
m5lil / .md
Created July 12, 2020 16:18
some practices for htaccess
#  any 2 letter/anything from 1 word (kebab-case)/any level from directory/../..
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^[a-z]{2}((\/(\w+)(-?(\w)([\w-]*))?)+)?$ "public/index.php" [L]
# Laravel Images to work
@m5lil
m5lil / deployment_guide.md
Created November 10, 2019 06:31 — forked from vicgonvt/deployment_guide.md
Deployment Guide for Ubuntu Server from Scratch with Laravel
@m5lil
m5lil / helper.php.md
Created November 8, 2019 23:19
Helper File #laravel #helper
if (! function_exists('home_route')) {
    /**
     * Return the route to the "home" page depending on authentication/authorization status.
     *
     * @return string
     */
    function home_route()
 {
@m5lil
m5lil / laravel_queryable.md
Last active January 25, 2019 20:57
laravel queryable

I'd suggest something like this:

url/item/?registered=>:DDMMYYYY The parameter name is the name of the attribute Right at the beginning of the parameter value is the operator Operator and value is separated by a : (it actually can be any separation character you want) Other examples:

url/item/?name=like:foo
@m5lil
m5lil / deploying.sh.md
Created January 15, 2019 18:59
Server ssh conf

cat ~/.ssh/id_rsa.pub | ssh [email protected] "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"

continues...