Skip to content

Instantly share code, notes, and snippets.

View bietdoikiem's full-sized avatar
🇻🇳
Solving...

Minh Nguyen bietdoikiem

🇻🇳
Solving...
  • Microsoft
  • Ho Chi Minh, Vietnam
  • 03:03 (UTC +07:00)
View GitHub Profile
@bietdoikiem
bietdoikiem / settings.json
Created April 2, 2022 02:13
List of settings to turn off suggestions in VSCode
{
"editor.suggest.showClasses": false,
"editor.suggest.showColors": false,
"editor.suggest.showConstants": false,
"editor.suggest.showConstructors": false,
"editor.suggest.showCustomcolors": false,
"editor.suggest.showDeprecated": false,
"editor.suggest.showEnumMembers": false,
"editor.suggest.showEnums": false,
"editor.suggest.showEvents": false,
@bietdoikiem
bietdoikiem / main.cpp
Last active April 28, 2022 02:51
C++ CP Starter
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define endl '\n'
ostream& operator<<(ostream& os, pair<int, int> const& x) {
os << x.first << ", " << x.second;
return os;
@bietdoikiem
bietdoikiem / tasks.json
Last active April 22, 2022 16:08
Tasks to build C++ with a single file
{
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "Make a bin directory",
"command": "mkdir -p bin"
},
{
"type": "cppbuild",
Lesson 1 SUMMARY
1. The cursor is moved using either the arrow keys or the hjkl keys.
h (left) j (down) k (up) l (right)
2. To start Vim from the shell prompt type: vim FILENAME <ENTER>
3. To exit Vim type: <ESC> :q! <ENTER> to trash all changes.
OR type: <ESC> :wq <ENTER> to save the changes.
@bietdoikiem
bietdoikiem / concurrent.py
Last active January 20, 2022 09:59
Concurrent Request Python
# Ref: https://stackoverflow.com/a/68583332/5994461
import logging
import random
import time
from concurrent.futures import ThreadPoolExecutor, as_completed
import requests
from requests.structures import CaseInsensitiveDict
THREAD_POOL = 16
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": [
"comment",
"comment.block",
"comment.block.documentation",
"comment.line",
"constant",
"constant.character",
@bietdoikiem
bietdoikiem / TetherToken.sol
Created November 25, 2021 15:36 — forked from plutoegg/TetherToken.sol
TetherToken.sol - Tether.to USD
pragma solidity ^0.4.11;
/**
* Math operations with safety checks
*/
library SafeMath {
function mul(uint a, uint b) internal returns (uint) {
uint c = a * b;
assert(a == 0 || c / a == b);
return c;
@bietdoikiem
bietdoikiem / index.js
Created November 6, 2021 16:31 — forked from dmurawsky/index.js
How to make a page full height in Next.js
const FullHeightPage = () => (
<div>
Hello World!
<style global jsx>{`
html,
body,
body > div:first-child,
div#__next,
div#__next > div {
height: 100%;
@bietdoikiem
bietdoikiem / .eslintignore
Created October 30, 2021 12:53 — forked from vicasas/.eslintignore
Next.js Lint with Eslint + Airbnb Style + Husky + Lint-Staged
.next
public
node_modules
yarn.lock
package-lock.json
**/*.test.js
coverage