- Windows Sysadmin bs
- download updates manually
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
| git config --global alias.ignorechanges = update-index --assume-unchanged | |
| git config --global alias.noticechanges = update-index --no-assume-unchanged |
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 winsound | |
| from subprocess import call, DEVNULL | |
| print('Begin Ping Alert') | |
| while call(["ping", "google.com"], stdout=DEVNULL, stderr=DEVNULL) != 0: | |
| print('No net yet :(') | |
| print('Web Back!!!') |
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 win32api, win32con, time | |
| def click(x, y): | |
| win32api.SetCursor((X,y)) | |
| win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN,x,y,0,0) | |
| win32api.mouse_event(win32con.MOUSEEVENTF_LEFTUP,x,y,0,0) | |
| def clean(): | |
| click(1050, 200) | |
| click(1050, 220) |
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
| class Proof: | |
| def __init__(self): | |
| self._redo = [] | |
| self._undo = [] | |
| self._mystr = '' | |
| def mystr(): | |
| def fget(self): | |
| return self._mystr |
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
| def leven(s1, s2, maxDistance): | |
| # get smallest string so our rows are minimized | |
| s1, s2 = (s1, s2) if len(s1) <= len(s2) else (s2, s1) | |
| # set lengths | |
| l1, l2 = len(s1), len(s2) | |
| # We are simulatng an NM matrix where n is the longer string | |
| # and m is the shorter string. By doing this we can minimize | |
| # memory usage to O(M). | |
| # Since we are simulating the matrix we only maintain two rows |
NewerOlder