Skip to content

Instantly share code, notes, and snippets.

View 0xF5T9's full-sized avatar
💭
Being lost in the finite.

V 0xF5T9

💭
Being lost in the finite.
View GitHub Profile
@0xF5T9
0xF5T9 / index.html
Last active April 10, 2024 06:56
Simple script that mimic Redux library.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="style.css" />
<title>TODO List</title>
</head>
<body>
<div id="app"></div>
@0xF5T9
0xF5T9 / promise_all.js
Last active April 10, 2024 03:58
Javascript Promise.all() example
Promise.all([
fetch('https://jsonplaceholder.typicode.com/posts').then((res) => res.json()),
fetch('https://jsonplaceholder.typicode.com/users').then((res) => res.json()),
fetch('https://jsonplaceholder.typicode.com/comments').then((res) => res.json())
// Fetch more data if needed ...
])
.then((data) => {
console.log('Do something with this data: ', data);
// Do something ...
})
@0xF5T9
0xF5T9 / win32_ifile_examples.cpp
Last active February 29, 2024 06:25
IFileOpenDialog, IFileSaveDialog examples.
#include <iostream>
#include <windows.h>
#include <shobjidl.h>
#include <string>
#include <vector>
/**
* @brief Open a dialog to select item(s) or folder(s).
* @param paths Specifies the reference to the string vector that will receive the file or folder path(s). [IN]
* @param selectFolder Specifies whether to select folder(s) rather than file(s). (optional)