Skip to content

Instantly share code, notes, and snippets.

View maherelgamil's full-sized avatar
😉

Maher El Gamil maherelgamil

😉
View GitHub Profile
@pbredenberg
pbredenberg / serverblock.sh
Last active August 8, 2018 02:30
Shell script to create nginx server blocks for wordpress website.
#!/usr/bin/env bash
#
# Nginx - new server block
# Based on this post: http://clubmate.fi/how-to-make-an-nginx-server-block-manually-or-with-a-shell-script/
# Functions
ok() { echo -e '\e[32m'$1'\e[m'; } # Green
die() { echo -e '\e[1;31m'$1'\e[m'; exit 1; }
# Variables
@dkesberg
dkesberg / CiconiaFacade.php
Created November 21, 2013 13:47
Ciconia Markdown Parser ServiceProvider & Facade for Laravel 4 Ciconia offers Github Flavored Markdown as extension and i really like to have "proper" linebreaks ;) Ciconia: https://github.com/kzykhys/Ciconia Laravel: https://github.com/laravel/laravel Github Flavored Markdown: https://help.github.com/articles/github-flavored-markdown
<?php
namespace dkesberg\Facades;
use Illuminate\Support\Facades\Facade;
class CiconiaFacade extends Facade {
protected static function getFacadeAccessor()
{
@Omranic
Omranic / slugify.js
Last active February 26, 2019 13:07 — forked from demoive/slugify.js
/**
* Converts a string to a "URL-safe" slug.
* Allows for some customization with two optional parameters:
*
* @param {string} Delimiter used. If not specified, defaults to a dash "-"
* @param {array} Adds to the list of non-alphanumeric characters which
* will be converted to the delimiter. The default list includes:
* ['–', '—', '―', '~', '\\', '/', '|', '+', '\'', '‘', '’', ' ']
*/
if (!String.prototype.slugify) {
@Krato
Krato / Laravel Nova snippets.md
Last active November 25, 2020 23:02
A set of snippets I use in Laravel Nova

A set of snippets I use in Laravel Nova

Snippets

Vue,js devtools (Only with manual installation)

cd ./nova 
yarn
mv webpack.mix.js.dist webpack.mix.js
@demoive
demoive / slugify.js
Last active February 24, 2021 08:59
Converts a string to a "URL-safe" slug
/**
* Converts a string to a "URL-safe" slug.
* Allows for some customization with two optional parameters:
*
* @param {string} Delimiter used. If not specified, defaults to a dash "-"
* @param {array} Adds to the list of non-alphanumeric characters which
* will be converted to the delimiter. The default list includes:
* ['–', '—', '―', '~', '\\', '/', '|', '+', '\'', '‘', '’', ' ']
*/
if (!String.prototype.slugify) {
@maherelgamil
maherelgamil / composer.sh
Created June 8, 2021 05:13
Install composer latest version on Ubuntu 20.04
#!/usr/bin/env bash
set -e
set -x
# Update server
sudo apt update
# Install some needed packages
sudo apt install php-cli unzip
@bezhanSalleh
bezhanSalleh / ModelResource.php
Last active July 31, 2022 23:26
Filament Dynamic UI for Role and Permissions | Toggel + Checkboxes
public static function form(Form $form): Form
{
return $form
->schema([
Forms\Components\Grid::make()
->schema([
Forms\Components\Card::make()
->schema([
Forms\Components\TextInput::make('name')
->required()
@MindaugasR
MindaugasR / currency_list
Last active December 8, 2022 13:34
World Currency list in PHP Array
array (
'ALL' => 'Albania Lek',
'AFN' => 'Afghanistan Afghani',
'ARS' => 'Argentina Peso',
'AWG' => 'Aruba Guilder',
'AUD' => 'Australia Dollar',
'AZN' => 'Azerbaijan New Manat',
'BSD' => 'Bahamas Dollar',
'BBD' => 'Barbados Dollar',
'BDT' => 'Bangladeshi taka',
@arlomba
arlomba / tailwind.js
Created January 30, 2019 23:07
Tailwind CSS config using Material Design colors
/*
Tailwind - The Utility-First CSS Framework
A project by Adam Wathan (@adamwathan), Jonathan Reinink (@reinink),
David Hemphill (@davidhemphill) and Steve Schoger (@steveschoger).
Welcome to the Tailwind config file. This is where you can customize
Tailwind specifically for your project. Don't be intimidated by the
length of this file. It's really just a big JavaScript object and
@blackfyre
blackfyre / GeneralModal.vue
Last active November 14, 2023 04:45
Modals in Laravel Nova Tools
<template>
<modal @modal-close="handleClose">
<form
@submit.prevent="handleConfirm"
slot-scope="props"
class="bg-white rounded-lg shadow-lg overflow-hidden"
style="width: 460px"
>
<slot :uppercaseMode="uppercaseMode" :mode="mode">
<div class="p-8">