Skip to content

Instantly share code, notes, and snippets.

View ThuanNP's full-sized avatar
🎯
Focusing

Thuan Nguyen Phuoc ThuanNP

🎯
Focusing
  • Công Ty Công Nghệ Thông Tin Điện Lực Thành Phố Hồ Chí Minh
  • 114a Hồng Hà Ward 2, Tân Bình district, Hồ Chí Minh City, Việt Nam
  • 06:37 (UTC +07:00)
View GitHub Profile
@ThuanNP
ThuanNP / use-bbdiff
Created February 26, 2024 02:02 — forked from wholmgren/use-bbdiff
set git difftool to bbdiff
git config --global diff.tool bbdiff
git config --global difftool.bbdiff.cmd 'bbdiff --wait --resume "$LOCAL" "$REMOTE"'
git config --global difftool.prompt false
git config --global merge.tool bbdiff
git config --global mergetool.bbdiff.cmd 'bbdiff --wait --resume "$LOCAL" "$REMOTE"'
Double check ~/.gitconfig
@ThuanNP
ThuanNP / use-bbdiff
Created February 26, 2024 02:02 — forked from wholmgren/use-bbdiff
set git difftool to bbdiff
git config --global diff.tool bbdiff
git config --global difftool.bbdiff.cmd 'bbdiff --wait --resume "$LOCAL" "$REMOTE"'
git config --global difftool.prompt false
git config --global merge.tool bbdiff
git config --global mergetool.bbdiff.cmd 'bbdiff --wait --resume "$LOCAL" "$REMOTE"'
Double check ~/.gitconfig
@ThuanNP
ThuanNP / contracts...TestGasUse.sol
Created August 7, 2021 09:29
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.4+commit.c7e474f2.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
contract TestGasUsage {
function displayGasUage() public view returns(uint) {
uint256 startGas = gasleft();
//int number = 5;
uint256 usedGas = startGas - gasleft();
@ThuanNP
ThuanNP / contracts...SimpleBank.sol
Created August 7, 2021 09:29
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.4+commit.c7e474f2.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
contract SimpleBank {
uint public balance;
constructor() {
balance = 20000;
}