This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" | |
# Brew installations | |
brew cask install alacritty | |
brew install git | |
brew install byobu | |
brew install mosh | |
brew install openssh | |
brew install python3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set runtimepath+=~/.vim_runtime | |
source ~/.vim_runtime/vimrcs/basic.vim | |
source ~/.vim_runtime/vimrcs/filetypes.vim | |
source ~/.vim_runtime/vimrcs/plugins_config.vim | |
source ~/.vim_runtime/vimrcs/extended.vim | |
try | |
source ~/.vim_runtime/my_configs.vim | |
catch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# ARE YOU A VIMPLETON? DONT YOU WISH YOU HAD A RAD VIM SETUP. WELL LOOK NO FURTHER. INTRODUCTING, THE ULTIMATE VIM CONFIG. | |
# FULLY ASYNCRHONOUS, NON BLOCKING VIM!!!! | |
# Tested on Amazon Linux 2017 (and by extension RHEL and Fedora machines). | |
# First install neovim | |
wget https://gist.githubusercontent.com/Khalian/ebd345b418b6f42a0359b4c89961af4c/raw/a69a496caf247d40535bc194fa2f08923c63d072/install_neovim_to_amazonlinux.sh | |
sh install_neovim_to_amazonlinux.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Inspiration : https://alvinalexander.com/scala/fp-book/type-classes-101-introduction | |
// Purpose : Adhoc polymorphsim | |
// Define some types | |
case class Dog(name: String, breed: String) | |
// Define the type class | |
trait Animal[A] { | |
def sound(a: A): Unit | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A classic definition of functor, applicative and monad. | |
trait Functor[T[_]] { | |
def apply[A](a: A): T[A] | |
def map[A, B](f: A => B)(a: T[A]): T[B] | |
} | |
trait Applicative[T[_]] extends Functor[T[_]] { | |
def pmap[A, B](f: T[A => B])(a : T[A]) : T[B] | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scala.annotation.tailrec | |
import scala.collection.immutable.{Queue, Stack} | |
sealed trait Tree[T] { | |
def value: T | |
} | |
case class Node[T](value: T, children: List[Tree[T]]) extends Tree[T] | |
case class Leaf[T](value: T) extends Tree[T] | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ $# -ne 1 ] | |
then | |
echo "Usage: ./s3bucketRM.sh bucketNameSubstring" | |
exit 1 | |
fi | |
for bucket in $(aws s3 ls | awk '{print $3}'| grep $1); do aws s3 rb "s3://${bucket}" --force ; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Simple server init : python -m SimpleHTTPServer 8000 | |
Simple get request : echo -e "GET / HTTP/1.1" | nc localhost 8000 |
NewerOlder