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
@ManiruzzamanAkash
ManiruzzamanAkash / Vue Crud.php
Created February 3, 2019 00:41
Simple Vue CRUD For Laravel
<?php
// API's
Route::get('posts', 'PostController@index');
Route::get('posts/{id}', 'PostController@show');
Route::get('posts/search/{text}', 'PostController@search');
Route::post('posts/store/now', 'PostController@store');
Route::put('posts/{id}', 'PostController@update');
Route::delete('posts/{id}', 'PostController@destroy');
?>
@ManiruzzamanAkash
ManiruzzamanAkash / component-base-demo-vue.php
Created February 3, 2019 00:46
Component Based Vue Demo Code Simple CRUD
<!------------- Blade Layout ----------->
@extends('layouts.app')
@section('content')
<div class="container">
<test-component></test-component>
</div>
@endsection
<!-- Register Component -->
@ManiruzzamanAkash
ManiruzzamanAkash / Rect Todo.js
Last active February 3, 2019 00:50
Simple React Todo App
import React, { Component } from 'react';
import './App.css';
class App extends Component {
constructor(props){
super(props);
this.state = {
title: 'React Simple Todo App',
act: 0,
@ManiruzzamanAkash
ManiruzzamanAkash / vue-components.js
Created February 3, 2019 00:59
Some Used Vue Components in my Project
/********** Like.vue **********/
<template>
<div class="like mt-3" v-cloak>
<span class="badge badge-primary">{{ like.length }} Like</span>
<span class="badge badge-danger">{{ unlike.length }} Unlike</span>
<span class="float-right" v-if="user">
<button class="btn btn-primary" @click="likePost" v-if="canLike"><i class="fa fa-fw fa-thumbs-up" title="Like This Tutorial"></i></button>
<button class="btn btn-danger" @click="unlikePost" v-if="canUnlike"><i class="fa fa-fw fa-thumbs-down" title="Ublike This Tutorial"></i></button>
</span>
</div>
<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
@ManiruzzamanAkash
ManiruzzamanAkash / Important Complex SQL Queries.sql
Created October 15, 2019 08:27
All complex Database queries
# 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
SELECT created_at, COUNT(created_at)
FROM `transactions`
WHERE type='opening_stock'
GROUP BY created_at
HAVING COUNT(created_at) > 1
@ManiruzzamanAkash
ManiruzzamanAkash / transfer-file-one-server-to-another.php
Last active November 2, 2019 14:09
File Transfer Command / PHP Code one server to another server Live
<?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'));
@ManiruzzamanAkash
ManiruzzamanAkash / Date-Wise-Product-Sell-Quantity.sql
Created November 11, 2019 09:56
Get Date wise product sale quantity summation
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 / Bash Commands.sh
Created November 12, 2019 06:50
Complex Linux Commands
#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