This file contains hidden or 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/bash | |
# | |
# download a youtube URL using yt-dlp | |
# | |
# before using: | |
# | |
# - create Python virtual environment | |
# - `pip install yt-dlp` | |
# | |
URL="$1" |
This file contains hidden or 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/bash | |
# | |
# | |
# simple function to check for existence of a binary on the current | |
# path | |
# | |
checkExists() { | |
bin=`command -v $1` | |
if [ -z "$bin" ] | |
then |
This file contains hidden or 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 running config from an IOS-XR device and print out some | |
# interface information. Shows how to use the jxmlease library | |
# for when you'd rather have JSON but have to deal with XML! | |
# | |
from ncclient import manager | |
import jxmlease | |
HOST = '127.0.0.1' | |
PORT = 8303 |
This file contains hidden or 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 python | |
import pyang | |
import argparse | |
import os | |
parser = argparse.ArgumentParser(description='rename a list of yang model files by the revision information') | |
parser.add_argument('yang_files', type=str, nargs='+', | |
help='list of yang files') | |
args = parser.parse_args() |