Skip to content

Instantly share code, notes, and snippets.

View MustafaMagdi's full-sized avatar
🎯
Focusing

Mustafa Magdi MustafaMagdi

🎯
Focusing
View GitHub Profile
@MustafaMagdi
MustafaMagdi / web-service-soap-client-server-php.md
Created May 29, 2018 20:10 — forked from umidjons/web-service-soap-client-server-php.md
Simple Web service - SOAP Server/Client in PHP

Simple Web service - SOAP Server/Client in PHP

Implementation of the SOAP server - server.php:

<?php
// turn off WSDL caching
ini_set("soap.wsdl_cache_enabled","0");

// model, which uses in web service functions as parameter
@MustafaMagdi
MustafaMagdi / Instructions.sh
Created April 29, 2018 13:29 — forked from GhazanfarMir/Instructions.sh
Install PHP7.2 NGINX and PHP7.2-FPM on Ubuntu 16.04
########## Install NGINX ##############
# Install software-properties-common package to give us add-apt-repository package
sudo apt-get install -y software-properties-common
# Install latest nginx version from community maintained ppa
sudo add-apt-repository ppa:nginx/stable
# Update packages after adding ppa
@MustafaMagdi
MustafaMagdi / Container.php
Last active April 17, 2024 19:14 — forked from tlikai/container.php
PHP Dependency Injection Container
<?php
/**
* Class Container
*/
class Container
{
/**
* @var array
*/
@MustafaMagdi
MustafaMagdi / sphinxsearch_src.sh
Created August 25, 2016 19:32 — forked from coder4web/sphinxsearch_src.sh
Sphinx (sphinxsearch) install from source
# @see http://sphinxsearch.com/downloads/release/
# redhats: yum remove sphinx
# debians: apt-get remove sphinxsearch
cd /usr/local/src
wget -c http://sphinxsearch.com/files/sphinx-2.2.10-release.tar.gz
tar xzvf sphinx-2.2.10-release.tar.gz
cd sphinx-2.2.10-release
./configure
make install
@MustafaMagdi
MustafaMagdi / install.rabbitmq.sh
Created August 25, 2016 19:32
Install RabbitMQ on Debian/Ubuntu based systems
#!/bin/sh
# Variables
USER="admin"
PASS="password"
# Assert Root User
SCRIPTUSER=`whoami`
if [ "$SCRIPTUSER" != "root" ]
then
#!/bin/bash
# from here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/
# and here: https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server
###############################################
# To use:
# <<!!!!!!!!!!!!!!!!!!! FIX ME !!!!!!!!!!!!!!!!!!!!!!!!> wget https://raw.github.com/gist/2776679/04ca3bbb9f085b192f6aca945120fe12d59f15f9/install-redis.sh
# chmod 777 install-redis.sh
# ./install-redis.sh
###############################################
echo "*****************************************"
@MustafaMagdi
MustafaMagdi / php-cs-fixer-pre-commit.php
Created May 30, 2016 06:50 — forked from mardix/php-cs-fixer-pre-commit.php
A pre-commit hook to make PHP code PSR-2 compliant, check for syntax error
#!/usr/bin/php
<?php
/**
* .git/hooks/pre-commit
*
* This pre-commit hooks will check for PHP error (lint), and make sure the code
* is PSR compliant.
*
* Dependecy: PHP-CS-Fixer (https://github.com/fabpot/PHP-CS-Fixer)
*