Skip to content

Instantly share code, notes, and snippets.

View mo7amed-3bdalla7's full-sized avatar
🕵️‍♂️
killing bugs

Mohamed Abdallah mo7amed-3bdalla7

🕵️‍♂️
killing bugs
View GitHub Profile
@mo7amed-3bdalla7
mo7amed-3bdalla7 / odoo_calculate_workers.sh
Last active March 29, 2022 14:14
Analyzes the characteristics of the server and helps calculate the number of workers and memory for each
#!/bin/bash
# rights @ https://gist.github.com/sauljabin/21be4f221e6080e76b3e
# CONST 1GB
CONST_1GB="1024*1024*1024"
# VARIABLE WORKERS
@mo7amed-3bdalla7
mo7amed-3bdalla7 / dib.sh
Created March 4, 2019 22:14
display raw html data in browser
#!/bin/bash
x-www-browser $(xargs -0 $xargs | base64 -w0 - | cat <(echo -n "data:text/html;charset=UTF-8;base64,") -)
@mo7amed-3bdalla7
mo7amed-3bdalla7 / filter.sql
Created February 21, 2019 14:23
divide sql table
create
definer = m7md@`%` procedure FilteredData()
BEGIN
DECLARE bDone INT;
DECLARE f_id int;
DECLARE f_name_ar varchar(255);
DECLARE f_name_en varchar(255);
DECLARE f_main_category_id int;
DECLARE f_sub_category_id int;
@mo7amed-3bdalla7
mo7amed-3bdalla7 / init.vim
Created January 19, 2019 22:33
init.vim file
" Specify a directory for plugins
" - For Neovim: ~/.local/share/nvim/plugged
" - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.local/share/nvim/plugged')
" Make sure you use single quotes
" Shorthand notation; fetches https://github.com/junegunn/vim-easy-align
Plug 'junegunn/vim-easy-align'
@mo7amed-3bdalla7
mo7amed-3bdalla7 / TagController.php
Created September 18, 2017 16:05 — forked from FilipQL/TagController.php
Select2 and Laravel: Ajax Autocomplete
<?php
/* For more details see: http://laraget.com/blog/select2-and-laravel-ajax-autocomplete */
namespace App\Http\Controllers\Select2Ajax;
use App\Tag;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\Http\Controllers\Controller;
class TagController extends Controller
@mo7amed-3bdalla7
mo7amed-3bdalla7 / .bash_aliases
Last active July 4, 2020 14:03
my .bash_aliases
#alias mysql="/opt/lampp/bin/mysql"
#alias php="/opt/lampp/bin/php"
#alias composer="php ~/composer.phar"
#alias xampp="sudo /opt/lampp/xampp"
#alias cd_htdocs="cd /opt/lampp/htdocs"
alias phpserver="php -S localhost:8888 -t ."
alias art="php artisan "
alias arts="php artisan serve"
alias artm="php artisan migrate"
@mo7amed-3bdalla7
mo7amed-3bdalla7 / install_ffmpeg_centos.sh
Created September 5, 2017 10:34 — forked from icaliman/install_ffmpeg_centos.sh
Install latest ffmpeg on Centos with libmp3lame enabled
#!/bin/bash
# Bash script to install latest version of ffmpeg and its dependencies on Centos
# Inspired from https://trac.ffmpeg.org/wiki/CompilationGuide/Centos
# Get the dependencies:
sudo yum install autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig zlib-devel
mkdir ~/ffmpeg_sources
<?php
/**
* Description of VideoStream
*
* @author Rana
* @link http://codesamplez.com/programming/php-html5-video-streaming-tutorial
*/
class VideoStream
{
private $path = "";
<?php
namespace App\Http;
/**
* Description of VideoStream
*
* @author Rana
* @link https://gist.github.com/vluzrmos/d5682ad426525196d069
*/
udo apt-get update
sudo apt-get install libmagickwand-dev
wget http://pecl.php.net/get/imagick-3.0.1.tgz343
tar -zxvf imagick-3.0.1.tgz
cd imagick-3.0.1