Skip to content

Instantly share code, notes, and snippets.

Avatar
😉

Maher El Gamil maherelgamil

😉
View GitHub Profile
@arlomba
arlomba / tailwind.js
Created Jan 30, 2019
Tailwind CSS config using Material Design colors
View tailwind.js
/*
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 May 16, 2021
Modals in Laravel Nova Tools
View GeneralModal.vue
<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 Nov 25, 2020
A set of snippets I use in Laravel Nova
View Laravel Nova snippets.md

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 May 17, 2021 — forked from sgnl/postgres-brew.md
Installing Postgres via Brew (OSX)
View postgres-brew.md

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@pbredenberg
pbredenberg / serverblock.sh
Last active Aug 8, 2018
Shell script to create nginx server blocks for wordpress website.
View serverblock.sh
#!/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
View 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) {
@taufik-nurrohman
taufik-nurrohman / php-html-css-js-minifier.php
Last active Apr 25, 2021
PHP Function to Minify HTML, CSS and JavaScript
View php-html-css-js-minifier.php
<?php
// Based on <https://github.com/mecha-cms/extend.minify>
define('MINIFY_STRING', '"(?:[^"\\\]|\\\.)*"|\'(?:[^\'\\\]|\\\.)*\'|`(?:[^`\\\]|\\\.)*`');
define('MINIFY_COMMENT_CSS', '/\*[\s\S]*?\*/');
define('MINIFY_COMMENT_HTML', '<!\-{2}[\s\S]*?\-{2}>');
define('MINIFY_COMMENT_JS', '//[^\n]*');
define('MINIFY_PATTERN_JS', '/[^\n]+?/[gimuy]*');
define('MINIFY_HTML', '<[!/]?[a-zA-Z\d:.-]+[\s\S]*?>');
@msurguy
msurguy / List.md
Last active May 16, 2021
List of open source projects made with Laravel
View List.md

Other people's projects:

My projects (tutorials are on my blog at http://maxoffsky.com):

@dkesberg
dkesberg / CiconiaFacade.php
Created Nov 21, 2013
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
View CiconiaFacade.php
<?php
namespace dkesberg\Facades;
use Illuminate\Support\Facades\Facade;
class CiconiaFacade extends Facade {
protected static function getFacadeAccessor()
{
@CMCDragonkai
CMCDragonkai / angularjs_directive_attribute_explanation.md
Last active May 11, 2021
JS: AngularJS Directive Attribute Binding Explanation
View angularjs_directive_attribute_explanation.md

AngularJS Directive Attribute Binding Explanation

When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.

  1. Raw Attribute Strings

    <div my-directive="some string" another-param="another string"></div>