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
from PIL import Image, ImageDraw, ImageFont | |
font = ImageFont.truetype('/Users/jrahm/Library/Fonts/PreCursive-RailsDashed.otf', 120) | |
text = "I like Dory helping Nemo." | |
image = Image.new("RGB", (1920, 1080), (255, 255, 255)) | |
draw = ImageDraw.Draw(image) |
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
''' | |
This script does a general query using LiQL against Khoros API for "code", | |
which is not at all case specific and doesn't seem to match "<", which | |
would have been extremely helpful. | |
It loops through message offsets 50 at a time, then attempts to update the | |
editor code from <CODE></CODE> to <li-code lang="tcl"></code> and then | |
issues a PUT to the /api/2.0/messages/<msg-id> endpoint with a json payload | |
of {'data': {'type': 'message', 'body': <new_body>}} |
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
import sys | |
from urllib3.exceptions import InsecureRequestWarning | |
from urllib3 import disable_warnings | |
disable_warnings(InsecureRequestWarning) | |
from bigrest.bigip import BIGIP | |
syslog_include = """ | |
filter f_remote_loghost { |
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
import timeit | |
from statistics import mean | |
l1 = [1,2,3,4,5] | |
l2 = [3,4,5,6,7] | |
def intersect1(lst1, lst2): | |
res, lst2_copy = [], lst2[:] | |
for el in lst1: |
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
import bgpstuff | |
import argparse | |
import re | |
def get_as_name(client, as_number): | |
client.get_as_name(as_number) | |
if client.status_code == 200 and client.exists: | |
print(f"{as_number} = {c.as_name}") |
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
import random | |
wl_fearless = ['assured', 'aweless', 'bodacious', 'bold', 'cheeky', 'cocky', 'confident', 'cool hand', 'courageous', | |
'daring', 'dashing', 'dauntless', 'doughty', 'gallant', 'game', 'gritty', 'gutsy', 'heroic', 'intrepid', | |
'icy', 'indomitable', 'lionhearted', 'nervy', 'plucky', 'salty', 'sanguine', 'sassy', 'smart', 'spunky', | |
'sure', 'temerarious', 'unabashed', 'undaunted', 'unflinching', 'valiant', 'valorous'] | |
wl_leader = ['chief', 'commander', 'director', 'head', 'manager', 'officer', 'ruler', 'President', 'boss', 'captain', | |
'chieftain', 'conductor', 'controller', 'counsellor', 'dean', 'dignitary', 'doyen', 'eminence', 'exec', | |
'forerunner', 'general', 'governor', 'guide', 'harbinger', 'herald', 'lead', 'lion', 'luminary', | |
'notable', 'pacesetter', 'pilot', 'pioneer', 'precursor', 'principal', 'rector', 'ringleader', 'shepard', |
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
import os | |
import smtplib | |
import ssl | |
from email import encoders | |
from email.mime.base import MIMEBase | |
from email.mime.multipart import MIMEMultipart | |
from email.mime.text import MIMEText |
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
import argparse | |
def c2f(val: float) -> float: | |
return val * 1.8 + 32 | |
def f2c(val: float) -> float: | |
return (val - 32) / 1.8 |
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
################################################################################### | |
# dgmgmt.py | |
# | |
# author: jason rahm | |
# | |
# usage: dgmgmt.py [-h] host user {add,modify,delete} datagroup dgvalues | |
# | |
# positional arguments: | |
# host BIG-IP IP/FQDN | |
# user BIG-IP Username |
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
##################################################### | |
### Required net resolver - example configuration ### | |
##################################################### | |
#net dns-resolver r1 { | |
# forward-zones { | |
# . { | |
# nameservers { | |
# 8.8.8.8:domain { } | |
# 9.9.9.9:domain { } |
NewerOlder