Skip to content

Instantly share code, notes, and snippets.

View thanhdatpd's full-sized avatar
😂

Alex Nguyen thanhdatpd

😂
View GitHub Profile
import fs from "fs";
import _ from "lodash";
import { mkConfig, generateCsv, asString } from "export-to-csv";
import { writeFile } from "node:fs";
import { Buffer } from "node:buffer";
// mkConfig merges your options with the defaults
// and returns WithDefaults<ConfigOptions>
const csvConfig = mkConfig({ useKeysAsHeaders: true });
// import PDFParser from "pdf2json";
We can't make this file beautiful and searchable because it's too large.
"date_time","trans_no","credit","debit","detail"
"01/09/2024_5215.97152",1,"3000",0,"267515.010924.122904.NGUYEN THI MAO Chuyen tien"
"01/09/2024_5219.24714",2,"10000",0,"018806.010924.213139.chuc mung ngay 29 nuoc cong hoa xa hoi chu nghia Viet Nam"
"02/09/2024_5212.22965",3,"10000",0,"055464.020924.064157.Ung Ho Nha Nuoc Viet Nam Va Giup do Nguoi dan (by TPBank ChatPay)"
"02/09/2024_5245.21394",4,"10000",0,"MBVCB.6924605040.gia dinh Dung Thuy Giang chuc to quoc khoe manh, binh an, hanh phuc, thinh vuong, cam on.CT tu 1018144916 HOANG THANH THUY toi 0011001932418 MAT TRAN TO QUOC VN - BAN CUU TRO TW"
"02/09/2024_5078.73943",5,"50000",0,"MBVCB.6925071164.mung ngay quoc khanh.CT tu 1028808193 toi 0011001932418 Uy Ban Trung uong Mat tran To quoc Viet Nam"
"02/09/2024_5216.8149",6,"2000",0,"524322.020924.175952.2091945"
"02/09/2024_5390.64042",7,"500000",0,"0200970415090220272520240Ppe432198.64042. 202714.NGUYEN THI LAN HANH Quyen gop"
"03/09/2024_5218.45892",8,"10000",0,"881384.030924.070324.Ung Ho Nha Nuoc Vie
@thanhdatpd
thanhdatpd / gist:a8bde897dc55ec871ac1466033d0c2f4
Created February 21, 2024 03:03
multi line search vscode
<v-autocomplete(.|\n)+?@update:search-input*(.|\n)+?</v-autocomplete>
@thanhdatpd
thanhdatpd / cordToTiles.js
Created December 27, 2022 14:18
Convert coordinates to tiles and vice versa
const cordToXY = (lng, lat, z) => {
let x = (lng + 180) / 360;
let sinLat = Math.sin((lat * Math.PI) / 180);
let y = 0.5 - Math.log((1 + sinLat) / (1 - sinLat)) / (4 * Math.PI);
let mapSize = 256 << z;
// x = mapSize * x - mapSize / 2;
// y = mapSize * y - mapSize / 2;
x = mapSize * x;
y = mapSize * y;
return { x, y };
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
# multi_accept on;
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@thanhdatpd
thanhdatpd / help.txt
Created January 16, 2022 05:03
help command
//set time ubnutu
sudo date -s "$(wget -qSO- --max-redirect=0 google.com 2>&1 | grep Date: | cut -d' ' -f5-8)Z"
<h2>End-User License Agreement (EULA) of <span class="app_name">My HUBT</span></h2>
<p>This End-User License Agreement ("EULA") is a legal agreement between you and <span class="company_name">Alex Stack Dev</span>.</p>
<p>This EULA agreement governs your acquisition and use of our <span class="app_name">My HUBT</span> software ("Software") directly from <span class="company_name">Alex Stack Dev</span> or indirectly through a <span class="company_name">Alex Stack Dev</span> authorized reseller or distributor (a "Reseller"). </p>
<p>Please read this EULA agreement carefully before completing the installation process and using the <span class="app_name">My HUBT</span> software. It provides a license to use the <span class="app_name">My HUBT</span> software and contains warranty information and liability disclaimers.</p>
<p>If you register for a free trial of the <span class="app_name">My HUBT</span> software, this EULA agreement will also govern that trial. By clicking "accept" or installing and/or using the
console.clear();
all = "";
allQuesAndAns= "";
replaceHTMLesc = (instr)=>{
return instr.replaceAll("&quot", "\"")
.replaceAll("</br>", "\n")
.replaceAll("&amp;", "")
.replaceAll("&lt;", "")
.replaceAll("&gt;", '')
.replaceAll("&quot;","" )
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
body {