Skip to content

Instantly share code, notes, and snippets.

View eagleEggs's full-sized avatar
🍦

eagleEggs

🍦
  • Washington, DC
View GitHub Profile
@eagleEggs
eagleEggs / gist:81b12ee481680cdf9d22170aaf3eb204
Created August 20, 2022 19:15
TESTRAIL DJANGO REST FUNCTION PULL WITH TIMEFRAMES (VIEWS.py)
def puller(request):
action = request.GET.get('action', -1)
case = request.GET.get('case', -1)
timestamperbefore = request.GET.get('before', -1)
timestamperafter = request.GET.get('after', -1)
print(timestamperbefore)
print(timestamperafter)
tr_endpoint = "https://"
client = tr.APIClient(tr_endpoint)
@eagleEggs
eagleEggs / gist:5ca7e60fefcfff2cd8091bfba6acde98
Created April 19, 2022 15:48
Zephyr Scale Server API v1 Attachment Upload
import requests
url = "DOMAIN/jira/rest/atm/1.0/testrun/CYCLE-ID/attachments"
payload={}
files=[
('file', ('test.jpg', open('C://test.jpg', 'rb'), 'image/jpeg'))
@eagleEggs
eagleEggs / wadupload
Created October 5, 2021 13:19
Testing upload mock data for mySQL / Django Script Repository API
import mysql.connector
from random import random
from random import randrange
from random import choice
import json
class Database(object):
def __init__(self, username, dbhost, database, password, databaseport):
self.username = username
@eagleEggs
eagleEggs / gist:8e9ee062a57dbbc6a33775b9080102e9
Created January 10, 2021 21:54
Test Rail Python Methods (add_result, add_attachment)
def updateTest(self, testID, runID, tr_status_summary, statuss, ss):
result = self.client.send_post(
'add_result/{}'.format(testID),
{'status_id': int(statuss),
'comment': "{}".format(tr_status_summary)})
attachment = self.client.send_post(
'add_attachment_to_result/{}'.format(result['id']), ss)
@eagleEggs
eagleEggs / syslog centos
Created June 2, 2019 03:25
syslog centos
/etc/rsyslog.conf
$ModLoad imudp
$UDPServerRun 514
$template RemoteLogs,"/var/log/%HOSTNAME%/%PROGRAMNAME%.log"
. ?RemoteLogs & ~
firewall-cmd --permanent --add-port=514/tcp
firewall-cmd --permanent --add-port=514/udp
@eagleEggs
eagleEggs / freeRadius (centOS)
Created May 31, 2019 02:45
freeRadius (centOS)
Notes during installation and setup of freeradius for centOS:
yum install freeradius
yum install freeradius-utils (for radtest etc...)
chmod o+x on files inaccessible (no ex bit)
start server: radiusd -X
test auth: radtest testing password 127.0.0.1 0 testing123
import json
config = {
# inputs:
'platform': 'Firefox',
'url': 'https://yahoo.com',
'title': 'Testing',
'engineer': '',
import mysql.connector
class Database(object):
def __init__(self, username, dbhost, database, password, databaseport):
self.username = username
self.database = database
self.password = password
self.dbhost = dbhost
self.databaseport = databaseport
@eagleEggs
eagleEggs / paaaaag
Created May 15, 2019 18:06
pag notes
inline specials:
typewrite > (['tab', ])
press > keyDown > keyUp > hotKey:::
['\t', '\n', '\r', ' ', '!', '"', '#', '$', '%', '&', "'", '(',
')', '*', '+', ',', '-', '.', '/', '0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', ':', ';', '<', '=', '>', '?', '@', '[', '\\', ']', '^', '_', '`',
'a', 'b', 'c', 'd', 'e','f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',
'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '{', '|', '}', '~',
'accept', 'add', 'alt', 'altleft', 'altright', 'apps', 'backspace',
@eagleEggs
eagleEggs / gist:7235b2cd0318b21ac7b9bac3e9eae273
Created February 23, 2019 19:53
screen resolution related
from win32api import GetSystemMetrics
pyautogui.click(x=GetSystemMetrics(0) / 2, y=GetSystemMetrics(1) / 2)
PSG:
saveXY = values_screenshot_window
print(saveXY["ss"][0], saveXY["ss"][1])
print(screenshotWindow.CurrentLocation())
ss_win_loc = screenshotWindow.CurrentLocation()