Skip to content

Instantly share code, notes, and snippets.

View Behram-Khattak's full-sized avatar
🙂

Behram Khattak Behram-Khattak

🙂
View GitHub Profile
@msrose
msrose / combining-git-repositories.md
Last active July 8, 2024 16:41
How to combine two git repositories.

Combining two git repositories

Use case: You have repository A with remote location rA, and repository B (which may or may not have remote location rB). You want to do one of two things:

  • preserve all commits of both repositories, but replace everything from A with the contents of B, and use rA as your remote location
  • actually combine the two repositories, as if they are two branches that you want to merge, using rA as the remote location

NB: Check out git subtree/git submodule and this Stack Overflow question before going through the steps below. This gist is just a record of how I solved this problem on my own one day.

Before starting, make sure your local and remote repositories are up-to-date with all changes you need. The following steps use the general idea of changing the remote origin and renaming the local master branch of one of the repos in order to combine the two master branches.

@MrAbalogu
MrAbalogu / PHPMailer and mailgun
Created June 11, 2016 11:53
Send mail from contact form with PHPmailer & Mailgun very easy
// FIRST CREATE A FREE MAILGUN ACCOUNT HERE https://www.mailgun.com/
// html contact form example
<form action="mail.php" method="post">
<h5>name</h5>
<input type="text" name="name">
<h5>email address</h5>
<input type="text" name="email">
<h5>message</h5>
<textarea name="message"></textarea>
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active July 22, 2024 08:35
crack activate Office on mac with license file
@malikbilal1997
malikbilal1997 / Pakistan Cities List.html
Last active July 18, 2024 18:44
List of All Pakistan Cities Html Code.
<select name="Location" id="Location" required>
<option value="" disabled selected>Select The City</option>
<option value="Islamabad">Islamabad</option>
<option value="" disabled>Punjab Cities</option>
<option value="Ahmed Nager Chatha">Ahmed Nager Chatha</option>
<option value="Ahmadpur East">Ahmadpur East</option>
<option value="Ali Khan Abad">Ali Khan Abad</option>
<option value="Alipur">Alipur</option>
<option value="Arifwala">Arifwala</option>
<option value="Attock">Attock</option>
@SatishKumarsbs
SatishKumarsbs / index.html
Created April 8, 2020 21:19
Responsive Team Slider using HTML5 Owl Carousel
<div class="demo">
<div class="container">
<div class="row">
<div id="testimonial-slider" class="owl-carousel">
<div class="testimonial">
<span class="icon fa fa-quote-left"></span>
<p class="description">
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s.
</p>
<div class="testimonial-content">
@ahmedali5530
ahmedali5530 / pakistan_cities.php
Last active October 20, 2023 17:25
PHP array of Pakistan cities
<?php
$array = array ( 0 => 'Islamabad', 1 => 'Ahmed Nager', 2 => 'Ahmadpur East', 3 => 'Ali Khan', 4 => 'Alipur', 5 => 'Arifwala', 6 => 'Attock', 7 => 'Bhera', 8 => 'Bhalwal', 9 => 'Bahawalnagar', 10 => 'Bahawalpur', 11 => 'Bhakkar', 12 => 'Burewala', 13 => 'Chillianwala', 14 => 'Chakwal', 15 => 'Chichawatni', 16 => 'Chiniot', 17 => 'Chishtian', 18 => 'Daska', 19 => 'Darya Khan', 20 => 'Dera Ghazi', 21 => 'Dhaular', 22 => 'Dina', 23 => 'Dinga', 24 => 'Dipalpur', 25 => 'Faisalabad', 26 => 'Fateh Jhang', 27 => 'Ghakhar Mandi', 28 => 'Gojra', 29 => 'Gujranwala', 30 => 'Gujrat', 31 => 'Gujar Khan', 32 => 'Hafizabad', 33 => 'Haroonabad', 34 => 'Hasilpur', 35 => 'Haveli', 36 => 'Lakha', 37 => 'Jalalpur', 38 => 'Jattan', 39 => 'Jampur', 40 => 'Jaranwala', 41 => 'Jhang', 42 => 'Jhelum', 43 => 'Kalabagh', 44 => 'Karor Lal', 45 => 'Kasur', 46 => 'Kamalia', 47 => 'Kamoke', 48 => 'Khanewal', 49 => 'Khanpur', 50 => 'Kharian', 51 => 'Khushab', 52 => 'Kot Adu', 53 => 'Jauharabad', 54 => 'Lahore', 55 => 'Lalamusa', 56 => 'L
import axios from "axios";
const customRequest = axios.create({
baseURL: 'https://example.com/api/',
headers: {'Request-Origin': 'website'}
});
customRequest.interceptors.request.use((config) => {
const accessToken = localStorage.getItem("token");
@Behram-Khattak
Behram-Khattak / Stripe-Alpha2CountryCodes.php
Last active August 2, 2022 11:26
Stripe Alpha 2 Country Codes Array
// These country codes are allowed by stripe to make payments.
// While creating payments with Stripe Charge or PaymentIntent.
// Country code is necessary to add while doing payment with Stripe.
$CountryCodes = [
"AT",
"AU",
"BE",
"CA",
"CH",
@Behram-Khattak
Behram-Khattak / IsoCurrencyCodes.php
Last active August 2, 2022 11:30
List of ISO Currency Codes Php Array
// These currency codes are allowed by stripe to make payments.
// While creating payments with Stripe Charge or PaymentIntent.
// Currency codes are necessary to add while doing payment with Stripe.
$IsoCurrencyCodes = [
"aed",
"afn",
"all",
"amd",
"ang",
@Behram-Khattak
Behram-Khattak / MerchantCategoryCodes.php
Created July 31, 2022 06:27
Stirpe MCC "Merchant Category Codes" Php Associative Array.
// The MCC Merchant Category Codes defines the business your working with.
// These are necessary while creating Stripe Customer.
// Actually MCC become necessary when we use Stripe Connect to make Payments and Transfers.
$mcc = [
'Ac Refrigeration Repair' => '7623',
'Accounting Bookkeeping Services' => '8931',
'Advertising Services' => '7311',
'Agricultural Cooperative' => '0763',
'Airlines Air Carriers' => '4511',