Skip to content

Instantly share code, notes, and snippets.

View thiagorider's full-sized avatar
💡
We are what we repeatedly do. Excellence, then, is not an act but a habit.

Thiago Rider Augusto thiagorider

💡
We are what we repeatedly do. Excellence, then, is not an act but a habit.
View GitHub Profile
#!/bin/bash
# EKS Addons Compatibility Script
if [ -z "$1" ]; then
echo "Usage: $0 <kubernetes_version>"
exit 1
fi
k8s_version=$1
@thiagorider
thiagorider / Get_IP.md
Last active April 14, 2023 13:14
Get IP

Get IP from your current machine everywhere:

curl https://checkip.amazonaws.com

curl -s https://api.ipify.org -w "\n"""

curl https://icanhazip.com

curl https://ipinfo.io/ip && echo ""

@thiagorider
thiagorider / az_pipelines.md
Last active January 26, 2023 19:03
az pipelines CLI (az CLI Extension) cheatsheet

az pipelines CLI (az CLI Extension) cheatsheet

Extension Installation

$ az extension add --name azure-devops

Setting a default organization

$ az devops configure --defaults organization=https://dev.azure.com/<org_name>/

@thiagorider
thiagorider / output.js
Created September 21, 2022 22:21 — forked from derhuerst/output.js
how fetch a GitHub user's stars
[
{
owner: 'bcoe',
repo: 'top-npm-users',
description: ':star: Generate a list of top npm users by based on monthly downloads.',
language: 'JavaScript',
isFork: false,
stargazers: 27,
watchers: 27
}
@thiagorider
thiagorider / dash_to_panel.cfg
Created September 13, 2021 03:29
Dash-to-Panel exported configurations
[/]
animate-app-switch=false
animate-appicon-hover=true
animate-appicon-hover-animation-convexity={'RIPPLE': 2.0, 'PLANK': 1.0, 'SIMPLE': 0.0}
animate-appicon-hover-animation-extent={'RIPPLE': 4, 'PLANK': 4, 'SIMPLE': 1}
animate-appicon-hover-animation-type='SIMPLE'
animate-show-apps=false
animate-window-launch=false
appicon-padding=4
available-monitors=[1, 0]
@thiagorider
thiagorider / bash_scripting_check_dependencies.sh
Created October 11, 2016 12:56
Check dependencies on executables in a script.
#!/bin/sh
s=0
if [ -x "$(which curl)" ] ; then #This is the best option for checking...
echo "Utility ...... curl [ ok ]"
else
echo "Utility ...... curl [fail]"
s=1
#!/usr/bin/python3
def main():
print("This is the main function")
test()
def test():
print("This is a test")
if __name__ == "__main__": main()
@thiagorider
thiagorider / bash_scripting_correct_number_of_parameters.sh
Created September 12, 2016 20:55
Bash script snippets - Correct number of parameters
#!/bin/sh
E_WRONG_ARGS=85
script_parameters="-a -h -m -z"
# -a = all, -h = help, etc.
if [ $# -ne $Number_of_expected_args ]
then
echo "Usage: `basename $0` $script_parameters"
# `basename $0` is the script's filename.
@thiagorider
thiagorider / bash_scripting_sha_bangs.sh
Last active September 12, 2016 21:06
Bash script snippets - Sha-bangs
#The sha-bang#
# The sha-bang ( #!) [1] at the head of a script tells your system that this file is a set of commands to be fed to the command
# interpreter indicated. The #! is actually a two-byte [2] magic number, a special marker that designates a file type, or in this
# case an executable shell script (type man magic for more details on this fascinating topic). Immediately following the sha-bang
# is a path name. This is the path to the program that interprets the commands in the script, whether it be a shell, a
# programming language, or a utility. This command interpreter then executes the commands in the script, starting at the top (the
# line following the sha-bang line), and ignoring comments.
#!/bin/sh