amitava.dev@proton.me | @github | @linkedin | @blog
Bangalore, India
| " | |
| " A (not so) minimal vimrc. | |
| " | |
| " You want Vim, not vi. When Vim finds a vimrc, 'nocompatible' is set anyway. | |
| " We set it explicitely to make our position clear! | |
| set nocompatible | |
| filetype plugin indent on " Load plugins according to detected filetype. | |
| syntax on " Enable syntax highlighting. |
amitava.dev@proton.me | @github | @linkedin | @blog
Bangalore, India
| provider "aws" { | |
| region = "ap-south-1" | |
| } | |
| // Create vpc and add a subnet | |
| // Add a routing table and direct all traffic from internet | |
| // to the subnet | |
| resource "aws_vpc" "app_vpc" { | |
| cidr_block = "10.0.0.0/16" | |
| enable_dns_support = true |
| " vim-bootstrap 2021-08-18 07:26:00 | |
| "***************************************************************************** | |
| "" Vim-Plug core | |
| "***************************************************************************** | |
| let vimplug_exists=expand('~/./autoload/plug.vim') | |
| if has('win32')&&!has('win64') | |
| let curl_exists=expand('C:\Windows\Sysnative\curl.exe') | |
| else | |
| let curl_exists=expand('curl') |
| #include <bits/stdc++.h> | |
| #define ll long long | |
| #define vec vector | |
| #define MAX_INF 0x3f3f3f3 | |
| #define MIN_INF 0xc0c0c0c0 | |
| using namespace std; |
| #!/usr/bin/env python3 | |
| import os | |
| import sys | |
| import time | |
| import subprocess | |
| ## usage | |
| ## ./hot-reload.sh [directories] <command> | |
| ## Example: ./hot-reload.sh dir1 dir2 dir3 'make' |
| function! s:isEmptyLine(line) | |
| return a:line =~ '^\s*$' | |
| endfunction | |
| function! s:trim_spaces(l, r) | |
| return [trim(a:l), trim(a:r)] | |
| endfunction | |
| function! s:isCommented(line, left_literal, right_literal) | |
| let [l, r] = s:trim_spaces(a:left_literal, a:right_literal) |
| # Fonts: Roboto, FontAwesome, Source Sans Pro | |
| # | |
| # curl -fsSL https://typst.community/typst-install/install.sh | sh | |
| has_typst=$(which typst) | |
| if [[ -z "$has_typst" ]]; then | |
| curl -fsSL https://typst.community/typst-install/install.sh | sh | |
| fi | |
| typst compile resume.typ |
| set show-all-if-ambiguous on | |
| bind 'TAB:menu-complete |
| let data = process.argv[2] | |
| let unmarshalled = JSON.parse(data) | |
| function toCamelCase(key) { | |
| return key.split('_')(key).map(convertCase).join('') | |
| } | |
| function convertCase(key) { | |
| if(key.toLowerCase() == "id") return key.toUpperCase() | |
| return key[0].toUpperCase() + key.slice(1) |