Skip to content

Instantly share code, notes, and snippets.

View khalidahmada's full-sized avatar

Ahmada Khalid khalidahmada

  • Digitz
  • Agadir ,Morroco
View GitHub Profile
@ManuKpL
ManuKpL / initProject.md
Last active October 20, 2022 00:59
Quick init node project from terminal (JS or TS)

Quickly init empty node project

General information

Nota Bene

  • npm v7 is required to use npm-set-script command (see npm doc)

Dependencies

@khalidahmada
khalidahmada / wp-mailhog-config-smtp.php
Created August 10, 2018 11:14
Config Wordpress SMTP for MailHog - test your emails local
/*
* Add the MailHog to your wordpress projects
* By Khalid Ahmada
* MailHog @see https://github.com/mailhog/MailHog
*/
class WP_MAILHOG
{
function __construct()
@khalidahmada
khalidahmada / wcf7-prevent-submits.js
Last active August 9, 2018 08:11
Contact Form 7 - Javascript snippet to prevent the multiples submits forms
(function($){
var wpcf7Elm = document.querySelector( '.wpcf7' );
function handlerEventProcess(event){
var hiddensubmit = $(wpcf7Elm).find('form').find('.js-hide-bloc');
if(hiddensubmit.length){
hiddensubmit.removeClass('js-hide-bloc');
@BilalBudhani
BilalBudhani / FileUpload.js
Last active September 17, 2023 07:21
Upload Multiple Files To Cloudinary With React & Axios
handleDrop = files => {
// Push all the axios request promise into a single array
const uploaders = files.map(file => {
// Initial FormData
const formData = new FormData();
formData.append("file", file);
formData.append("tags", `codeinfuse, medium, gist`);
formData.append("upload_preset", "pvhilzh7"); // Replace the preset name with your own
formData.append("api_key", "1234567"); // Replace API key with your own Cloudinary key
formData.append("timestamp", (Date.now() / 1000) | 0);
@gokulkrishh
gokulkrishh / media-query.css
Last active June 18, 2024 18:06
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
/* CSS */