Skip to content

Instantly share code, notes, and snippets.

View Khalian's full-sized avatar

Arunav Sanyal Khalian

  • Vancouver, BC, Canada
View GitHub Profile
@Khalian
Khalian / tinyurl.sh
Created July 2, 2017 02:44
Create Tiny url in cli.
#!/bin/sh
wget -q -O - \
-U "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.8) Gecko/20071008 Firefox/2.0.0.8" \
--header="Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1" \
--header="Accept-Language: en" \
--header="Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7" \
--referer="http://tinyurl.com/" \
--header="Content-Type: application/x-www-form-urlencoded" \
--post-data="url=$*" \
http://tinyurl.com/create.php \
@Khalian
Khalian / remcharafter
Created August 6, 2017 07:51
Remove all characters after a given character.
#!/bin/sh
if [ "$#" -ne 1 ]; then
echo "Usage: remcharafter character"
exit 1
fi
cut -f1 -d"$1"
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Mac specific stuff
alias rmDerivedData="rm -rf ~/Library/Developer/Xcode/DerivedData"
alias cdDerivedData="cd ~/Library/Developer/Xcode/DerivedData"
# FZF specific stuff
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
export FZF_DEFAULT_OPTS='--height 40% --reverse --border'
alias tb="nc termbin.com 9999"
# Git specific stuff
#!/bin/sh
ln -s ~/.vim ~/.config/nvim
ln -s ~/.vimrc ~/.config/nvim/init.vim
tnoremap <Esc> <C-\><C-n>
tnoremap jj <C-\><C-n>
au TermOpen * set number
@Khalian
Khalian / ideavimrc
Last active November 8, 2022 22:50
let mapleader = ";"
imap jj <Esc>
set timeoutlen=1000
nmap <Leader>c :action GotoClass<CR>
nmap <Leader>s :action GotoSymbol<CR>
nmap <Leader>fi :action GotoFile<CR>
nmap <Leader>d :action GotoDeclaration<CR>
nmap <Leader>td :action GotoTypeDeclaration<CR>
nmap <Leader>b :action Back<CR>
[user]
email = arunav.sanyal91@gmail.com
name = Arunav Sanyal
signingkey = 352742D0A2C6851A
[color]
ui = true
[core]
pager = diff-so-fancy | less --tabs=4 -RFX
editor = nvr --remote-wait-silent
[push]
@Khalian
Khalian / install_neovim_to_amazonlinux.sh
Created September 11, 2017 07:24 — forked from kawaz/install_neovim_to_amazonlinux.sh
install neovim to amazonlinux
#!/usr/bin/env bash
sudo yum groups install -y Development\ tools
sudo yum install -y cmake
sudo yum install -y python34-{devel,pip}
sudo pip-3.4 install neovim --upgrade
(
cd "$(mktemp -d)"
git clone https://github.com/neovim/neovim.git
cd neovim
make CMAKE_BUILD_TYPE=Release
sudo find . -xdev -type f | cut -d "/" -f 2 | sort | uniq -c | sort -n