Skip to content

Instantly share code, notes, and snippets.

View RustyNails8's full-sized avatar

Sumit Das RustyNails8

View GitHub Profile
@RustyNails8
RustyNails8 / bashrc_append.txt
Last active April 1, 2024 04:55
bash_alias
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
@RustyNails8
RustyNails8 / hostAgentStuff.sh
Created April 14, 2023 18:52 — forked from wuftymerguftyguff/hostAgentStuff.sh
Useful SAP HostAgent commands
#GET A LIST OF INSTANCES
#/usr/sap/hostctrl/exe/saphostctrl -function Listinstances -format Script
#GET A LIST of databases
saphostctrl -nr 99 -function Listdatabases
# manage a db with the host agent
# /usr/sap/hostctrl/exe/saphostctrl -nr 99 -function StopDatabase -dbname NPL -dbtype ada -user sapadm passwd
#query a db with the host agent

Enterprise Scale for SAP on Azure Deployment Automation Framework - Hands-on Lab

Refernce

Reference

Workstation Preparation

Spin up Ubuntu droplet from Digital Ocean

@RustyNails8
RustyNails8 / countdown.ps1
Created February 10, 2023 05:21
Countdown in powershell
for ($seconds=10; $seconds -gt -1; $seconds--) {
Write-Host -NoNewLine ("`rseconds remaining: " + ("{0:d4}" -f $seconds))
Start-Sleep -Seconds 1
}
@RustyNails8
RustyNails8 / .bashrc
Created January 3, 2023 06:14
GitHub Codespaces bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the active virtualenv
# * the branch/status of the current git repository
# * the return value of the previous command
# * the fact you just came from Windows and are used to having newlines in
# your prompts.
@RustyNails8
RustyNails8 / README-Badge.md
Created October 16, 2022 06:19
Badges in README

README.md

Closed in Dev Developers

README.md

Open in Dev Developers

RED for Pending/Backlog/Not Started #f03c15

YELLOW for In Progress/Started/Testing #ffff00

GREEN for Completed/Done #c5f015

@RustyNails8
RustyNails8 / Git-graph-alias
Last active December 13, 2020 11:09
Alias for git graph command line
```
[alias]
lg = lg1
lg1 = lg1-specific --all
lg2 = lg2-specific --all
lg3 = lg3-specific --all
lg1-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(auto)%d%C(reset)'
lg2-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(auto)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)'
lg3-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset) %C(bold cyan)(committed: %cD)%C(reset) %C(auto)%d%C(reset)%n'' %C(white)%s%C(reset)%n'' %C(dim white)- %an <%ae> %C(reset) %C(dim white)(committer: %cn <%ce>)%C(reset)'
@RustyNails8
RustyNails8 / WebTableScraper.py
Created November 22, 2020 18:22
Scrape tables from any website
import pandas as pd
url = r'https://en.wikipedia.org/wiki/List_of_S%26P_500_companies'
tables = pd.read_html(url) # Returns list of all tables on page
print(tables)
sp500_table = tables[0] # Select table of interest
print(sp500_table)
# https://stackoverflow.com/questions/6325216/parse-html-table-to-python-list