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
# a buncha constants that come in handy while doin some calculations!!! | |
# just copy and paste this and run it in your ipython or julia interpreter, | |
# what are you worried about?? it's just a buncha constants, i didn't | |
# make em up, i'm just usin em!!!!! | |
alpha = 0.00729927 # fine structure constant | |
k = 1.38064852e-23 # boltzman constant (J/K) | |
keV = 8.6173324e-5 # boltzman constant (eV/K) | |
Na = 6.022140857e23 # avogadro constant (1/mol) | |
RgasJ = 8.3144598 # gas constant (J/(K mol)) | |
atm = 1.013e5 # 1 atmosphere (N/m^2) |
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
#!/bin/sh | |
# good for error-logging and mixing safe/unsafe execution | |
LOGFILE=/dev/stderr # default | |
log() { echo "$(date +'%D %H:%M:%S:') $*" >> "$LOGFILE"; } | |
die() { log "$*"; exit 111; } | |
try() { "$@" || die "Invalid: $*"; } |
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
#!/bin/sh | |
#set -x | |
# Usage: shibb-cas-get.sh {username} {password} # If you have any errors try removing the redirects to get more information | |
# The service to be called, and a url-encoded version (the url encoding isn't perfect, if you're encoding complex stuff you may wish to replace with a different method) | |
DEST=https://myapp.example.com/ | |
SP=https://myapp.example.com/index.php | |
IDP="https://myidp.example.com/idp/shibboleth&btn_sso=SSOok" |
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
#!/bin/bash | |
# install a powerful script with a special productivity advantage for mac users | |
( | |
cat <<-LAYERS | |
cat <<-OGRESARELIKELAYERS | |
,M, 7M= | |
= MMMM, M |
NewerOlder