Skip to content

Instantly share code, notes, and snippets.

View obbaeiei's full-sized avatar

Theerawit Akesiripong obbaeiei

View GitHub Profile
@obbaeiei
obbaeiei / main.js
Last active July 23, 2018 15:34
Async on sync
function add(a, b) {
return a + b
}
async function mainBad() {
await add(1, 2) // bad
console.log('finished')
}
function mainGood() {
@obbaeiei
obbaeiei / main.js
Created July 23, 2018 15:13
Bad ex01
async function main() {
await console.log(1) // bad
}
main()
@obbaeiei
obbaeiei / main.js
Created July 23, 2018 15:10
Function execute
const fn = () => { // ประกาศไว้เฉยๆ
console.log(1) // ประกาศไว้เฉยๆ
} // ประกาศไว้เฉยๆ
fn() // เรียกโค้ดข้างในมาทำงานตรงบรรทัดนี้
#eval $(thefuck --alias)
# Set utf-8 encoding
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
# GO
# export PATH=$PATH:/usr/local/go/bin
@obbaeiei
obbaeiei / keybase.md
Created March 22, 2018 13:33
verify keybase

Keybase proof

I hereby claim:

  • I am obbaeiei on github.
  • I am obzerocom (https://keybase.io/obzerocom) on keybase.
  • I have a public key ASAOnDmRuG5xsaYrd-dVvKiusIcl8yzvkxCu-xYtIh8vxgo

To claim this, I am signing this object:

@obbaeiei
obbaeiei / cloudSettings
Last active May 22, 2021 11:43
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-05-22T11:43:54.326Z","extensionVersion":"v3.4.3"}
@obbaeiei
obbaeiei / setting-mac.txt
Last active August 17, 2018 07:36
repeat keys mac os x
defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
#eval $(thefuck --alias)
function myPk() {
cd ~/workspaces/obbaeiei/my-code;
node -e "a = require('stellar-sdk').Keypair.fromSecret(\"$1\").publicKey(); console.log(a)";
}
alias work1='cd ~/workspaces/thesixnetwork/six-web-wallet'
alias work2='cd ~/go/src/github.com/thesixnetwork/six.network'
@obbaeiei
obbaeiei / NERDTree.mkd
Created November 23, 2017 11:48 — forked from m3nd3s/NERDTree.mkd
My Vim Cheat Sheet

NERDTree

o.......Open files, directories and bookmarks....................|NERDTree-o|
go......Open selected file, but leave cursor in the NERDTree.....|NERDTree-go|
t.......Open selected node/bookmark in a new tab.................|NERDTree-t|
T.......Same as 't' but keep the focus on the current tab........|NERDTree-T|
i.......Open selected file in a split window.....................|NERDTree-i|
gi......Same as i, but leave the cursor on the NERDTree..........|NERDTree-gi|
s.......Open selected file in a new vsplit.......................|NERDTree-s|
gs......Same as s, but leave the cursor on the NERDTree..........|NERDTree-gs|

O.......Recursively open the selected directory..................|NERDTree-O|

@obbaeiei
obbaeiei / .js
Last active August 4, 2016 09:47
"ObjectPatternOpeningBrace": 1, // 336
"ObjectPatternClosingBrace": 1, // 337
"ObjectPatternOpeningBrace": 1, // 441
"ObjectPatternClosingBrace": 1, // 442