Skip to content

Instantly share code, notes, and snippets.

View ndkhoa's full-sized avatar

Nguyen Dang Khoa ndkhoa

View GitHub Profile
@ndkhoa
ndkhoa / tmux-cheatsheet.markdown
Created March 30, 2021 13:57 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@ndkhoa
ndkhoa / rails http status codes
Created January 7, 2022 09:45 — forked from mlanett/rails http status codes
HTTP status code symbols for Rails
HTTP status code symbols for Rails
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings.
Status Code Symbol
1xx Informational
100 :continue
101 :switching_protocols
102 :processing
@ndkhoa
ndkhoa / tien-len-mien-nam-by-bing-gpt.py
Created May 9, 2023 01:16 — forked from huytd/tien-len-mien-nam-by-bing-gpt.py
Card game Thirteen (a.k.a Tiến lên miền nam) made by Bing Chat
# Step 1: Import the random module
import random
# Step 2: Define a class for cards
class Card:
def __init__(self, rank, suit):
self.rank = rank # an integer from 3 to 15 (3 is lowest and 15 is highest)
self.suit = suit.lower() # a string from "spades", "clubs", "diamonds", or "hearts"
def __str__(self):