Skip to content

Instantly share code, notes, and snippets.

View nezamy's full-sized avatar

Mahmoud Elnezamy nezamy

View GitHub Profile
@nezamy
nezamy / gulpfile.js
Last active July 9, 2020 21:28
Gulp RTL support in the same file
const { src, dest, watch, series, task } = require('gulp');
const postcss = require('gulp-postcss');
const autoprefixer = require('autoprefixer');
const cssnano = require('cssnano');
const sass = require('gulp-sass');
const { postcssRTLCSS } = require('postcss-rtlcss');
const rename = require('gulp-rename');
const rtl_support = require('postcss-rtl-support');
const cleanCss = require('gulp-clean-css');
var processors = [
@nezamy
nezamy / gulpfile.js
Last active December 23, 2023 21:54
Post Css & Sass & RTL Gulp Config
const { src, dest, watch, series, task } = require('gulp');
const postcss = require('gulp-postcss');
const autoprefixer = require('autoprefixer');
const cssnext = require('cssnext');
const precss = require('precss');
const cssnano = require('cssnano');
const sass = require('gulp-sass');
const fontMagician = require('postcss-font-magician');
const rtlcss = require('rtlcss');
const rename = require('gulp-rename');
@nezamy
nezamy / static.php
Created June 5, 2020 23:07 — forked from ezimuel/static.php
Swoole HTTP static file server example
<?php
// Simple HTTP static file server using Swoole
$host = $argv[1] ?? '127.0.0.1';
$port = $argv[2] ?? 9501;
$http = new swoole_http_server($host, $port);
// The usage of enable_static_handler seems to produce errors
// $http->set([
@nezamy
nezamy / ipc-2017-slides.md
Created October 11, 2017 15:31
Slides from the International PHP Conference Spring 2017
@nezamy
nezamy / webserver.sh
Last active April 24, 2024 16:11
Web Server Install
#!/bin/bash
# Just Setup Script
#chmod +x filename.sh
#COLORS
Color_Off='\033[0m' # Text Reset
# Regular Colors
Red='\033[0;31m' # Red
Green='\033[0;32m' # Green
Yellow='\033[0;33m' # Yellow
Purple='\033[0;35m' # Purple
@nezamy
nezamy / Javascript
Last active July 15, 2017 20:32
Javascript shortcuts
var $byID = document.getElementById.bind(document);
var $byAll = document.querySelectorAll.bind(document);
var $byTag = document.getElementsByTagName.bind(document);
var $ = (elm, event, call) => {
var $selecetd;
var type = elm.substr(0, 1);
if(type == '#'){
$selecetd = $byID(elm.substr(1));
if(event){
$selecetd.addEventListener(event, (e) => {