Skip to content

Instantly share code, notes, and snippets.

View bilashcse's full-sized avatar
👨‍💻
Coding is fun

Nazmul Hossain bilashcse

👨‍💻
Coding is fun
View GitHub Profile
@bilashcse
bilashcse / ts-boilerplate.md
Created January 15, 2023 09:58 — forked from silver-xu/ts-boilerplate.md
Setup a Node.js project with Typescript, ESLint, Prettier, Husky

Setup a Node.js project with Typescript, ESLint, Prettier, Husky

1_D8Wwwce8wS3auLAiM3BQKA

Starting a personal node project could be easy; starting a team node project could be challenging.

I am a developer currently working in SEEK Australia.

In my experience, common mistakes developer make when starting a projects are:

  • No Linting
@bilashcse
bilashcse / publish.yml
Created May 21, 2020 19:59
publish-npm-package-github-action-flow
name: NPM package publish
on:
push:
branches:
- master
jobs:
publish-npm:
runs-on: ubuntu-latest
@bilashcse
bilashcse / query_finder.sql
Last active May 14, 2020 08:59 — forked from mezis/query_finder.sql
Finding long-running queries in MySQL
SELECT id,state,command,time,left(replace(info,'\n','<lf>'),120)
FROM information_schema.processlist
WHERE command <> 'Sleep'
AND info NOT LIKE '%PROCESSLIST%'
ORDER BY time DESC LIMIT 50;
@bilashcse
bilashcse / porichoi_nid_verification.js
Created October 3, 2019 17:08
Porichoi NID Verification API NodeJs Implementation
const request = require('request-promise-native');
const verificationEndPoint = 'end_point';
const subscriptionKey = 'subscription_key';
async function verify({ nidNumber, fullName, dob }) {
let response = await request({
method: 'POST',
qs: {
national_id: nidNumber,
@bilashcse
bilashcse / dynamic html
Created May 19, 2019 17:43
Generate Dynamic html using NodeJs
function generateDynamicHtml(data, htmlUrl, html) {
let htmlTemplate = htmlUrl ? fs.readFileSync(path.join(__dirname, htmlUrl), 'utf8') : html;
let reg = /<script\b[^>]*>([\s\S]*?)<\/script>/gm;
let match,
arrValues = [],
templateMap = {};
for (var key in data) {
if (Array.isArray(data[key])) {
arrValues.push({
@bilashcse
bilashcse / multiple_sheet_excel
Created May 19, 2019 17:41
Multiple excel sheet generate using NodeJs
const XLSX = require('xlsx');
function multipleSheetExcel(excelData) {
try {
let wb = XLSX.utils.book_new();
Object.keys(excelData).forEach(function(item) {
let ws = XLSX.utils.json_to_sheet(excelData[item]);
XLSX.utils.book_append_sheet(wb, ws, item);
});
@bilashcse
bilashcse / csv-download.js
Last active February 10, 2019 19:13
Initial zero supported Mobile/ Phone Numbers CSV download front-end hack with Unicode supports
let csvContent = "data:application/vnd.ms-excel;charset=utf-8,\uFEFF";
let csvArray = [
[
"Id",
"Name",
"Phone"
]
];
usersArray.forEach(user => {

Keybase proof

I hereby claim:

  • I am bilashcse on github.
  • I am nazmul (https://keybase.io/nazmul) on keybase.
  • I have a public key ASDcBeP_iaoQZY9pGa3Z_yDxhfrvR1r5u9xJSQRyk8VSPAo

To claim this, I am signing this object:

@bilashcse
bilashcse / twitterTweetDelete
Created January 5, 2019 16:24
Twitter Tweets Delete
var request=require('request');
var qs=require('qs');
var consumer_key='';
var consumer_secret='';
var access_token='';
var access_token_secret='';
@bilashcse
bilashcse / division_district_upazilla_union.sql
Created December 27, 2018 07:26
SQL dump for all Bangladeshi divisions, districts, upazillas / Thanas, Unions
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
SET NAMES utf8mb4;
DROP TABLE IF EXISTS `districts`;
CREATE TABLE `districts` (
`id` int(11) NOT NULL AUTO_INCREMENT,