Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View vrkansagara's full-sized avatar
😀
Coding :-)

Vallabh Kansagara vrkansagara

😀
Coding :-)
View GitHub Profile
@vrkansagara
vrkansagara / bash-colors.md
Created November 26, 2023 04:24 — forked from JBlond/bash-colors.md
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
@vrkansagara
vrkansagara / oneliner.sh
Created November 21, 2023 05:16 — forked from royalgarter/oneliner.sh
Oneliners shellscript
System information commands
===========================
(*) #su Show only errors and warnings: `dmesg --level=err,warn`
(*) View dmesg output in human readable format: `dmesg -T`
(*) Get an audio notification if a new device is attached to your computer: `dmesg -tW -l notice | gawk '{ if ($4 == "Attached") { system("echo New device attached | espeak") } }`
(*) Dmesg: follow/wait for new kernel messages: `dmesg -w`
(*) The proper way to read kernel messages in realtime.: `dmesg -wx`
(*) Query graphics card: `lspci -nnk | grep -i VGA -A2`
@vrkansagara
vrkansagara / 1-setup.md
Created October 15, 2023 06:07 — forked from troyfontaine/1-setup.md
Signing your Git Commits using GPG on MacOS

Methods of Signing with a GPG Key on MacOS

Last updated September 21, 2022

This Gist explains how to do this using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.

There has been a number of comments on this gist regarding some issues around the pinentry-program and M1 Macs. I've finally gotten a chance to try things out on an M1 and I've updated the documentation in 2-using-gpg.md to reflect my findings.

127.0.0.1 localhost
127.0.0.1 localhost.localdomain
127.0.0.1 local
255.255.255.255 broadcasthost
::1 localhost
::1 ip6-localhost
::1 ip6-loopback
fe80::1%lo0 localhost
ff00::0 ip6-localnet
ff00::0 ip6-mcastprefix
" IdeaVim Wiki https://github.com/JetBrains/ideavim/wiki
" Find more examples here: https://jb.gg/share-ideavimrc
let mapleader=";"
""" Common settings -------------------------
set showmode
set scrolloff=5
" Do incremental searching.
set incsearch
@vrkansagara
vrkansagara / ApplicationHttpClient.ts
Last active July 15, 2022 06:30
Extending Angular HttpClient With Access Token Capability
import {
HttpClient,
HttpHeaders,
HttpParams,
HttpParamsOptions
} from '@angular/common/http';
import {Injectable, Injector} from '@angular/core';
import {Observable} from 'rxjs';
import {ConfigService} from '../../services/config.service';
@vrkansagara
vrkansagara / http-client.ts
Last active July 12, 2022 04:05 — forked from bbogdanov/http-client.ts
Extending Angular HttpClient
import {HttpClient, HttpErrorResponse, HttpHeaders, HttpParams} from '@angular/common/http';
import {Injectable} from '@angular/core';
import {Observable} from 'rxjs/Observable';
export interface IRequestOptions {
headers?: HttpHeaders;
observe?: 'body';
params?: HttpParams;
reportProgress?: boolean;
responseType?: 'json';
@vrkansagara
vrkansagara / phpstrom
Created March 23, 2022 07:21
phpstrom performance tune up parameters
-server
-Xms2048m
-Xmx2048m
-XX:NewSize=512m
-XX:MaxNewSize=512m
-XX:PermSize=512m
-XX:MaxPermSize=512m
-XX:+UseParNewGC
-XX:ParallelGCThreads=4
-XX:PretenureSizeThreshold=64m

Keybase proof

I hereby claim:

  • I am vrkansagara on github.
  • I am vrkansagara (https://keybase.io/vrkansagara) on keybase.
  • I have a public key whose fingerprint is E94C 9FE2 A11C 20EC 3285 59AA 8BA6 E7AB D811 2B3E

To claim this, I am signing this object:

@vrkansagara
vrkansagara / vrkansagara.gpg
Created November 5, 2021 11:13
VRKANSAGARA GPG PUBLIC KEY
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQGNBGGFDvEBDAC1LyO91W/dRPwIVFHULnMtNh3N3dgcShet1T/C+j1GRJ+RheGS
Ynmkc/DPx1BBjs3UeyvtQwvYSoULkfZ1GrBIPsCtF8wymMba8sPShUfelUMu02hG
g5L1cnLMnFR6vjbeWe8Qupg+W6vuDu1kWHB9dgKFP/oGSKVsRN6xTH2AFkG5SSLq
zgvyLRMcSpcjCFoOVuwcMx2H8GbAnMB1KA6x5JWm/k/Vf0L5bV4QqN/OJ1qtg5a/
Hp9EiXc3RykRvk7s3s8qTtqwffffp9+NR+6/Fj2fA9i95AcVhJmO8aSGPiZ5WrAj
9KnWr1FEzwIVkS/3/0P1fvjgNrDWIGEsnO+Xp43Yq1rD1U84h75qNyxmSBTmaUR/
7y/QrdTmF6hH7l66TgTsUC9+bUCsZMh0aKLOtuRNvJV6+peFaQCCEi/uWfxLQV3/
KKvmnhrpVb0x5yUhUkp5G3CFy0fKZRCIDPCVM+wsDn7ugEV/YttLAtXVHuNu9SJA