Skip to content

Instantly share code, notes, and snippets.

View KunalSin9h's full-sized avatar

Kunal Singh KunalSin9h

View GitHub Profile
```bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
source ~/.bashrc
nvm install 20
nvm use 20
```
https://www.hackerearth.com/challenges/college/coding_2025-test-2/?login=86489a8a9d20b2fea2badb86be0fc21e
@KunalSin9h
KunalSin9h / android.md
Created December 31, 2023 06:11
Working with Android Applications

Create a KeyStore

keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000

Build Android Application Package

bundletool build-apks --bundle=/MyApp/my_app.aab --output=/MyApp/my_app.apks
 --ks=/MyApp/keystore.jks
@KunalSin9h
KunalSin9h / setup_containerd.sh
Last active November 11, 2023 09:07
Install and setup containerd on Ubuntu
#! /bin/bash
TMPROOT=$(mktemp -d)
cd /$TMPROOT
SUDO=''
if (( $EUID != 0 )); then
SUDO='sudo'
fi

1 Clearn Package Cache

1.1 remove cache package which are not installed

sudo pacman -Sc

1.1 remove all cache package files

sudo pacman -Scc

These are only examples, for a few very common actions. You are expected to write your own rules for the rest. The syntax is regular JavaScript, but see the polkit(8) manpage for the object structure and available API. These examples are for polkit versions 106 and later, with the JS interpreter. They won't work with Debian's polkit v105.

  • If you don't know the action name, run pkaction:

    pkaction | grep cups
    
  • The possible results are YES, AUTH_SELF(_KEEP), AUTH_ADMIN(_KEEP), NO. Returning a result is final. Returning null will continue checking other rules.

  • Put your rules in /etc/polkit-1/rules.d/*.rules. (You can check everything in one giant addRule, or you can have a separate file and separate addRule for each program; it doesn't matter.)

Tech-savvy users know you can easily connect to a Linux server using various secure shell (SSH) clients. If you prefer – or are required – to use a tool with a graphical user interface (GUI), the solution is X11 forwarding.

What is X11 forwarding?

X11 forwarding is a mechanism that allows a user to start up remote applications, and then forward the application display to their local Windows machine. It enables you to run GUIs from a local server. It’s essentially remote desktop software that looks better on your screen and is easier to work with.

For Arch linux, Install qemu-full

sudo pacman -S qemu-full

Now create an image

qemu-img create -f qcow2 {LinuxDistro}Image.img 10G
@KunalSin9h
KunalSin9h / bash_strict_mode.md
Created August 3, 2023 15:39 — forked from mohanpedala/bash_strict_mode.md
set -e, -u, -o, -x pipefail explanation