Skip to content

Instantly share code, notes, and snippets.

View manojkarthick's full-sized avatar
powered by caffeine

Manoj Karthick manojkarthick

powered by caffeine
View GitHub Profile
@manojkarthick
manojkarthick / .zsh_plugins.txt
Last active July 30, 2020 02:39
Antibody zsh configuration
robbyrussell/oh-my-zsh path:plugins/git
robbyrussell/oh-my-zsh path:plugins/command-not-found
robbyrussell/oh-my-zsh path:plugins/docker
zsh-users/zsh-syntax-highlighting
robbyrussell/oh-my-zsh path:lib
robbyrussell/oh-my-zsh path:themes/gianu.zsh-theme
# win0err/aphrodite-terminal-theme path:aphrodite.zsh-theme
@manojkarthick
manojkarthick / .vimrc
Created June 22, 2020 08:43
Basic Vim Configuration
filetype plugin indent on
syntax on
set number
set tabstop=4
set softtabstop=4
set showcmd
set cursorline
set incsearch
set hlsearch
@manojkarthick
manojkarthick / .gitconfig
Last active July 21, 2020 10:13
Git configuration
[pull]
rebase = true
[user]
name = Manoj Karthick Selva Kumar
email = email@example.com
[alias]
unstage = reset HEAD --
co = checkout
br = branch
ci = commit
@manojkarthick
manojkarthick / .eksrc
Created May 31, 2020 07:30
Custom ZSH scripts
# Kubectl auto-complete
source <(kubectl completion zsh) # setup autocomplete in zsh into the current shell
# Kube PS1
source "/usr/local/opt/kube-ps1/share/kube-ps1.sh"
function get_cluster_short() {
echo "$1" | cut -d / -f2
}
export KUBE_PS1_SYMBOL_ENABLE=false
export KUBE_PS1_CLUSTER_FUNCTION=get_cluster_short
@manojkarthick
manojkarthick / .zshrc
Last active July 29, 2020 08:45
ZSH profile
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
export ZSH="/Users/m.kumar1/.oh-my-zsh"
ZSH_THEME="gianu"
DISABLE_AUTO_UPDATE="true"
plugins=(git fzf terraform dircycle)
@manojkarthick
manojkarthick / .gitconfig
Created October 19, 2019 04:14
My Git Aliases
[pull]
rebase = true
[alias]
st = status
co = checkout
br = branch
ci = commit
cm = commit -m
unstage = reset HEAD --
ui = pull upstream integration
That's awesome.
I've set mine up with highlight (instead of source-highlight) like this:
### Terminal Syntax Highlighting
# Setup: "brew install highlight"
# Pipe Highlight to less
export LESSOPEN="| $(which highlight) %s --out-format xterm256 --line-numbers --quiet --force --style solarized-light"
!tables - list all tables
!describe {table name} - detailed description of the table
DROP TABLE IF EXISTS my_table; - drops the table named my_table
SELECT * FROM my_table LIMIT 1000; - selects all columns from my_table limiting the result set to 1000 records
DELETE FROM my_table WHERE ID= 321; - deletes a record from my_table where the primary Id is equal to 321
CREATE INDEX idx_last_updated_date ON sales.opportunity(last_updated_date DESC) - Creates a secondary index on a table or view. The index is kept in sync with the table as data changes. At query time, the optimizer will use the index if it contains all columns referenced in the query to produce an efficient execution plan.
!quit - quites SQLLine client
@manojkarthick
manojkarthick / athena_cheatsheet.md
Created January 21, 2019 19:09 — forked from steveodom/athena_cheatsheet.md
AWS Athena / Hive / Presto Cheatsheet

Useful Links / Sources

Housekeeping

change column type

ALTER TABLE logs.trades CHANGE recentprice price int;

Keybase proof

I hereby claim:

  • I am manojkarthick on github.
  • I am manojkarthick (https://keybase.io/manojkarthick) on keybase.
  • I have a public key ASA3FWG-jhUvFQbSjKD-ozXDcmm80uZD3XIyOgDVUT1e1go

To claim this, I am signing this object: