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
| #!/usr/bin/bash | |
| # Build veracrypt on linux | |
| # Tested on ubuntu 20.10 | |
| sudo apt install -y libgtk-3-dev yasm fuse libfuse-dev libcppunit-dev freeglut3-dev | |
| if [ ! -d $(pwd)/wxWidgets ]; then | |
| wget https://github.com/wxWidgets/wxWidgets/releases/download/v3.0.5/wxWidgets-3.0.5.tar.bz2 | |
| tar xf wxWidgets-3.0.5.tar.bz2 |
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 dirprint(object): print(i if not i.endswith("_") else "" for i in object) |
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 proxy_driver(proxy, co=co): | |
| prox = Proxy() | |
| prox.proxy_type = ProxyType.MANUAL | |
| prox.http_proxy = proxy | |
| # prox.socks_proxy = proxy | |
| prox.ssl_proxy = proxy | |
| capabilities = webdriver.DesiredCapabilities.CHROME | |
| prox.add_to_capabilities(capabilities) |
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
| var event = document.createEvent("Event"); | |
| event.initEvent("click", false, true); | |
| document.getElementById("blah").dispatchEvent(event); |
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
| gsettings set org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:$(gsettings get org.gnome.Terminal.ProfilesList default|tr -d \')/ cursor-blink-mode off |
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 copy_to_clipboard(driver, button) -> str: | |
| """ | |
| Click 'copy to clipboard button' and return result from clipboard! | |
| args: | |
| driver = Selenium WebDriver | |
| button = WebdriverElement | |
| """ | |
| event_script = """ | |
| document.addEventListener('copy', function(e){ | |
| var text = window.getSelection().toString() |
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
| l = ['a', 'b', 'c'] | |
| for i, element in enumerate(l): | |
| if element == 'a': | |
| l.insert(i + 1, "surprise after a") | |
| print(element) |
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
| INTERVAL=10 # Seconds | |
| REMOTE="origin" | |
| BRANCH="main" | |
| echo "polling started..." | |
| while true | |
| do | |
| if [[ $(git fetch 2>&1 | grep $BRANCH) ]]; then | |
| git merge $REMOTE/$BRANCH |
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
| #!/usr/bin/bash | |
| # 30/01/2021 | |
| # Raspberry pi wifi extender | |
| # Make sure you have 2 wireless interfaces | |
| # Based on https://github.com/mrtejas99/wifi-extender | |
| ##### CONFIGURATIONS TO BE CHANGED #### | |
| WLAN0="wlan0" |
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 io | |
| class FileStream: | |
| def __init__(self): | |
| self.buffer = io.BytesIO() | |
| self.offset = 0 | |
| def write(self, bytes): | |
| self.buffer.write(bytes) | |
| self.offset += len(bytes) |