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
################################################################################### | |
# dgmgmt.py | |
# | |
# author: jason rahm | |
# tmsh script author: john alam | |
# | |
# usage: dgmgmt.py [-h] host user {add,modify,delete} datagroup dgvalues | |
# | |
# positional arguments: | |
# host BIG-IP IP/FQDN |
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
import csv | |
from datetime import datetime | |
from datetime import timedelta | |
__author__ = 'Jason Rahm' | |
# Assumes this script is in a <scripts> folder inside a cloned version of https://github.com/CSSEGISandData/COVID-19 | |
# Total Kansas City Metro Area Stats | |
# Population: 2646933 |
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
// ==UserScript== | |
// @name Streamyard_Hotkeys | |
// @version 0.13 | |
// @description Enable hotkeys for keyboard shortcuts | |
// @author Jason Rahm | |
// @match https://streamyard.com/* | |
// @grant none | |
// ==/UserScript== | |
(async function() { |
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
# Get the repo | |
>>> repo = gh.get_repo('f5devcentral/f5go') | |
# Get the repo commits | |
>>> commits = repo.get_commits() | |
# Print the last commit, but this fails as out of range | |
>>> print(commits[-1].committer.last_modified, commits[-1].committer.name) | |
Traceback (most recent call last): | |
File "<input>", line 1, in <module> |
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
when HTTP_REQUEST { | |
if { [catch \[HTTP2::version\] result] == 1 } { | |
if { $result contains "Operation not supported" } { | |
log local0. "HTTP version is: [HTTP::version]" | |
} else { | |
log local0. "HTTP version is 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
# coding=utf-8 | |
# | |
# Copyright 2015-2019 F5 Networks Inc. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
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 | |
# | |
# Copyright 2015-2019 F5 Networks Inc. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
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
sql_text = '''SELECT * | |
FROM | |
CompetitionTeams ct | |
INNER JOIN | |
Teams t ON ct.teams = t.id | |
WHERE | |
ct.competitions = {}'''.format(comp) | |
result = db.engine.execute(sql_text) |
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
#---------------------------------------------------------------------------- | |
# The contents of this file are subject to the "END USER LICENSE AGREEMENT | |
# FOR F5 Software Development Kit for iControl"; you may not use this file | |
# except in compliance with the License. The License is included in the | |
# iControl Software Development Kit. | |
# | |
# Software distributed under the License is distributed on an "AS IS" | |
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See | |
# the License for the specific language governing rights and limitations | |
# under the License. |
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
def _upload(host, creds, fp): | |
chunk_size = 512 * 1024 | |
headers = { | |
'Content-Type': 'application/octet-stream' | |
} | |
fileobj = open(fp, 'rb') | |
filename = os.path.basename(fp) | |
uri = 'https://%s/mgmt/shared/file-transfer/uploads/%s' % (host, filename) |