Skip to content

Instantly share code, notes, and snippets.

View emadelawady's full-sized avatar

Emad ElAwady emadelawady

  • PHP , Laravel Developer
  • Egypt
View GitHub Profile
@emadelawady
emadelawady / tailwind-webpack-setup.md
Created October 1, 2023 21:37 — forked from bradtraversy/tailwind-webpack-setup.md
Setup Webpack with Tailwind CSS

Webpack & Tailwind CSS Setup

Create your package.json

npm init -y

Create your src folder

Create a folder called src and add an empty index.js file. The code that webpack compiles goes in here including any Javascript modules and the main Tailwind file.

@emadelawady
emadelawady / git-clearHistory
Created January 7, 2020 12:49 — forked from stephenhardy/git-clearHistory
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git
<?php
/*
* Author: Ragnar
* Custom functions .
*/
/*------------------------------------*\
PROJECT_NAME External Modules/Files
\*------------------------------------*/
function custom_styles() {
$hold_styles_cdn = array(
@emadelawady
emadelawady / echo_styles_by_php_function
Last active June 28, 2019 03:13
this gist for bring styles by php magic, i didn't use built-in array's or string's functions just some logic, i like the way i can print "link rel" dynamically
/* get header , functions and footer
* with include built-in func
* you should def your directories paths
*/
// header.php
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
@emadelawady
emadelawady / dropdown-tax.php
Last active May 14, 2019 13:44
class for dropdown taxonomy parents & children
<?php
class dropdown_taxonomy_class {
public $tax = "adresati";
public function the_tax_hierarchy( $tax, $parent = '', $args = array( 'hide_empty' => false ) ) {
// taxonomy name or slug
$defaults = array(
'parent' => $parent,
'hide_empty' => false
);
@emadelawady
emadelawady / sources.list
Created December 4, 2018 18:52 — forked from rohitrawat/sources.list
Ubuntu 16.04 Xenial default /etc/apt/sources.list
#deb cdrom:[Ubuntu 16.04.2 LTS _Xenial Xerus_ - Release amd64 (20170215.2)]/ xenial main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
@emadelawady
emadelawady / dabblet.css
Created December 7, 2016 17:51
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;