Skip to content

Instantly share code, notes, and snippets.

View ManiruzzamanAkash's full-sized avatar
👨‍💻
Building the Better World By Writing Stuffs...

Maniruzzaman Akash ManiruzzamanAkash

👨‍💻
Building the Better World By Writing Stuffs...
View GitHub Profile
-- Create Primary Key
CREATE TABLE primary_test(
ID int PRIMARY KEY
);
-- Create Primary Key Multiple
CREATE TABLE primary_test(
ID INT NOT NULL,
EMAIL VARCHAR(50) NOT NULL,
@ManiruzzamanAkash
ManiruzzamanAkash / WordPress-Plugin-Release-Github-WordPress.MD
Last active May 12, 2022 04:07
WordPress Plugin Release using Github and WordPress

WordPress Plugin Release using Github and WordPress

Step 1: Cloning & Checking out

  • Clone the repository, checkout to develop
  • git pull for any latest changes

Step 2: Git flow

  • Make sure to have git flow installed
  • Run git flow init
  • Run git flow release start [ version should be incremented by 1 from the last release ]
@ManiruzzamanAkash
ManiruzzamanAkash / tailwind-card-component.html
Created April 3, 2022 04:45
Product Card Component Design using Tailwind CSS
<div class="p-5 bg-gray-100 text-center">
<!-- Card Design -->
<div class="bg-white w-64 m-5 py-5 transition shadow hover:shadow-lg border">
<img src="https://api-ecom.allgeneration.com/public/images/products/product-short-resolution-163-1632306571.png" class="w-full transition scale-[95%] hover:scale-100 delay-300" />
<h2 class="pt-4">
Samsung Gallaxy J10
</h2>
<p>
<span class="text-yellow-500">100TK</span>
@ManiruzzamanAkash
ManiruzzamanAkash / Git commands Lines of Code and Commit.git
Last active March 31, 2022 09:05
Git commands Lines of Code and Commit For a Year Range
// Get Commit for a Year ==> 2021 Jan 01 to 2021 Dec 31
git rev-list --all --count --since="01 Jan 2021" --before="31 Dec 2021"
// Get Lines of Code for a Year ==> 2021 Jan 01 to 2021 Dec 31
git log --since=2021-01-01 --until=2021-12-31 --format= --numstat | awk '{s+=$1; s+=$2} END {print s}'
// Get Lines of Code for a repository File by File
git ls-files | xargs file | grep "ASCII" | cut -d : -f 1 | xargs wc -l
@ManiruzzamanAkash
ManiruzzamanAkash / welcome.blade.php
Created March 19, 2022 09:56
SMS Portal With Twilio and Laravel
<!doctype html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>SMS Portal With Twilio</title>
<!-- Styles -->
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
@ManiruzzamanAkash
ManiruzzamanAkash / web.php
Created March 19, 2022 09:54
Laravel + Twilio SMS integration routes file
<?php
use App\Http\Controllers\HomeController;
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
@ManiruzzamanAkash
ManiruzzamanAkash / HomeController.php
Created March 19, 2022 09:52
Laravel + Twilio SMS
<?php
namespace App\Http\Controllers;
use App\Models\UserPhone;
use Illuminate\Http\Request;
use Twilio\Rest\Client;
class HomeController extends Controller
{
@ManiruzzamanAkash
ManiruzzamanAkash / update-after-join-two-table.sql
Created January 22, 2022 03:05
Update Concating MySQL two table after JOIN
UPDATE words
JOIN categories ON categories.id = words.chapter_id
SET words.image=CONCAT(categories.slug, "/", words.en, ".jpg")
@ManiruzzamanAkash
ManiruzzamanAkash / .storybook-preview.js
Last active January 21, 2022 18:19
Storybook preview js file to support tailwind version > 3.0
import '!style-loader!css-loader!postcss-loader!tailwindcss/tailwind.css';
import '!style-loader!css-loader!sass-loader!../src/scss/style.scss';
export const parameters = {
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
@ManiruzzamanAkash
ManiruzzamanAkash / duplicate-product-checker-by-sku.sql
Created December 13, 2021 02:58
Duplicate Product Check By SKU in MySQL
SELECT DISTINCT sku, COUNT(sku) as occur
FROM `items`
GROUP BY sku
HAVING occur > 1