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 / dump-pgsql.sh
Created March 15, 2024 01:39
postgresql dump format
pg_dump --column-inserts -U <username> --table=<table> <database> -P
@ferdousulhaque
ferdousulhaque / AdbCommands
Created March 6, 2024 12:19 — forked from Pulimet/AdbCommands
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
@ferdousulhaque
ferdousulhaque / listener.js
Created April 13, 2023 13:25
Listener script with node to test server port opening
const http = require("http");
const host = process.argv.slice(2)[0];
const port = process.argv.slice(2)[1];
const requestListener = function (req, res) {
res.writeHead(200);
res.end("Success!!");
};
@ferdousulhaque
ferdousulhaque / non_root_nodejs.sh
Created January 31, 2023 16:58
These are the steps for installing nodejs on a public VPS for Node Applications
wget https://nodejs.org/download/release/v16.19.0/node-v16.19.0-linux-x64.tar.gz
tar xvf node-v16.19.0-linux-x64.tar.gz
mv node-v16.19.0-linux-x64 nodejs
mkdir ~/bin
cp nodejs/bin/node ~/bin
cd ~/bin
ln -s ../nodejs/lib/node_modules/npm/bin/npm-cli.js npm
node --version
@ferdousulhaque
ferdousulhaque / nginx_setup.sh
Last active January 31, 2023 01:22
steps to nginx compilation from source
# Install PCRE
unzip pcre-8.45.zip
./configure
make
sudo make install
# Extract zlib, no need to install
tar -xvzf zlib-1.2.12.tar.gz
./configure
make
@ferdousulhaque
ferdousulhaque / docker-compose.yml
Created September 8, 2022 10:33 — forked from ThabetAmer/docker-compose.yml
Run SonarQube and SonarScanner in Docker-compose
#
# Based on https://hub.docker.com/_/sonarqube
#
version: "3.7"
services:
sonarqube:
container_name: sonarqube
@ferdousulhaque
ferdousulhaque / otp-success-fail-page.blade.php
Last active August 2, 2020 15:37
Sample OTP Success Fail Page
@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']))
@ferdousulhaque
ferdousulhaque / app.js
Created August 2, 2020 15:33
JS Timer
//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;
@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">
@ferdousulhaque
ferdousulhaque / checkout-page.blade.php
Created August 2, 2020 15:26
Sample checkout page
@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">