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/env python3 | |
import sys | |
import ipaddress | |
CYAN = '\033[96m' | |
END = '\033[0m' | |
BOLD = '\033[1m' | |
if len(sys.argv) < 2: |
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
[ | |
{"name": "eDP-1", "workspaces": [1, 5]}, | |
{"name": "DP-1", "workspaces": [3, 4]}, | |
{"name": "HDMI-A-1", "workspaces": [2, 6, 7]} | |
] |
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/env python3 | |
# HEADS UP: Requires that kubeconfig files be named `config.description`!!! | |
from iterfzf import iterfzf | |
import glob | |
import os | |
import shutil | |
searchpath = "/.kube/config.*" |
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/env python3 | |
import socket | |
import pymysql | |
username = "A USERNAME" | |
password = "A REALLY GOOD PASSWORD" | |
hostname = "SOME HOSTNAME OR IP" | |
def is_port_open(host, port): |
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/env python3 | |
from bs4 import BeautifulSoup | |
import urllib.request, urllib.error, urllib.parse | |
source_url = 'https://docs.google.com/spreadsheets/u/0/d/e/2PACX-1vR30F8lYP3jG7YOq8es0PBpJIE5yvRVZffOyaqC0GgMBN6yt0Q-NI8pxS7hd1F9dYXnowSC6zpZmW9D/pubhtml/sheet?gid=0' | |
def get_table_rows(url): | |
response = urllib.request.urlopen(url) |
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/env python3 | |
import os | |
import markdown | |
from subprocess import Popen, DEVNULL | |
from rofi import Rofi | |
r = Rofi() | |
# Path to data docs | |
data_dir = 'terraform-provider-aws/website/docs/d' |
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
# $OpenBSD: sshd_config,v 1.100 2016/08/15 12:32:04 naddy Exp $ | |
# This is the sshd server system-wide configuration file. See | |
# sshd_config(5) for more information. | |
# This sshd was compiled with PATH=/usr/local/bin:/usr/bin | |
# The strategy used for options in the default sshd_config shipped with | |
# OpenSSH is to specify options with their default value where | |
# possible, but leave them commented. Uncommented options override the |
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/env python3 | |
import subprocess | |
BROWSER = "vivaldi-snapshot" | |
def git_remote_to_url(branch): | |
remotev = subprocess.check_output(["git", "remote", "-v"]).decode("utf-8") | |
remote = remotev.split('\t')[1].split(' (fetch)')[0] | |
url = convert_uri(remote) |
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/env python3 | |
import requests | |
import json | |
import pyowm | |
geolocation_api_uri = "http://ip-api.com/json/?fields=49344" | |
def get_coord(): | |
r = requests.get(geolocation_api_uri) |
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
######################### | |
## Basic Configuration ## | |
######################### | |
site: datadoghq.com | |
skip_ssl_validation: false | |
# force_tls_12: false | |
tags: | |
- environment:dev | |
- dd_agent:true |