Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Example:
# ./getopts-demo.sh -a42 -l Beeblebrox -c "Sector ZZ9 Plural Z Alpha" -f Zaphod
if [[ -z $1 ]]
then
echo 'Usage: ./getopts-demo.sh -f <first name> -l <last name> -a <age> -g <gender> -c <country>'
exit 1
fi
@srikanthmanda
srikanthmanda / setup-ish.sh
Created July 17, 2021 19:05
Setting up dev-tools on iOS, using iSH app
# iSH app: https://ish.app/
# Installing Alpine Linux APK packages: https://wiki.alpinelinux.org/wiki/Alpine_newbie_apk_packages#install_basic_tools
# BusyBox: https://busybox.net/
# Update APK repositories and upgrade packages
apk update
apk upgrade
# Note: iSH comes packaged with BusyBox `grep`, `less` and `sed`
which grep less sed > ~/original_versions.log
@srikanthmanda
srikanthmanda / tls-ssl-openssl.md
Last active June 20, 2021 19:13
Brief notes on TLS/SSL keys and certificates, their file formats and converting them using OpenSSL.

TLS/SSL & OpenSSL

Brief notes on TLS/SSL private keys and certificates, their various formats and converting them to different formats using OpenSSL.

Resources & References

@srikanthmanda
srikanthmanda / sec-comms.md
Created January 23, 2021 16:40
Some notes on Cryptography, Security, PKI, TLS

Secure Communications

What? Keeping secrets secret.

How? Encryption.

What is Encryption?

Turning something intelligible i.e., which can be understood/comprehended easily, into something unintelligible i.e., meaningless.

@srikanthmanda
srikanthmanda / win-term-settings.json
Created November 22, 2020 10:24
Windows Terminal Settings
// This file was initially generated by Windows Terminal 1.1.2233.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
@srikanthmanda
srikanthmanda / keyboard-shortcuts.md
Last active November 22, 2020 10:28
Keyboard Shortcuts

VS Code

  • CTRL + SHIFT + L: Select word under cursor
  • SHIFT + ALT + RIGHT ARROW: Expand selection

Git Tips

Amend a Commit

git commit -a -m "wrong commit, needs changes"    # commit only staged changes, miss untracked changes
git add forgotten_file edited_file ...            # stage the changes to fix previous commit
git commit --amend --no-edit                      # commit staged changes, without editing commit message
git commit --amend -m "revised commit message"    # edit commit message, and commits staged changes if any
@srikanthmanda
srikanthmanda / html-tags.md
Created October 31, 2020 15:15
HTML Tags

HTML Tags

  • <mark> tag applies background colour to highlight content.
  • <kbd> tag is to indicate keyboard strokes/keys, usually user input.
@srikanthmanda
srikanthmanda / infrequently-used-commands.md
Last active November 1, 2020 09:10
Infrequently Used Commands

Infrequently Used Commands

PowerShell

Print PowerShell environment variable

$env:<variable>

Python