Skip to content

Instantly share code, notes, and snippets.

View minhphong306's full-sized avatar
😄
Don't watch the clock. Do what it does! Keep going!

Phong Do minhphong306

😄
Don't watch the clock. Do what it does! Keep going!
View GitHub Profile
@minhphong306
minhphong306 / node_output.txt
Created August 28, 2024 07:17
node_output.txt
/Users/alex/workspace/001-teaching-courses/004-udemy/001-ts
/Users/alex/.nvm/versions/node/v20.0.0/bin/node
/Library/Preferences/Logging/.plist-cache.GZngdQrO
/Users/alex/workspace/001-teaching-courses/004-udemy/001-ts/node_modules/fsevents/fsevents.node
->0xf5018b9f9838bf57
->0xf432b7ce42f96861
->0xa9b4f01ee205c115
->0x73d3239d63d7d1ed
count=0, state=0
->0x12fb13533d75bb25
@minhphong306
minhphong306 / example_lesson-7.html
Created August 23, 2024 18:55
example_lesson-7.html
<div class="container" id="ancestor">
<h1 id="self">User Registration</h1>
<form id="registrationForm">
<div class="form-group" id="parent">
<label for="username" id="preceding">Username:</label>
<input type="text" id="username" name="username" required="">
</div>
<div class="form-group" id="child">
<label for="email">Email:</label>
<input type="email" id="email" name="email" required="">
@minhphong306
minhphong306 / example-html.html
Created August 23, 2024 01:36
example-html.html
<form id="registrationForm">
<div class="form-group" id="parent">
<label for="username" id="preceding">Username:</label>
<input type="text" id="username" name="username" required="">
</div>
<div class="form-group" id="child">
<label for="email">Email:</label>
<input type="email" id="email" name="email" required="">
</div>
<div class="form-group">
@minhphong306
minhphong306 / Dockerfile
Created July 4, 2024 14:34
selenium dockerfile
# Sử dụng hình ảnh Maven chính thức làm hình ảnh cha
FROM maven:3.8.1-openjdk-11-slim
# Đặt thư mục làm việc trong container
WORKDIR /app
# Sao chép nội dung thư mục hiện tại vào container tại /app
COPY . /app
# Cài đặt cron
@minhphong306
minhphong306 / loc.ts
Last active May 19, 2024 15:42
Loc nguyen to
function locNguyenTo(arr) {
const arrNguyenTo = [];
for (let i = 0;i < arr.length; i++) {
if (arr[i] === 0 || arr[i] === 1) {
continue;
}
let count = 0;
for (let j=2; j < arr[i]; j++) {
@minhphong306
minhphong306 / code.js
Created March 25, 2024 17:34
code mess
function toggle(type) {
const chatList = document.querySelectorAll("a[href*='/t/']");
// Add filter blur(2px) for each item
chatList.forEach((item) => {
const parent = getUpToEightParents(item);
let filterValue = '';
switch (type) {
case 'off':
@minhphong306
minhphong306 / send_mail.php
Created March 25, 2024 05:05
send_mail.php
<?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
// Setting response header json
header('Content-Type: application/json');
// Check if not post method -> throw error
if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
http_response_code(405);
@minhphong306
minhphong306 / install_postaman.sh
Created March 19, 2024 07:13 — forked from lucasalvessouza/install_postaman.sh
Install postman fedora
#!/bin/bash
wget https://dl.pstmn.io/download/latest/linux64 -O postman-linux-x64.tar.gz
sudo tar xvzf postman-linux-x64.tar.gz -C /opt
sudo ln -s /opt/Postman/Postman /usr/bin/postman
cat << EOF > ~/.local/share/applications/postman2.desktop
[Desktop Entry]
Name=Postman
GenericName=API Client
@minhphong306
minhphong306 / rfc-7396-test-cases.txt
Created February 12, 2024 07:50
RFC 7396 test cases
ORIGINAL PATCH RESULT
------------------------------------------
{"a":"b"} {"a":"c"} {"a":"c"}
{"a":"b"} {"b":"c"} {"a":"b",
"b":"c"}
{"a":"b"} {"a":null} {}
{"a":"b", {"a":null} {"b":"c"}
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
)
type AutoGenerated struct {