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
# /etc/hosts would have something like this | |
# 127.0.0.2 a.firewalled-app.tld | |
# On Mac you need to `sudo ifconfig lo0 alias 127.0.0.3 up` | |
# Then run a command/script like this. | |
ssh -L 127.0.0.2:80:a.firewalled-app.tld:80 \ | |
-L 127.0.0.2:443:a.firewalled-app.tld:443 \ | |
[email protected] |
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
wget --no-cookies \ | |
--no-check-certificate \ | |
--header "Cookie: oraclelicense=accept-securebackup-cookie" \ | |
"http://download.oracle.com/otn-pub/java/jdk/7u72-b14/jdk-7u72-linux-x64.rpm" \ | |
-O jdk.rpm |
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
# I often need a simple method to determine prime numbers. Returns True or False. | |
is_prime = lambda num: all((num % i > 0 for i in xrange(2,num))) |
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
# Roll your own check_user, pretty_login, logout, and Root functions accordingly. | |
_cp_config={'/':{'tools.sessions.on':True, | |
'tools.sessions.storage_type':'file', | |
'tools.sessions.storage_path':'./', | |
'tools.sessions.timeout':60, | |
'tools.session_auth.on':True, | |
'tools.session_auth.login_screen':pretty_login, | |
'tools.session_auth.check_username_and_password':check_user, | |
} |
NewerOlder