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/env bash | |
| # | |
| # Downloads the official HP Printer Driver installer and patches its OS version gate, | |
| # so it installs on macOS releases newer than Sequoia (15.x), e.g. Tahoe (26.x). | |
| # | |
| # Instructions: | |
| # 1. save the whole contents as a new file, e.g. patch-hp-printer-driver.sh | |
| # 2. make it executable. From a terminal, in the same folder where you saved it: chmod +x patch-hp-printer-driver.sh | |
| # 3. run it: ./patch-hp-printer-driver.sh | |
| # 4. The script will notify about the the patched installer (saved in the same folder). You can then run it to install the drivers. |
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
| :checkPrivileges | |
| NET FILE 1>NUL 2>NUL | |
| if '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto getPrivileges ) | |
| :getPrivileges | |
| if '%1'=='ELEV' (echo ELEV & shift /1 & goto gotPrivileges) | |
| setlocal DisableDelayedExpansion | |
| set "batchPath=%~0" | |
| setlocal EnableDelayedExpansion |
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
| :checkPrivileges | |
| NET FILE 1>NUL 2>NUL | |
| if '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto getPrivileges ) | |
| :getPrivileges | |
| if '%1'=='ELEV' (echo ELEV & shift /1 & goto gotPrivileges) | |
| setlocal DisableDelayedExpansion | |
| set "batchPath=%~0" | |
| setlocal EnableDelayedExpansion |
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
| :checkPrivileges | |
| NET FILE 1>NUL 2>NUL | |
| if '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto getPrivileges ) | |
| :getPrivileges | |
| if '%1'=='ELEV' (echo ELEV & shift /1 & goto gotPrivileges) | |
| setlocal DisableDelayedExpansion | |
| set "batchPath=%~0" | |
| setlocal EnableDelayedExpansion |
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
| javascript:%20var%20el,%20i,%20size;%20%20for(i=0,%20size=document.styleSheets.length;%20i<size;%20i++)%20{%20void(document.styleSheets.item(i).disabled=true);%20}%20%20el%20=%20document.getElementsByTagName('script');%20%20while%20(el.length%20>%200)%20{%20%20void(el[0].parentNode.removeChild(el[0]));%20%20}%20%20el%20=%20document.getElementsByTagName('link');%20%20while%20(el.length%20>%200)%20{%20%20void(el[0].parentNode.removeChild(el[0]));%20%20}%20%20el%20=%20document.getElementsByTagName('iframe');%20%20while%20(el.length%20>%200)%20{%20%20void(el[0].parentNode.removeChild(el[0]));%20%20}%20%20el%20=%20document.getElementsByTagName('*');%20%20for%20(%20i=0,%20size=el.length;%20i%20<%20size;%20i++)%20{%20%20void(el[i].style.cssText%20=%20'');%20%20} |
pip install pystatsdpython -c 'import pystatsd; pystatsd.Server(debug=True).serve()'- Config is
localhost:8125
From https://pypi.python.org/pypi/pystatsd/ Kudos to @rochoa
Magic words:
psql -U postgresSome interesting flags (to see all, use -h or --help depending on your psql version):
-E: will describe the underlaying queries of the\commands (cool for learning!)-l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
NewerOlder