Skip to content

Instantly share code, notes, and snippets.

View ferdousulhaque's full-sized avatar
🚦

A. S. Md. Ferdousul Haque ferdousulhaque

🚦
View GitHub Profile
@ferdousulhaque
ferdousulhaque / template.blade.php
Created August 2, 2020 15:19
Layout Template for OTP
<!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 August 25, 2020 14:50
OTP Service Controller
<?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 August 2, 2020 15:11
Routes for the OTP service
<?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');
@ferdousulhaque
ferdousulhaque / mysql Troubleshoot Commands
Created March 13, 2020 10:36
mysql Troubleshoot Commands
## Check for Locked Table Rows
SELECT * from performance_schema.data_locks;
@ferdousulhaque
ferdousulhaque / report_sample_weekly.sh
Created January 31, 2020 12:19
Weekly Table Report Script
#!/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 March 24, 2019 11:10 — forked from oinopion/read-access.sql
How to create read only user in PostgreSQL
-- 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;
@ferdousulhaque
ferdousulhaque / fluentd_redis_postgresql.yml
Created August 26, 2018 10:48
Docker Fluentd Redis and PostGRESQL
version: '2'
services:
fluentd:
image: 'fluent/fluentd'
ports:
- "24224:24224"
- "24224:24224/udp"
environment:
- FLUENT_UID=1000
@ferdousulhaque
ferdousulhaque / docker-redis
Created August 4, 2018 07:08
Docker Redis
version: '2'
services:
redis:
image: 'bitnami/redis:latest'
ports:
- "6379:6379"
environment:
- DISABLE_COMMANDS=FLUSHDB,FLUSHALL,CONFIG
- ALLOW_EMPTY_PASSWORD=yes
server {
listen 80;
root /home/ferdous/web;
index index.php index.html;
autoindex on;
location /{
try_files $uri $uri/ /index.php;
}
{
"autoload" : {
"psr-4" : {
"App\\" : "app/"
}
},
"require" : {
"mikecao/flight" : "^1.3",
"fpdo/fluentpdo" : "^1.1",
"illuminate/container" : "4.1.30",