Skip to content

Instantly share code, notes, and snippets.

View mdsami's full-sized avatar
🏠
Work from Mars

MD SAMI mdsami

🏠
Work from Mars
View GitHub Profile
@mdsami
mdsami / joining.sql
Created April 23, 2022 10:57
SQL join
public function ajax_search(Request $request)
{
saveSearchData($request);
$keywords = array();
$search_products =
Product::join('brands', 'products.brand_id', '=', 'brands.id')
->join('product_categories', 'product_categories.product_id', '=', 'products.id')
->join('product_stocks', 'product_stocks.product_id', '=', 'products.id')
->where('products.published', 1)
->where('products.approve_status', 1)

Keybase proof

I hereby claim:

  • I am mdsami on github.
  • I am mdsami (https://keybase.io/mdsami) on keybase.
  • I have a public key ASBeuVK72cGJ0DYbAx1KskpdehlbSY5M548MbB2Pkb0izQo

To claim this, I am signing this object:

@mdsami
mdsami / today.json
Created April 26, 2020 16:16
json response of few apps
[
{
"today": "1st Ramadan,1441",
"namaz": "Fazar",
"time": "4.20 am",
"next": "ZOHAR - 2:11 pm"
},

Keybase proof

I hereby claim:

  • I am mdsami on github.
  • I am mdsami (https://keybase.io/mdsami) on keybase.
  • I have a public key ASAbx8IJDY0QJ71mV4CwRKrYvybl-Pwl3pBvGMPrZsKc5Qo

To claim this, I am signing this object:

@mdsami
mdsami / fbmessgr.java
Created March 8, 2020 17:44
Abdroid Fb messger chat
public static void invokeMessenger(Activity activity) {
try {
if (AppUtils.isPackageInstalled(activity.getApplicationContext(), "com.facebook.orca")) {
/**
* get id of your facebook page from here:
* https://findmyfbid.com/
*
* Suppose your facebook page url is: http://www.facebook.com/hiponcho
@mdsami
mdsami / .htaccess
Created March 3, 2020 13:52
htaccess for laravel
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/public
RewriteRule ^(.*)$ /public/$1 [L]
RewriteCond %{REQUEST_URI} !^/public
RewriteRule ^(.*)$ /public/$1 [L]
</IfModule>
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php70” package as the default “PHP” programming language.
<?php
return [
/**
* Debug Level:
*
* Production Mode:
* false: No error messages, errors, or warnings shown.
*
* Development Mode:
* true: Errors and warnings shown.
<?php
$servername = "localhost";
$username = "root";
$password = "root";
$dbname = "demodb";
//create connection
$conn = new mysqli($servername, $username, $password, $dbname);
<?php
include_once 'connect.php';
//http://betaussoft.com/appapi/getorder.php?lat=22.5070748&&lon=91.0596610&&dis=1
$lat=$_REQUEST['lat'];
$lon=$_REQUEST['lon'];
$dis=$_REQUEST['dis'];
$response['receive_data']=array();
<?php
//http://betaussoft.com/appapi/mobilesurvey.php?name=a&&problem=p&&location=l&&lat=12.04&&lon=15.25&&image=a.jpg
include_once 'connect.php';