Skip to content

Instantly share code, notes, and snippets.

View asbhat's full-sized avatar

Aditya asbhat

View GitHub Profile
ZSH_THEME="agnoster"
plugins=(git vi-mode)
# Theme settings
# hide the user@hostname
DEFAULT_USER="aditya"
prompt_context(){}
# show only the current working directory
prompt_dir() {
# -------------------------
# Aliases
# -------------------------
alias cp='cp -iv'
alias ll='ls -lhp'
alias mkdir='mkdir -pv'
alias mv='mv -iv'
alias rm='rm -vf'
alias f='open -a Finder ./'

Keybase proof

I hereby claim:

  • I am asbhat on github.
  • I am asbhat (https://keybase.io/asbhat) on keybase.
  • I have a public key ASACGrY3cx49ninEvcTIlFCWFTlN7I2vaxuwHs1NQYZGPAo

To claim this, I am signing this object:

@asbhat
asbhat / setup
Last active January 3, 2018 22:55
setup a new macOS box
#!/bin/bash
# user prompts
read -p "Hello $USER, please enter your email address: " email
# install Xcode through the command line?
echo -n "Hello $USER, please install Xcode via the AppStore and then press [ENTER] :"
read userIsDoneInstallingXcode
echo -n "Please open Xcode and agree to the terms"
@asbhat
asbhat / redshift
Created February 21, 2017 21:18
a wrapper for psql, connecting you to redshift
#!/bin/bash
OPTIONS='hd:U:'
DATABASE=dbname
USERNAME=$USER
HOSTNAME=blahblah.us-east-1.redshift.amazonaws.com
function usage {
cat << EOF
@asbhat
asbhat / pglocalserver
Created February 21, 2017 21:10
start and stop a local PostgreSQL server
#!/bin/bash
if [[ -z $1 ]]; then
echo "please supply argument 'start' or 'stop'"; exit 1;
elif [[ $1 == "start" ]]; then
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
elif [[ $1 == "stop" ]]; then
pg_ctl -D /usr/local/var/postgres stop -s -m fast
fi
@asbhat
asbhat / cobaltish-vAB.vim
Created February 21, 2017 18:34
slightly updated theme for TODOs
" ==============================================================================
" File: cobaltish.vim
" Author: David Terei <davidterei@gmail.com>
" URL: http://www.vim.org/scripts/script.php?script_id=3439
" Last Change: Thu Feb 03 13:44:07 PST 2011
" Version: 1.0
" License: Distributed under the Vim charityware license.
" Summary: A colour scheme for Vim inspired by TextMates cobalt scheme.
"
" GetLatestVimScripts: 3439 1 :AutoInstall: cobaltish.vim
" vim: set sw=4 ts=4 sts=4 et tw=78 foldmarker={,} foldlevel=0 foldmethod=marker:
" VIM Local UI {
colorscheme cobaltish-vAB " local colorscheme (defaults to molokai)
if has("gui_running")
set lines=80 columns=184
highlight clear SignColumn " clears the gutter background
@asbhat
asbhat / .tmux.conf
Last active February 21, 2017 21:37
# remap prefix to Control + a
set -g prefix C-a
unbind C-b
bind C-a send-prefix
# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf
# vi shortcuts
@asbhat
asbhat / .gitconfig
Last active December 5, 2017 22:51
gitconfig for better logs, using text editing, and automatically rebase/prune instead of merge
[push]
default = simple
[alias]
lg = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(auto)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold magenta)%d%C(reset)'
lgall = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(auto)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold magenta)%d%C(reset)' --all
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(blue)%h%C(reset) - %C(bold green)(%ar)%C(reset)%C(bold magenta)%d%C(reset)%n'' %C(auto)%s%C(reset) %C(dim white)- %an%C(reset)'
lg2all = log --graph --abbrev-commit --decorate --format=format:'%C(blue)%h%C(reset) - %C(bold green)(%ar)%C(reset)%C(bold magenta)%d%C(reset)%n'' %C(auto)%s%C(reset) %C(dim white)- %an%C(reset)' --all
diffroot = diff 4b825dc642cb6eb9a060e54bf8d69288fbee4904 HEAD
[core]
editor = mvim -f