Skip to content

Instantly share code, notes, and snippets.

View DNI9's full-sized avatar
🐧

DNI9 DNI9

🐧
  • India
View GitHub Profile
@DNI9
DNI9 / setup-typescript-eslint-prettier.js
Created June 24, 2022 10:52 — forked from chill-cod3r/setup-typescript-eslint-prettier.js
Automate TypeScript ESLint Prettier + my opinionated ESLint rules
const fs = require('fs');
const cp = require('child_process');
const util = require('util');
const path = require('path');
const exec = util.promisify(cp.exec);
const writeFile = util.promisify(fs.writeFile);
const prettierConfigVscode = {
'editor.codeActionsOnSave': {
@DNI9
DNI9 / install.sh
Last active May 27, 2023 06:37
Install basic stuffs on newly installed arch distro: https://git.io/J9GnI
#!/usr/bin/env bash
check_package() {
if ! pacman -Qs "$1" >/dev/null; then
echo "$1 is not installed"
return 1
fi
}
promt() {
@DNI9
DNI9 / simple-backup.sh
Last active May 27, 2023 07:00
a simple backup script using rclone, can be run with anacron daily
#!/bin/bash
BACKUP_DIR="$HOME/Documents/conf/data/"
LOG_DIR="$HOME/Documents/conf"
LOG_FILE="backup-conf.log"
function handleLog() {
if [ $1 -eq 0 ]; then
echo "$(date +"%Y-%m-%d %H:%M:%S") => SUCCESS: $3 backup successful" | tee -a "$LOG_DIR/$LOG_FILE"
else
@DNI9
DNI9 / keybindings.json
Created December 11, 2023 20:46
VSCodeVim Settings
[
{
"key": "ctrl+j",
"command": "selectNextSuggestion",
"when": "vim.active && suggestWidgetVisible"
},
{
"key": "ctrl+k",
"command": "selectPrevSuggestion",
"when": "vim.active && suggestWidgetVisible"