Skip to content

Instantly share code, notes, and snippets.

View realhaidinh's full-sized avatar
🏠
Working from home

Dinh Nguyen Minh Hai realhaidinh

🏠
Working from home
  • Hue, Viet Nam
  • 02:49 (UTC +07:00)
View GitHub Profile
@imgerson
imgerson / index.html
Created December 22, 2018 22:07
Interactive video with HTML5 and JavaScript
<!DOCTYPE html>
<html>
<head>
<title>Basic interactive video with HTML5 and vanilla JavaScript</title>
</head>
<body>
<!-- Read my blog post on interactive videos: https://mostlydevstuff.com/2018/basic-interactive-video-with-html5-and-javascript/ -->
<style>
@teamon
teamon / box.ex
Created August 25, 2017 23:09
Define elixir structs with typespec with single line of code
defmodule Box do
defmacro __using__(_env) do
quote do
import Box
end
end
@doc """
Define module with struct and typespec, in single line
@ashwin
ashwin / async_example.cpp
Last active March 3, 2023 23:18
How to use async threads in C++
#include <future>
float DoWork(int idx)
{
// Do some hard computation using idx
// and internal read-only data structures
// Return the float result
}
void DoAsync()