Skip to content

Instantly share code, notes, and snippets.

View maherelgamil's full-sized avatar
😉

Maher El Gamil maherelgamil

😉
View GitHub Profile
@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()
@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
@josecanhelp
josecanhelp / meilisearch-forge.md
Last active March 21, 2024 14:39
Install MeiliSearch on Forge servers

Although MeiliSearch offers steps to install via apt, there are some dependency libraries that are not installable on the server architecture we have availble on our Tighten Forge servers. However, the servers can run the program just fine with the binary. Here are the steps I took to make it work.

Download the stable release

curl -L https://install.meilisearch.com | sh

Change the ownership and modify permissions

chmod 755 meilisearch chown root:root meilisearch

Move the binary to a system-wide available path

@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">
@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
@ibraheem4
ibraheem4 / postgres-brew.md
Last active April 25, 2024 08:55 — forked from sgnl/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@FlavaSava7
FlavaSava7 / countries_nationalities_arabic_english.sql
Last active April 9, 2024 14:57
SQL Countries & Nationalities List : English and Arabic
CREATE TABLE `countries` (
`country_code` varchar(2) NOT NULL default '',
`country_enName` varchar(100) NOT NULL default '',
`country_arName` varchar(100) NOT NULL default '',
`country_enNationality` varchar(100) NOT NULL default '',
`country_arNationality` varchar(100) NOT NULL default '',
PRIMARY KEY (`country_code`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `countries`
@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
@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) {