Skip to content

Instantly share code, notes, and snippets.

View AminulBD's full-sized avatar

Aminul Islam AminulBD

View GitHub Profile
@AminulBD
AminulBD / sublime-context-menu-add.reg
Last active February 3, 2024 02:29
Open With Sublime 4 Text in Context Menu (Windows 10)
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\Sublime Text]
@="Open with Sublime Text"
"Icon"=hex(2):43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,\
00,46,00,69,00,6c,00,65,00,73,00,5c,00,53,00,75,00,62,00,6c,00,69,00,6d,00,\
65,00,20,00,54,00,65,00,78,00,74,00,5c,00,73,00,75,00,62,00,6c,00,69,00,6d,\
00,65,00,5f,00,74,00,65,00,78,00,74,00,2e,00,65,00,78,00,65,00,2c,00,30,00,\
00,00
@AminulBD
AminulBD / amazon-domains.json
Created November 18, 2021 06:56
Amazon operating domains by country.
{
"us": "https://www.amazon.com",
"uk": "https://www.amazon.co.uk",
"ca": "https://www.amazon.ca",
"de": "https://www.amazon.de",
"es": "https://www.amazon.es"
"fr": "https://www.amazon.fr",
"it": "https://www.amazon.it",
"jp": "https://www.amazon.co.jp",
"in": "https://www.amazon.in",
@AminulBD
AminulBD / README.MD
Last active September 13, 2023 11:17
BD Domain ability checker with php.

(DOT) .BD DOMAIN ABILITY CHECKER

You can use this as WHMCS or other domain checker to check ability of .bd domains. This is a concept for how to create your own whois server.

WARNING: WHEN YOU USE THIS SCRIPT, YOU KNOW WHAT YOU ARE DOING. I'M NOT RESPONSIVE FOR ANY PROBLEM

First login to your server (Any distro) and install the following dependencies.

For ubuntu user:

apt-get install xinetd dnsutils php-cli

@AminulBD
AminulBD / form.html
Last active May 4, 2023 17:48
Mailchimp Ajax Subscribe For WordPress
<form class="newsletter-form top-margin-80 aw-mc-ajax-form" action="<?php echo admin_url( 'admin-ajax.php'); ?>" method="post">
<input name="action" type="hidden" value="aw_chimp_subscribe">
<div class="field-inside">
<i class="fa fa-envelope-o"></i>
<input type="text" name="email" class="email-field" placeholder="Type your email address...">
<button type="submit">
<span cLass="subscribe-text">
<?php _e( 'Subscribe', 'appsworld' ); ?>
</span>
<span cLass="ajax-loader">
@AminulBD
AminulBD / bd-geo-code.sql
Last active April 2, 2023 22:19
BD GEO Code SQL Database
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
SET NAMES utf8mb4;
DROP TABLE IF EXISTS `districts`;
CREATE TABLE `districts` (
`id` int(11) NOT NULL AUTO_INCREMENT,
@AminulBD
AminulBD / NawabSMS.php
Last active October 20, 2022 05:38
Nawab SMS PHP Class
<?php
class NawabSMS
{
const ERRORS = [
'1' => 'Request has been failed.',
'101' => 'Internal server error.',
'108' => 'Wrong password or Not provided.',
'109' => 'User is not found or deleted.',
'114' => 'Content is not provided.',
@AminulBD
AminulBD / SinglePageValetDriver.php
Created November 30, 2021 09:12
Custom valet driver for SPA or static sites.
<?php
class SinglePageValetDriver extends ValetDriver
{
/**
* Determine if the driver serves the request.
*
* @param string $sitePath
* @param string $siteName
* @param string $uri
@AminulBD
AminulBD / swiperinit.html
Last active September 4, 2021 08:53
Swiper Initialization with data attribute and Animate.css integrate
<div id="content-carousel" class="content-carousel-widget" data-carousel="swiper">
<!--
You can use: data-items="5" for total items display in single page
data-autoplay="true" or "false" for autoplay.
data-loop="true" or "false" for looping the carousel
data-effect="fade" or "cube" for slide changing effects
data-direction="horizontal" or "vertical" for sliding direction
data-initlal="3" for for first active slide
data-center="true" or "false" for centerize slider
-->
@AminulBD
AminulBD / number-abbr.php
Last active August 2, 2021 13:22
Make number abbreviation like Trillion (T), Billion (B), Million (M), Thousand (K) etc.
<?php
/**
* Make long number as abbreviation
*
* @param float $number
*
* @return string
*/
function makeNumberAbbr(float $number): string
@AminulBD
AminulBD / readme.md
Last active December 31, 2020 18:28
Create USB Bootable MacOS Installation Disk: https://apple.stackexchange.com/a/388508

I was stuck in this very same situation for a while now and have found a way to create an install media (installing while we speak) on MacOS Catalina. A bit of Terminal magic is required, but nothing too fancy.

I will create a temporary folder on the Desktop so it is easier to inspect the structure with finder.

Steps to take to get the command running as suggested in https://support.apple.com/en-sg/HT201372

  • Download and mount the image for El Capitan (e.g. double click onto the .dmg file)
  • Open the Terminal app
  • (optional) Change to the Desktop cd ~/Desktop
  • (optional) Create a temporary folder mkdir installCapitan && cd installCapitan