This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* C# Program to Convert Roman to Arabic Numerals | |
*/ | |
static int RomanToInt(int decimalNumber, int i, string romanString) | |
{ | |
var romanChar = TryGetCharAt(romanString, i); | |
return romanChar switch | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias k=kubectl | |
kubeadm init --apiserver-advertise-address $(hostname -i) --pod-network-cidr 10.5.0.0/16 | |
k apply -f https://raw.githubusercontent.com/cloudnativelabs/kube-router/master/daemonset/kubeadm-kuberouter.yaml | |
complete -F __start_kubectl k | |
export do="--dry-run=client -o yaml" | |
export dd "--grace-period=0 --force" | |
k get node node1 -o custom-colums=NODE:.spec.taints |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use of Bang ! | |
grep <word> <file> | |
cat <file> | |
# It will call the closest command found in history | |
!grep | |
# Repeats the last command | |
!! | |
# Repeats command by history number | |
# !5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Useful Commands | |
Get kubectl version | |
kubectl version | |
Get cluster info: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git log --all --full-history -p -- .\appsettings.qa.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-Command # Retrieves a list of all the commands available to PowerShell | |
# (native binaries in $env:PATH + cmdlets / functions from PowerShell modules) | |
Get-Command -Module Microsoft* # Retrieves a list of all the PowerShell commands exported from modules named Microsoft* | |
Get-Command -Name *item # Retrieves a list of all commands (native binaries + PowerShell commands) ending in "item" | |
Get-Help # Get all help topics | |
Get-Help -Name about_Variables # Get help for a specific about_* topic (aka. man page) | |
Get-Help -Name Get-Command # Get help for a specific PowerShell function | |
Get-Help -Name Get-Command -Parameter Module # Get help for a specific parameter on a specific command |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## This script merges all pdf files in a folder into one pdf file | |
## Usage: python pdfmerger.py <path to folder with pdf files> <path to output file> | |
## Example: python pdfmerger.py ./pdfs ./merged.pdf | |
## Author: @asahicantu | |
## Date: 2021-10-07 | |
## Version: 1.0 | |
## License: MIT | |
## Requirements: pypdf | |
## Tested on: Windows 10 | |
## How to use: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
az webapp identity assign --name "<your-webapp-name>" --resource-group "myResourceGroup" | |
az keyvault set-policy --name "<your-keyvault-name>" --object-id "<principalId>" --secret-permissions get list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## List all wifi profiles | |
netsh wlan show profiles | |
## List all wifi profiles with key | |
netsh wlan show profiles key = clear | |
## List a specific wifi profile | |
netsh wlan show profile name = $wifi_name | |
## List a specific wifi profile with key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<xsl:stylesheet version="1.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<xsl:template name="string-replace-all"> | |
<xsl:param name="text" /> | |
<xsl:param name="replace" /> | |
<xsl:param name="by" /> | |
<xsl:choose> | |
<xsl:when test="contains($text, $replace)"> |
NewerOlder