Skip to content

Instantly share code, notes, and snippets.

View eagleEggs's full-sized avatar
🌽
Get that corn outta my face

eagleEggs

🌽
Get that corn outta my face
  • Washington, DC
View GitHub Profile
Need to investigate these errors (happens rarely and usually after running threaded tests):
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\tkinter\__init__.py", line 329, in __del__
if self._tk.getboolean(self._tk.call("info", "exists", self._name)):
RuntimeError: main thread is not in main loop
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\tkinter\__init__.py", line 1992, in wm_withdraw
return self.tk.call('wm', 'withdraw', self._w)
@eagleEggs
eagleEggs / NBC
Created December 23, 2018 19:58
Networking base class
# ######################################################################### ###
# ########### NETWORK CONTROLLER ########### ###
# ######################################################################### ###
class Networking(object):
def __init__(self, server_ip, server_port, server_password,
server_data, object_pass):
self.server_ip = server_ip
self.server_password = server_password
self.server_port = server_port
@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()
@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',
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
import json
config = {
# inputs:
'platform': 'Firefox',
'url': 'https://yahoo.com',
'title': 'Testing',
'engineer': '',
@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
@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 / 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 / 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