Skip to content

Instantly share code, notes, and snippets.

View memdufaizan's full-sized avatar

Faizan Memdu memdufaizan

View GitHub Profile
@memdufaizan
memdufaizan / order.js
Created March 10, 2023 19:04 — forked from ShariqAnsari88/order.js
E-Commerce by JS Dev
("use strict");
const stripe = require("stripe")(process.env.STRIPE_KEY);
/**
* order controller
*/
const { createCoreController } = require("@strapi/strapi").factories;
module.exports = createCoreController("api::order.order", ({ strapi }) => ({
async create(ctx) {
@memdufaizan
memdufaizan / How to use Images as Radio buttons.md
Created September 26, 2022 11:01 — forked from rcotrina94/How to use Images as Radio buttons.md
How to use images for radio buttons (input-radio).
@memdufaizan
memdufaizan / get the source code php.txt
Created September 23, 2022 10:13 — forked from tbvinh/get the source code php.txt
Revert the PHP code of "pH-7/Obfuscator-Class"
#Edit the obfuscate file:
1. Find the line: "$___();$__________($______($__($_))); $________=$____();"
2. Delete all to end of file
3. Add some lines to see the original source code:
--------------------------------------
$source = base64_decode(gzuncompress(base64_decode($_)));
$idx = strpos($source, "eval(\$___)");
$orgSource = substr($source, $idx + 24);
echo "<br/>ORIGIN SOURCE<br/><pre> $orgSource </pre> <br/>";
---------------------------------------
@memdufaizan
memdufaizan / Google-Reviews.php
Created January 23, 2022 08:50 — forked from balwantmeticulosity/Google-Reviews.php
Get Google-Reviews with PHP cURL & without API Key
<?php
/*
💬 Get Google-Reviews with PHP cURL & without API Key
=====================================================
**This is a dirty but usefull way to grab the first 8 most relevant reviews from Google with cURL and without the use of an API Key**
How to find the needed CID No:
- use: [https://pleper.com/index.php?do=tools&sdo=cid_converter]
@memdufaizan
memdufaizan / .htaccess
Created September 2, 2019 14:39 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@memdufaizan
memdufaizan / .htaccess
Created June 30, 2019 07:16 — forked from migliori/.htaccess
.htaccess
# Apache configuration file
# httpd.apache.org/docs/2.2/mod/quickreference.html
# Note .htaccess files are an overhead, this logic should be in your Apache
# config if possible: httpd.apache.org/docs/2.2/howto/htaccess.html
# Techniques in here adapted from all over, including:
# Kroc Camen: camendesign.com/.htaccess
# perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/
# Sample .htaccess file of CMS MODx: modxcms.com
@memdufaizan
memdufaizan / fontawesome-icons-with-categories.json
Created June 30, 2019 07:15 — forked from migliori/fontawesome-icons-with-categories.json
Font Awesome Version 5.0.6 JSON List with categories for use with https://codeb.it/fonticonpicker/
{
"Accessibility": [
"fab fa-accessible-icon",
"fas fa-american-sign-language-interpreting",
"fas fa-assistive-listening-systems",
"fas fa-audio-description",
"fas fa-blind",
"fas fa-braille",
"fas fa-closed-captioning",
"far fa-closed-captioning",
@memdufaizan
memdufaizan / README.md
Created June 30, 2019 07:11 — forked from migliori/README.md
Bulk RECURSIVE Image Optimizer - PHP Ajax - from https://github.com/spatie/image-optimizer

Bulk Image Optimizer

Recursive image optimizer - optimize all the images in a parent folder and all its subdirectories without deph limitation.

Instructions

  1. Install spatie image optimizer with Composer: composer require spatie/image-optimizer
  2. Install all the optimizers on Linux server (SSH):