Skip to content

Instantly share code, notes, and snippets.

View nongvantinh's full-sized avatar
💭
I may be slow to respond.

Nông Văn Tình nongvantinh

💭
I may be slow to respond.
  • 21:42 (UTC +07:00)
View GitHub Profile
@nongvantinh
nongvantinh / Dockerfile
Created March 27, 2025 13:06
Building a Windows Docker image on Windows OS
# escape=`
# https://learn.microsoft.com/en-us/virtualization/windowscontainers/manage-docker/manage-windows-dockerfile#escape-character
# https://hub.docker.com/r/microsoft/dotnet-framework-sdk
ARG FROM_IMAGE=mcr.microsoft.com/dotnet/framework/sdk:3.5-20241008-windowsservercore-ltsc2022
FROM ${FROM_IMAGE}
SHELL ["cmd", "/S", "/C"]
ADD https://aka.ms/vscollect.exe C:\collect.exe
@nongvantinh
nongvantinh / generate-otp.cpp
Last active April 10, 2025 05:01
C++17 implementation for one-time passwords. It provides HMAC-based and time-based implementations of one-time passwords.
// Compile: g++ generate-otp.cpp --std=c++17 -Wall -Wextra -o otp_generator
// Run: ./otp_generator
#ifndef ONE_TIME_PASSWORD_H
#define ONE_TIME_PASSWORD_H
#include <string>
#include <vector>
#include <ctime>