Skip to content

Instantly share code, notes, and snippets.

View Aadv1k's full-sized avatar
🔨
Building

Aadvik Pandey Aadv1k

🔨
Building
View GitHub Profile
@Aadv1k
Aadv1k / init.lua
Last active December 25, 2023 12:36
Configuration file for Aadvik's Neovim v0.9+
-- File: init.lua
-- Description: Configuration file for Aadvik's Neovim v0.9+
-- Author: Aadvik <aadv1k@outlook.com>
-- License: Public Domain or Unilicense
vim.o.number = true
vim.o.relativenumber = true
vim.o.smartindent = true
vim.o.autoindent = true
@Aadv1k
Aadv1k / .tmux.conf
Created November 25, 2023 11:07
Created using GPT v3.5; Prompt "Give me a tmux config with the following - bind the c-b to c-a - set the status bar to be black and be at the top - use vim navigation "
# Use C-a instead of C-b as the prefix key
set -g prefix C-a
unbind C-b
bind C-a send-prefix
# Set status bar to be black and at the top
set -g status-bg black
set -g status-style fg=white
# Use vim-like navigation keys
@Aadv1k
Aadv1k / note.org
Created August 19, 2023 20:55
lessons learnt

Forcing your brain to do hard things

Here are some strategies for what I call “creative learning” essentially the idea is that creating something of value comes before anything else, any and all learning shall be done across the journey.

Problems with this approach

  • The cost out-weighs the reward: the reward of a “flashy new idea” wears down as harder challenges come up. It’s the classic conundrum of the “hype” dying down
  • Unable to come up with an inspirational idea: not all ideas are born the same, some are either wayy to complex or simply uninteresting (especially if the idea has already been implemented)
@Aadv1k
Aadv1k / reddit-image-downloader.js
Created July 19, 2023 08:56
Download images, given that a `data.json` file is present
const fs = require('fs');
const https = require('https');
function downloadImage(url, destinationPath) {
if (!url) {
console.error('Error: URL is empty.');
return;
}
https.get(url, (response) => {
@Aadv1k
Aadv1k / .emacs.lisp
Last active June 15, 2024 05:25
my emacs config after ~1.5~ 4 months of heavy usage. Contains evil-mode, magit along with goodies (and use-package!)
;; Package --- Summary: Functional, but simple evil emacs config.
;; Author: Aadvik <aadv1k@outlook.com>
;; License: Public Domain
;; URL: https://gist.github.com/Aadv1k/2bd92889f3a10a5ffb6298b8fb7d04bf
(defvar *HOME* "C:/Users/Aadv1k")
(setq default-directory *HOME*)
(setq-default default-directory *HOME*)
@Aadv1k
Aadv1k / .bashrc
Created February 3, 2023 07:56
A functional bashrc
#!/bin/bash
## CONFIG
HISTSIZE=5000
HISTFILESIZE=5000
set -o vi
## ALIASES
@Aadv1k
Aadv1k / leetcode.js
Last active June 23, 2022 13:15
program to fetch data from leetcode and generate tests + starter code
#!/usr/bin/env node
/*
* Author: Aadv1k<aadv1k@outlook.com>
* License: GNU Public License
* Source: https://gist.github.com/Aadv1k/bfa9f874345c6204e4871e66b2f6d99b
* Install: npx https://gist.github.com/Aadv1k/bfa9f874345c6204e4871e66b2f6d99b
*/
const axios = require("axios");
const cheerio = require("cheerio");
const { writeFileSync, existsSync, mkdirSync } = require("fs");
@Aadv1k
Aadv1k / _gvimrc
Created March 24, 2022 15:43
gvimrc
set guifont=consolas:h12
set termguicolors
set guioptions-=m " menu bar
set guioptions-=T " tool bar
set guioptions-=r " scroll bar
syntax on
set noerrorbells
@Aadv1k
Aadv1k / gruvbox.css
Created March 6, 2022 13:43
A simple gruvbox themed css file to 🌸beautify🌸 your html
@import url('https://fonts.googleapis.com/css2?family=Source+Code+Pro:wght@400;700&display=swap');
:root {
--main-bg-1: rgb(60,56,54);
--main-bg-2: rgb(40,40,40);
--main-bg-3: rgb(29,32,33);
--main-fg-1: #fbf1c7;
--main-fg-2: #ebdbb2;
--main-fg-3: #d5c4a1;
@Aadv1k
Aadv1k / typescript_tut.md
Created March 3, 2022 05:03
A simple typescript tutorial / reference cheat sheet

Typescript

Why?

  • Adds optional static types in JavaScript.
  • Makes the code more expressive.
  • Makes it easier to catch bugs in production.
  • Can translate to various ecmaScript version.

Usage