Skip to content

Instantly share code, notes, and snippets.

View xamfy's full-sized avatar
🏄‍♂️

Pratyaksh xamfy

🏄‍♂️
View GitHub Profile
@xamfy
xamfy / postgres-cheatsheet.md
Created August 13, 2023 13:29 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@xamfy
xamfy / iterm2-solarized.md
Created October 1, 2020 09:32 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@xamfy
xamfy / tmux.conf
Created September 26, 2020 16:22 — forked from spicycode/tmux.conf
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@xamfy
xamfy / .tmux.conf
Created September 26, 2020 16:21 — forked from rsp/.tmux.conf
The best and greatest tmux.conf ever - improved!
# The best and greatest tmux.conf ever - improved!
# https://gist.github.com/rsp/f4770a1fe8ea7e2378ac3a16e01a2b53
# Here are some customizations done by Rafał Pocztarski:
# use Ctrl+Backslash instead of Ctrl+A or Ctrl+B
# use Slash to split vertically
# use Backslash to split horizontally
unbind-key C-b
set -g prefix 'C-\'
bind-key 'C-\' send-prefix
@xamfy
xamfy / delete_on_exit_temp_folder.sh
Created September 22, 2020 17:11 — forked from Sidd-Dino/delete_on_exit_temp_folder.sh
folder which deletes itself when you leave it
#!/usr/bin/env bash
#This script was made on a request from one of my human
# friends. He needed a folder that would delete itself when
# leaves it.
#
# Press Ctrl+d to leave the folder and let it delete itself
#time used to creaate uniques folders
time=$(printf "%(%l%M%S)T\\n" "-1")
@xamfy
xamfy / init.vim
Created September 16, 2020 17:16
neovim configuration
" vim:foldmethod=marker:foldlevel=0
" vim-plug {{{
call plug#begin()
" color scheme
Plug 'chriskempson/base16-vim'
" syntax highlighting
Plug 'peterhoeg/vim-qml'
@xamfy
xamfy / lazy-load-nvm.sh
Created August 31, 2020 05:08
NVM lazy loading script
#!/bin/bash
#
# NVM lazy loading script
#
# NVM takes on average half of a second to load, which is more than whole prezto takes to load.
# This can be noticed when you open a new shell.
# To avoid this, we are creating placeholder function
# for nvm, node, and all the node packages previously installed in the system
# to only load nvm when it is needed.
@xamfy
xamfy / zshrc
Created August 26, 2020 22:22 — forked from LukeSmithxyz/zshrc
# Luke's config for the Zoomer Shell
# Enable colors and change prompt:
autoload -U colors && colors
PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b "
# History in cache directory:
HISTSIZE=10000
SAVEHIST=10000
HISTFILE=~/.cache/zsh/history
@xamfy
xamfy / init.vim
Created August 25, 2020 09:31 — forked from benawad/init.vim
" Specify a directory for plugins
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'scrooloose/nerdtree'
"Plug 'tsony-tsonev/nerdtree-git-plugin'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'ryanoasis/vim-devicons'
Plug 'airblade/vim-gitgutter'
@xamfy
xamfy / init.vim
Created August 25, 2020 01:08 — forked from Hopobcn/init.vim
neovim configuration with vim-airline, gruvbox colors & deoplete C/C++ code completion
call plug#begin('~/.config/nvim/plugged')
" Plugins {
" airline is a better status line and a tab-bar for nvim.
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
" gruvbox colorscheme. Seems to work the best for me.
Plug 'morhetz/gruvbox'
" deoplete - code completion. REQUIRES: :echo has("python3")