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
  • 01:18 (UTC +07:00)
View GitHub Profile
@zzxvictor
zzxvictor / main.go
Created February 1, 2022 16:35
Golang UID Throughput
package main
import (
"fmt"
"os"
"time"
)
var COUNTER_BIT_SIZE int = 14
var THREAD_CAP int = 1 << COUNTER_BIT_SIZE
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.
@vicasas
vicasas / .eslintignore
Created October 28, 2021 12:10
Next.js Lint with Eslint + Airbnb Style + Husky + Lint-Staged
.next
public
node_modules
yarn.lock
package-lock.json
**/*.test.js
coverage
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": [
"comment",
"comment.block",
"comment.block.documentation",
"comment.line",
"constant",
"constant.character",
@dmurawsky
dmurawsky / index.js
Last active May 22, 2024 19:01
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%;
@wassname
wassname / live_plot_notebook.py
Created September 27, 2017 06:14
Live plot using %matplotlib notebook in jupyter notebook
import numpy as np
from matplotlib import pyplot as plt
class LivePlotNotebook(object):
"""
Live plot using %matplotlib notebook in jupyter notebook
Usage:
```
import time
@plutoegg
plutoegg / TetherToken.sol
Last active May 25, 2024 08:15
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;