Skip to content

Instantly share code, notes, and snippets.

@ikouchiha47
ikouchiha47 / .vimrc
Last active February 16, 2024 08:22
"
" 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.
@ikouchiha47
ikouchiha47 / Resume.md
Last active February 11, 2024 18:30
New Resume
@ikouchiha47
ikouchiha47 / aws_deploy.tf
Last active December 10, 2023 22:20
AWS ECS Deploy
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')
@ikouchiha47
ikouchiha47 / disinct_islands_opt.cpp
Last active September 3, 2020 06:39
Running speed difference
#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)
@ikouchiha47
ikouchiha47 / compile.sh
Last active July 12, 2024 11:46
Resume
# 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)