Skip to content

Instantly share code, notes, and snippets.

View cpp-johnny's full-sized avatar
:shipit:
:(

Johnson cpp-johnny

:shipit:
:(
  • Singapore
  • 23:15 (UTC +08:00)
View GitHub Profile
@cpp-johnny
cpp-johnny / chatgpt-vimrc.txt
Created February 9, 2023 13:24
ChatGPT generated .vimrc config
" Basic settings
set nocompatible " Make Vim behave like a modern text editor
set encoding=UTF-8 " Use UTF-8 encoding
set backspace=indent,eol,start " Make backspace work like most people expect
set ruler " Show the cursor position all the time
set number " Show line numbers
set tabstop=4 " Set the width of a tab to 4 spaces
set shiftwidth=4 " Set the width of auto-indentation to 4 spaces
set expandtab " Use spaces instead of tabs
set hlsearch " Highlight search results
@cpp-johnny
cpp-johnny / aliases.txt
Created February 1, 2023 05:16
bash aliases generated by ChatGPT
alias ll='ls -alF' (to show hidden files and files with their type)
alias ..='cd ..' (to go up one directory)
alias ...='cd ../..' (to go up two directories)
alias ~='cd ~' (to go to the home directory)
alias grep='grep --color=auto' (colorize the output of grep)
alias rm='rm -i' (to prompt before deleting files)
alias cp='cp -i' (to prompt before overwriting files)
alias mv='mv -i' (to prompt before overwriting files)
alias df='df -h' (to show disk usage in human-readable format)
alias du='du -h' (to show directory usage in human-readable format)
@cpp-johnny
cpp-johnny / .bash_aliases
Created February 1, 2023 03:02
permanent bash aliases
# How to update bash_aliases
# 1) vim ~/.bash_aliases
# 2) make changes
# 3) exit
# 4) source ~/.bash_aliases
# for more details refer to https://www.cyberciti.biz/faq/create-permanent-bash-alias-linux-unix/
# make ls have colour
alias ls='ls --color=auto'
@cpp-johnny
cpp-johnny / .vimrc
Last active February 1, 2023 05:17
my vim config
" Show line numbers
set number
" Set auto indent
set autoindent
" Set smart indent
set smartindent
" make sure the indentations are 4 spaces only