Skip to content

Instantly share code, notes, and snippets.

Avatar

A. S. Md. Ferdousul Haque ferdousulhaque

View GitHub Profile
View otp-success-fail-page.blade.php
@extends('product.layout.template')
@section('body')
<div class="col-md-8 order-md-1">
<h4 class="mb-3">OTP Validation</h4>
@if($validate['code'] == 200)
{{$resp[$validate['code']]}}
@elseif($validate['code'] == 203 || $validate['code'] == 404)
{{$resp[$validate['code']]}}
@if(isset($validate['resendId']))
View app.js
//require('./bootstrap');
let timerOn = true;
function timer(remaining) {
var m = Math.floor(remaining / 60);
var s = remaining % 60;
m = m < 10 ? '0' + m : m;
s = s < 10 ? '0' + s : s;
View otp-page.blade.php
@extends('product.layout.template')
@section('body')
<div class="col-md-8 order-md-1">
<h4 class="mb-3">OTP Validation</h4>
<form class="card p-2" action="{{route('validateOtp')}}" method="post">
<div class="input-group">
<input type="text" class="form-control" name="otp" id="otp" placeholder="" value="" required>
<div class="input-group-append">
View checkout-page.blade.php
@extends('product.layout.template')
@section('body')
<div class="col-md-4 order-md-2 mb-4">
<h4 class="d-flex justify-content-between align-items-center mb-3">
<span class="text-muted">Your cart</span>
<span class="badge badge-secondary badge-pill">2</span>
</h4>
<ul class="list-group mb-3">
<li class="list-group-item d-flex justify-content-between lh-condensed">
View template.blade.php
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors">
<meta name="generator" content="Jekyll v3.8.5">
<title>Production Purchase Confirmation Page</title>
@ferdousulhaque
ferdousulhaque / OtpController.php
Last active Aug 25, 2020
OTP Service Controller
View OtpController.php
<?php
namespace App\Http\Controllers;
use Ferdous\OtpValidator\Object\OtpRequestObject;
use Ferdous\OtpValidator\Object\OtpValidateRequestObject;
use Ferdous\OtpValidator\OtpValidator;
use Illuminate\Http\Request;
class OtpController extends Controller
@ferdousulhaque
ferdousulhaque / web.php
Created Aug 2, 2020
Routes for the OTP service
View web.php
<?php
use Illuminate\Support\Facades\Route;
Route::get('/test/purchase', 'OtpController@confirmationPage');
Route::post('/test/otp-request', 'OtpController@requestForOtp')->name('requestForOtp');
Route::post('/test/otp-validate', 'OtpController@validateOtp')->name('validateOtp');
Route::post('/test/otp-resend', 'OtpController@resendOtp')->name('resendOtp');
View mysql Troubleshoot Commands
## Check for Locked Table Rows
SELECT * from performance_schema.data_locks;
View report_sample_weekly.sh
#!/bin/bash
filename='feature_weekly_report_4hourly'_From-$(date +%Y_%m_%d_%H_%M -d "0 day 4 hours ago")_To-$(date +%Y_%m_%d_%H_%M).csv
db_name=darts_game
host_ip=8.8.8.8
WEEK_RANGE_ARRAY=(
[0]="20191115,20191121"
[1]="20191122,20191128"
[2]="20191129,20191205"
[3]="20191206,20191212"
@ferdousulhaque
ferdousulhaque / read-access.sql
Created Mar 24, 2019 — forked from oinopion/read-access.sql
How to create read only user in PostgreSQL
View read-access.sql
-- Create a group
CREATE ROLE readaccess;
-- Grant access to existing tables
GRANT USAGE ON SCHEMA public TO readaccess;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess;
-- Grant access to future tables
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess;