Skip to content

Instantly share code, notes, and snippets.

View asahicantu's full-sized avatar

Asahi Cantu asahicantu

View GitHub Profile
@asahicantu
asahicantu / cross-stage-variables-azure-devops-yaml-pipeline.yml
Created May 14, 2025 13:05 — forked from rudfoss/cross-stage-variables-azure-devops-yaml-pipeline.yml
Cheat-sheet for setting and retrieving variables in Azure DevOps yaml pipelines across different steps, jobs and stages.
# Cheat-sheet for using dynamically defined variables between steps, jobs and stages in Azure DevOps Yaml Pipelines
# Documentation: https://learn.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch
trigger: none
pr: none
stages:
- stage: DefineVarStage
jobs:
- job: DefineVarJob
@asahicantu
asahicantu / cross-stage-variables-azure-devops-yaml-pipeline.yml
Created May 14, 2025 13:05 — forked from rudfoss/cross-stage-variables-azure-devops-yaml-pipeline.yml
Cheat-sheet for setting and retrieving variables in Azure DevOps yaml pipelines across different steps, jobs and stages.
# Cheat-sheet for using dynamically defined variables between steps, jobs and stages in Azure DevOps Yaml Pipelines
# Documentation: https://learn.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch
trigger: none
pr: none
stages:
- stage: DefineVarStage
jobs:
- job: DefineVarJob
using System.Globalization;
namespace NeoNatalie.Live.MAUI.Views.Controls;
public class DynamicRulerDrawable : IDrawable
{
private readonly DynamicRuler _ruler;
public DynamicRulerDrawable(DynamicRuler ruler)
{
@asahicantu
asahicantu / Program.cs
Created September 19, 2024 07:45
Roman to int C# Program
/*
* 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
{
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
@asahicantu
asahicantu / LinuxBasics.sh
Last active February 1, 2024 09:57
Linux commands
# 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
## Useful Commands
Get kubectl version
kubectl version
Get cluster info:
git log --all --full-history -p -- .\appsettings.qa.json
@asahicantu
asahicantu / cheatsheet.ps1
Created October 11, 2023 10:00 — forked from pcgeek86/cheatsheet.ps1
PowerShell Cheat Sheet / Quick Reference
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
@asahicantu
asahicantu / pdfmerger.py
Created July 26, 2023 12:55
This script merges all pdf files in a folder into one pdf file
## 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: