Skip to content

Instantly share code, notes, and snippets.

View DNI9's full-sized avatar
🐧

DNI9 DNI9

🐧
  • India
View GitHub Profile
const fs = require("fs");
const path = require("path");
const DRY_RUN = false;
const EXTERNAL_LINE = "External Policy Admin Page";
const PCN_INFO_LINE = "Policy Change Notice Information";
const NEXT_PAGE_LINE = "And Goto Next Page";
/**
@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"
@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 / android-backup-apk-and-datas.md
Created March 30, 2022 15:24 — forked from AnatomicJC/android-backup-apk-and-datas.md
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !

Fetch application APK

@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 / FirefoxDeveloperEdition.desktop
Created March 15, 2021 16:01
Firefox Developer Edition Desktop File for Linux
[Desktop Entry]
Version=1.0
Name=Firefox Developer Edition
GenericName=Web Browser
Exec=/opt/firefox/firefox %U
Terminal=false
StartupNotify=true
Icon=/opt/firefox/browser/chrome/icons/default/default128.png
Type=Application
Categories=Network;WebBrowser;Favorites;
@DNI9
DNI9 / README.md
Created March 11, 2021 21:01 — forked from revant/README.md
Arch Linux on Lenovo IdeaPad 330-15ARR

Required Kernel params

loglevel=3 iommu=pt acpi_backlight=native
  • iommu=pt Solves sudden freeze of graphics Arch Forum Link
  • acpi_backlight=native Solves back light "failed" message during boot Arch Wiki
  • Use it with other params e.g. loglevel=3 iommu=pt acpi_backlight=native apparmor=1 security=apparmor quiet
@DNI9
DNI9 / Manjaro.md
Created March 11, 2021 21:01 — forked from marcorichetta/Manjaro.md
Manjaro KDE Installation on Lenovo Ideapad 330S-15ARR

Booting Manjaro

  1. Download latest Manjaro Architect iso
  2. Burn the iso to a usb following the steps from the Manjaro wiki
  3. On Lenovo BIOS
    1. Disable Secure boot
    2. Set USB boot configuration on UEFI only.
    3. Save changes and press F12 to choose from boot menu.
  4. On Manjaro GRUB menu, add the ivrs_ioapic[32]=00:14.0 grub parameter. Source
#!/usr/bin/env python3
# NOTE: This is only useful until Meson 0.38.0 which includes an `uninstall` target.
import argparse
from contextlib import suppress
from os import path, remove
parser = argparse.ArgumentParser()
parser.add_argument('--dry-run', action='store_true')