This file contains 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 python | |
"""Fetch HTML title for URL""" | |
import sys | |
import requests | |
import lxml.html as html | |
if __name__ == '__main__': | |
if len(sys.argv) != 2: | |
print('Fetches HTML title for given URL.\n\nUsage: %s <URL>' % sys.argv[0]) |
This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am teemuy on github. | |
* I am teemuy (https://keybase.io/teemuy) on keybase. | |
* I have a public key ASBnoUyZZIbzlL-JwCy02QsdAiYb7kyK20WdueOl14woCgo | |
To claim this, I am signing this object: |
This file contains 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
# | |
# Put the line below in your ~/.profile | |
# You can then say "genrandstr 10" to get a string of 10 random bytes, base64 encoded. | |
# Works on macOS, should work on Linux as long as there's Python 2.x installed. | |
# | |
alias genrandstr="python2 -c 'import sys,os,base64;print len(sys.argv)==2 and base64.b64encode(os.urandom(int(sys.argv[1]))) or \"Usage: genrandstr <numbytes>\"'" |