Skip to content

Instantly share code, notes, and snippets.

View DonerKebab's full-sized avatar
💀

Phuong Nguyen DonerKebab

💀
View GitHub Profile
@DonerKebab
DonerKebab / gist:b2e68df838276e6c01a3d669a8d304ac
Created March 24, 2022 04:20
Fixed: NameError: name '_mysql' is not defined on MacOS
# bew install
brew install mysql@5.7
brew install mysql-client@5.7
brew install mysql-connector-c
# pip install
pip install mysqlclient
@DonerKebab
DonerKebab / remove-duplicate.js
Created December 15, 2020 09:34
remove duplicate record in mongodb
try {
await client.db(dbName).collection(`${collectionNamePrefix}`).aggregate([
{
"$group": {
_id: {ICCID: "$ICCID"}, // field which have duplicate value
dups: { $addToSet: "$_id" } ,
count: { $sum : 1 }
}
},
{
1. Download Ceritificate
2. Unzip
3. cd CER - CRT Files
4. In AWS CM console, select `Import a certificate`
5. Certificate body*: copy and paste content from STAR_billchecker_co_uk.crt
6. Certificate private key*: copy the private you generate before
7. CERTIFICATE chain: AAACertificateServices.txt -> SectigoRSADomainValidationSecureServerCA.txt -> USERTrustRSAAAACA.txt
== Done ==
Dear All,
I hope you are all doing well. Timeline is ASAP and please feel free to let me know the schedule if that needs any other info.
[Scope of works]
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="">
</head>
const employeeList = [
{
id: 1,
name: "kien",
department: "GRC",
age: 40
},
{
id: 2,
@DonerKebab
DonerKebab / es6.md
Last active December 18, 2019 06:55
Important knowledge about ES6

ES Important notes

let, const

let

  • có thể sử dụng để tạo các biến global, local.
  • nếu được định nghĩa trong 1 scope cụ thể {} khi ra ngoài khỏi scope em sẽ không thể access được biến đó.

Ví dụ 1:

@DonerKebab
DonerKebab / get_value_radio.html
Created November 25, 2019 15:58
get selected value in radio button
<!DOCTYPE html>
<html>
<body>
<p>Please select your gender:</p>
<input type="radio" name="gender" id="r1" value="male"> Male<br>
<input type="radio" name="gender" id="r2" value="female"> Female<br>
<input type="radio" name="gender" id="r3" value="other"> Other<br>
<button onclick="selectValue()">Save</button>
@DonerKebab
DonerKebab / gacon.html
Created November 22, 2019 01:58
hien thi error message su dung visibility
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<title>Page Title</title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
</head>
<body>
<div>
@DonerKebab
DonerKebab / gacon.html
Created November 22, 2019 01:58
hien thi error message su dung visibility
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<title>Page Title</title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
</head>
<body>
<div>