Skip to content

Instantly share code, notes, and snippets.

View muddy-28's full-sized avatar
🎯
Focusing

Adnan Shafique muddy-28

🎯
Focusing
View GitHub Profile
Name: Flash
Serial: eNrzzU/OLi0odswsqnHLSSzOqDGoca7JKCkpsNLXLy8v1ytJTczVLUotKNFLzs8FAJHYETc=
if anyone wants to thank ETH: 0x527c2aB55b744D6167dc981576318af96ed26676
Thank you!
@muddy-28
muddy-28 / fcm_push.php
Created October 15, 2019 17:32
Send Push Notification to Users Using Firebase Messaging Service in PHP. I will show you how to send unlimited free push notifications to your clients using Firebase Cloud Messaging (FCM) in your PHP web application. Push Notifications are clickable messages that come from a website. They are used to show notifications outside the web page conte…
<?php
// Server key from Firebase Console
define( 'API_ACCESS_KEY', 'AAAA----FE6F' );
$data = array("to" => "cNf2---6Vs9",
"notification" => array( "title" => "Eagale Soluions", "body" => "A Code Sharing Company!","icon" => "icon.png", "click_action" => "http://eagalesoft.com"));
$data_string = json_encode($data);
echo "The Json Data : ".$data_string;
$headers = array
(
'Authorization: key=' . API_ACCESS_KEY,
@muddy-28
muddy-28 / index.php
Last active October 15, 2019 18:42
How to transfer large files from one server to another in seconds
<html>
<head>
<title>How to transfer large files from one server to another in seconds - EagaleSolutions</title>
</head>
<body>
<form method="post">
<input name="url"size="50" placeholder="http://abc.pk/Muqas.zip" />
<input name="submit" type="submit" />
</form>
<?php
@muddy-28
muddy-28 / woocommerce_by_tags.php
Created December 21, 2017 10:51 — forked from bbirdme/woocommerce_by_tags.php
List WooCommerce products by tags
<?php
/**
* Plugin Name: WooCommerce - List Products by Tags
* Plugin URI: http://www.remicorson.com/list-woocommerce-products-by-tags/
* Description: List WooCommerce products by tags using a shortcode, ex: [woo_products_by_tags tags="shoes,socks"]
* Version: 1.0
* Author: Remi Corson
* Author URI: http://remicorson.com
* Requires at least: 3.5
* Tested up to: 3.5
<?php
/** Please excuse this code I wrote in 2011, I'll be updating this post for 2015/6 standards soon */
// clean up the input
if(empty($_GET['text'])) fatal_error('Error: No text specified.') ;
$text = html_entity_decode($_GET['text']).' ' ;
$text = floatval($text);
$text = number_format($text, 1, '.', '') . '%';
@muddy-28
muddy-28 / gist:0f251c4173ae866d12d494b1faaaef1e
Created May 2, 2017 06:18 — forked from rolandinsh/gist:5143047
Codeigniter file upload permissions (CHMOD)
<?php
$config['upload_path'] = './uploads/'; // upload path
/* OR any oyher form, e.g.:
$config['upload_path'] = $_SERVER["DOCUMENT_ROOT"].'/uploads/'; // upload path
*/
$config['allowed_types'] = 'zip'; // array or string of file extensions
$config['max_size'] = '100'; // max file size
$this->load->library('upload', $config); // do the job
$zdata = array('upload_data' => $this->upload->data()); // get data
$zfile = $zdata['upload_data']['full_path']; // get file path
@muddy-28
muddy-28 / .htaccess
Created April 26, 2017 11:36 — 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/
<?php
/**
* Plugin Name: WooCommerce Display Products by Tags
* Plugin URI: https://wordpress.org/plugins/woocommerce-display-products-by-tags/
* Description: Display WooCommerce products by tags using a shortcode.
* Version: 1.0.0
* Author: Eagale Solutions
* Author URI: http://www.eagalesoft.com
* Developer: Adnan Shafique
* Developer URI: http://www.eagalesoft.com
@muddy-28
muddy-28 / ampps-mysql-fix.md
Created November 14, 2016 18:49 — forked from irazasyed/ampps-mysql-fix.md
AMPPS MySQL not working, Solution!
  1. Open Ampps Application -> MySQL Tab -> Configuration.

  2. In [mysqld] section, add the following line: innodb_force_recovery = 1

  3. Save the file and try starting MySQL

  4. Remove that line which you just added and Save.

@muddy-28
muddy-28 / Convert-csv-to-associated-Array.php
Last active July 16, 2016 18:17
Convert a comma separated file into an associated Array | Eagale Solutions
<?php
/**
* Convert a comma separated file into an associated array.
* The first row should contain the array keys.
*
* Function Parameters:
*
* @param string $filename Path to the CSV file
* @param string $delimiter The separator used in the file
* @return array