Skip to content

Instantly share code, notes, and snippets.

Avatar
👨‍💻
Building the Better World By Writing Stuffs...

Maniruzzaman Akash ManiruzzamanAkash

👨‍💻
Building the Better World By Writing Stuffs...
View GitHub Profile
View SimpleModal.jsx
import React from "react";
import { Modal } from "react-bootstrap";
const SimpleModal = (props) => {
const { show, handleClose, size, modalTitle } = props;
return (
<Modal onClose={handleClose} size={size} show={show} onHide={handleClose}>
<Modal.Header closeButton>
<Modal.Title>{modalTitle}</Modal.Title>
<p className="btn-modal-close" onClick={() => handleClose()}>
View index.js
import React from "react";
import ReactDOM from "react-dom";
import App from "./App";
import reportWebVitals from "./reportWebVitals";
import "bootstrap/dist/css/bootstrap.min.css";
import "./index.css";
ReactDOM.render(
<React.StrictMode>
<App />
View React Components Example For Ecommerce Project.jsx
import "./App.css";
import Footer from "./components/Footer";
import Header from "./components/Header";
import Navbar from "./components/Navbar";
import Product from "./components/Product";
import Sidebar from "./components/Sidebar";
function App() {
return (
<div className="App">
View Bash Commands.sh
#For CPU and Memory utilizations:
htop
#View Server logs:
tail -f /var/log/mysql/error.log
tail -f /var/log/mysql/mysql.log
tail -f /var/log/mysql/mariadb-slow.log
# Open PHP.ini in Edit Mode
vi /etc/php/7.2/apache2/php.ini
@ManiruzzamanAkash
ManiruzzamanAkash / Date-Wise-Product-Sell-Quantity.sql
Created Nov 11, 2019
Get Date wise product sale quantity summation
View Date-Wise-Product-Sell-Quantity.sql
SELECT pro.id, pro.name,pro.sku, sum(tsl.quantity) as totalSoldQty, LEFT(tsl.created_at, 10) as date
FROM products as pro
LEFT JOIN transaction_sell_lines tsl on tsl.product_id=pro.id
where sku=26017 and tsl.created_at between '2019-07-01' and '2019-08-30'
and pro.business_id=7
GROUP BY LEFT(tsl.created_at, 10)
@ManiruzzamanAkash
ManiruzzamanAkash / transfer-file-one-server-to-another.php
Last active Nov 2, 2019
File Transfer Command / PHP Code one server to another server Live
View transfer-file-one-server-to-another.php
<?php
// In Server 2 make a file download.php and then paste the code,
// here file_url means the server 1's zip file URL
// run/browse download.php like,
// http://domain_server2.com/download.php
file_put_contents("download.zip", fopen("file_url", 'r'));
View Opening Stock Entry which has entered more than once in a second.sql
SELECT created_at, COUNT(created_at)
FROM `transactions`
WHERE type='opening_stock'
GROUP BY created_at
HAVING COUNT(created_at) > 1
View Important Complex SQL Queries.sql
# Sales values of top 7 days
SELECT COUNT(id), created_at from transaction_sell_lines
WHERE product_id = 12601
GROUP BY LEFT(created_at, 10)
ORDER BY count(id) DESC
LIMIT 7
@ManiruzzamanAkash
ManiruzzamanAkash / extract-url-from-html-page.php
Created Aug 25, 2019
Extract URL's from a web page or external link using PHP
View extract-url-from-html-page.php
<?php
class GenerateURLHelper
{
/**
* getValidUrlsFrompage() function
*
* @param string $url
* @return array
View index.html
<html>
<head>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<script src="https://d3js.org/d3.v5.min.js"></script>
</head>
<body>
<div class="container">
<h4 class="text-center">
Testing D3