Skip to content

Instantly share code, notes, and snippets.

View mouhamedfd's full-sized avatar

Diagana Mouhamed Fadel mouhamedfd

View GitHub Profile
@mouhamedfd
mouhamedfd / project-create.sh
Created October 12, 2018 16:03 — forked from francoisromain/project-create.sh
A bash script to create a Git post-receive hook to deploy after a Git push
#!/bin/bash
# Call this file with `bash ./project-create.sh project-name [service-name]`
# - project-name is mandatory
# - service-name is optional
# This will creates 4 directories and a git `post-receive` hook.
# The 4 directories are:
# - $GIT: a git repo
# - $TMP: a temporary directory for deployment
@mouhamedfd
mouhamedfd / Encryption.js
Created January 24, 2020 20:04 — forked from ve3/Encryption.js
Encrypt and decrypt between programming languages (PHP & JavaScript).
/**
* Encryption class for encrypt/decrypt that works between programming languages.
*
* @author Vee Winch.
* @link https://stackoverflow.com/questions/41222162/encrypt-in-php-openssl-and-decrypt-in-javascript-cryptojs Reference.
* @link https://github.com/brix/crypto-js/releases crypto-js.js can be download from here.
*/
class Encryption {
@mouhamedfd
mouhamedfd / gist:4f658587b4bb17d8d726c29693d8ba48
Created March 1, 2020 15:09 — forked from snipe/gist:4256150
Apache Ant build.xml file for PHPUnit+Jenkins+Ant+Symfony2
<?xml version="1.0" encoding="UTF-8"?>
<!-- Set some basic project information and targets -->
<project name="My Symfony2 Project" default="build">
<target name="build"
depends="prepare, vendors, dbupdate, fixtures, lint, phploc, phpmd, phpcpd, phpcs, phpunit"/>
<target name="build-parallel"
depends="prepare, vendors, dbupdate, fixtures, lint, tools-parallel, phpcpd, phpunit"/>
@mouhamedfd
mouhamedfd / clean-up-boot-partition-ubuntu.md
Created June 4, 2020 05:01 — forked from ipbastola/clean-up-boot-partition-ubuntu.md
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@mouhamedfd
mouhamedfd / confirm-overwrite.js
Created August 3, 2021 18:56 — forked from tomazy/confirm-overwrite.js
Overwrite `window.confirm` with a custom modal dialog (Rails + jquery-ujs + data-confirm attribute)
(function() { [9/55928]
'use strict';
function showConfirmBox(message, cb) {
var $modal = $('.js-modal-confirm');
var $btnYes = $modal.find('.js-yes')
var $btnCancel = $modal.find('.js-cancel')
$modal.find('.js-message').text(message)