Skip to content

Instantly share code, notes, and snippets.

View r4vr4n's full-sized avatar
🏠
Working from home

rajeev r4vr4n

🏠
Working from home
  • India
View GitHub Profile
sudo dnf install qemu-kvm libvirt-daemon-driver-network cockpit cockpit-machines
sudo systemctl enable --now libvirtd
sudo systemctl enable --now cockpit.socket
sudo firewall-cmd --add-service=cockpit
sudo firewall-cmd --add-service=cockpit --permanent
sudo dnf install virt-install virt-top libvirt-client
@r4vr4n
r4vr4n / better_powershell.md
Created January 16, 2025 16:35 — forked from mh-firouzjah/better_powershell.md
how to add zsh-like theme and feature to windows powershell

Better PowerShell

Theme | History | KeyBinding

MyPowershell

in order to make windows powershell more comfortable and add a some theme and features like history binding, auto complete on keypress and so on, if you have used linux teminl wiht zsh for example, we are going to make powershell like that as much as we can.

What we will achieve

@r4vr4n
r4vr4n / terminal-setup.md
Created January 16, 2025 14:49 — forked from UnitedWithCode/terminal-setup.md
Setting up a decent looking Windows Terminal with Oh-my-Posh that works with WSL and integrate it in VSCode and IntelliJ

Setting up a decent looking Windows Terminal with Oh-my-Posh that works with WSL and integrate it in VSCode and IntelliJ

This is a briefly summary of what I did to set up my Windows Terminal for Powershell on the Windows side and Zsh on the WSL(Ubuntu) side and integrate it in VSCode and IntelliJ.

powershell         zsh

@r4vr4n
r4vr4n / setup-my-terminal-unattended.txt
Last active November 22, 2024 06:15
setup-my-terminal-unattended
# Elevate privileges and keep sudo active
sudo -v && \
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & \
# Install required packages: git, zsh, and curl (non-interactive)
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y git zsh curl && \
# Install Oh My Zsh without user prompts
yes | sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" && \
@r4vr4n
r4vr4n / setup-my-terminal.txt
Last active November 22, 2024 06:01
fresh terminal setup linux
# Install required packages: git, zsh, curl and build-essential
sudo apt-get install git zsh curl build-essential -y && \
# Install Oh My Zsh - a framework for managing zsh configuration
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" && \
# Install Homebrew - package manager for Linux/macOS
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" && \
# Add Homebrew to PATH by adding it to .zshrc
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> ~/.zshrc && \
# Initialize Homebrew in current session
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" && \
/**
* v0 by Vercel.
* @see https://v0.dev/t/QdTQNouNGbX
* Documentation: https://v0.dev/docs#integrating-generated-code-into-your-nextjs-app
*/
import Link from "next/link"
import { Avatar, AvatarImage, AvatarFallback } from "@/components/ui/avatar"
import { Label } from "@/components/ui/label"
import { Input } from "@/components/ui/input"
import { Textarea } from "@/components/ui/textarea"
@r4vr4n
r4vr4n / docker-help.md
Created February 1, 2022 10:09 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

@r4vr4n
r4vr4n / typescript-crash.ts
Created November 7, 2021 20:22 — forked from bradtraversy/typescript-crash.ts
Basic intro to TypeScript (From YouTube Crash Course)
// Basic Types
let id: number = 5
let company: string = 'Traversy Media'
let isPublished: boolean = true
let x: any = 'Hello'
let ids: number[] = [1, 2, 3, 4, 5]
let arr: any[] = [1, true, 'Hello']
// Tuple
@r4vr4n
r4vr4n / vs-code-keymap
Last active October 13, 2021 09:16
my-vs-code-keyboard-shortcuts
// Place your key bindings in this file to override the defaultsauto[]
[
{
"key": "numpad_divide",
"command": "editor.action.addCommentLine",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "ctrl+k ctrl+c",
"command": "-editor.action.addCommentLine",
@r4vr4n
r4vr4n / token-generator.js
Created August 3, 2021 10:56 — forked from ziluvatar/token-generator.js
Example of refreshing tokens with jwt
/**
* Example to refresh tokens using https://github.com/auth0/node-jsonwebtoken
* It was requested to be introduced at as part of the jsonwebtoken library,
* since we feel it does not add too much value but it will add code to mantain
* we won't include it.
*
* I create this gist just to help those who want to auto-refresh JWTs.
*/
const jwt = require('jsonwebtoken');