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
https://docs.gitlab.com/ee/user/project/integrations/prometheus_library/nginx_ingress.html Alerting for nginx ingress | |
https://stackoverflow.com/a/14637461 Correct setup for iptables port forwarding |
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
#!/bin/sh | |
kubectl get node | grep $1 | awk '{print $1}' | while read instance; do printf "\ninstance: $instance\n======\n"; kubectl get po -A --no-headers --field-selector spec.nodeName=$instance; done |
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
# coding: utf-8 | |
import math | |
def transpose(matrix): | |
row_length = len(matrix[0]) | |
transpose_matrix = [[] for _ in range(row_length)] | |
for i, m1 in enumerate(matrix): | |
for j, m2 in enumerate(m1): |
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
/* | |
* Objectives: | |
* 1. Bind TCP port | |
* 2. Listen for messages | |
* 3. Parse HTTP request contents | |
* 4. direct request to a route (function) | |
* 5. build response | |
* 6. send response | |
* 7. contine listening to requests | |
*/ |
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
#!/bin/sh | |
set -e | |
echo "Updating remote state" | |
git fetch --prune | |
BRANCHES=$(git branch -vv | grep -e 'gone]' | awk '{ print $1 }') | |
echo "Branches to delete locally:" |
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
# Author :taigacute | |
set -g @plugin 'tmux-plugins/tpm' | |
set -g @plugin 'tmux-plugins/tmux-resurrect' | |
set -g @plugin 'tmux-plugins/tmux-continuum' | |
set -g @plugin 'tmux-plugins/tmux-prefix-highlight' | |
set -g @plugin 'tmux-plugins/tmux-urlview' | |
set -g @plugin 'tmux-plugins/tmux-battery' | |
set -g @plugin 'tmux-plugins/tmux-cpu' | |
set -g @plugin 'samoshkin/tmux-plugin-sysstat' |
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
" Configure the editor itself | |
set background=dark | |
set title | |
set ignorecase | |
set smartcase | |
set wrap | |
set autoindent | |
set copyindent | |
set smartindent | |
set number |
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 a="alias" # extremely useful | |
# Open a given ansible module's documentation in the currently open browser as a new tab | |
# example: ansearch copy | |
ansearch() { | |
python -m webbrowser -t "https://docs.ansible.com/ansible/latest/modules/$1_module.html" >/dev/null | |
} | |
# Open all file in current directory matching an extension as tabs | |
# example: vimt tf # open all terraform files as tabs |
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
#!/usr/bin/python3 | |
import lxml.etree | |
import requests | |
url = 'http://www.yr.no/sted/Argentina/Distrito_Federal/Buenos_Aires/forecast_hour_by_hour.xml' | |
icons = {'02d': u'\uf00c', '42d': u'\uf0b2', '20n': u'\uf01d', '24d': u'\uf00e', '48': u'\uf0b5', '02n': u'\uf081', '22': u'\uf01d', '26n': u'\uf06a', '28d': u'\uf06b', '21n': u'\uf06d', '08n': u'\uf01b', '26d': u'\uf068', '01d': u'\uf00d', '08d': u'\uf01b', '29n': u'\uf06d', '04': u'\uf041', '23': u'\uf01d', '25n': u'\uf01e', '47': u'\uf0b5', '29d': u'\uf06b', '09': u'\uf01a', '27n': u'\uf01d', '46': u'\uf01c', '43d': u'\uf0b2', '50': u'\uf01b', '06n': u'\uf01d', '44n': u'\uf02a', '41d': u'\uf019', '05n': u'\uf029', '24n': u'\uf02c', '03n': u'\uf086', '05d': u'\uf009', '20d': u'\uf01d', '03d': u'\uf002', '42n': u'\uf0b4', '07d': u'\uf0b2', '40d': u'\uf00b', '25d': u'\uf01e', '01n': u'\uf02e', '45n': u'\uf01b', '07n': u'\uf0b4', '45d': u'\uf01b', '11': u'\uf01d', '10': u'\uf019', '13': u'\uf01b', '12': u'\uf0b5', '15': u'\uf014', '14': u'\uf01d', '28n': u'\uf0 |
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
#!bin/sh | |
################################## | |
# Winboot flash drive automation # | |
# Author: Lucio Delelis # | |
################################## | |
# CREDIT TO USER Cornelius in askubuntu for the procedure | |
if [ "$#" -ne 2 ] || ! [ -d $2 ]; then |