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
Date.parseWcfDate = function(str) { | |
var regex = str.match(/\/Date\(([0-9]+)([-+])([0-9]+)\)\//); | |
var millisecs = parseInt(regex[1]); | |
var offset = parseFloat(regex[2] + regex[3]) / 100; | |
var utcMillsecs = millisecs + offset * 3600 * 1000; | |
return new Date(utcMillsecs); | |
}; |
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
echo Check whether Jupyter Notebook is already running... | |
# You need to update the path in this line to point to where your jupyter-notebook lives. | |
ps aux | grep '/home/rafidka/.pyenv/versions/3.6.8/bin/jupyter-notebook' | grep -vq grep | |
if [ $? -eq 1 ]; then | |
echo 'Jupyter Notebook is NOT running; starting it in a background process...' | |
curr_path=`pwd` | |
mkdir -p notes | |
cd notes | |
jupyter notebook --no-browser --port=9001 > $curr_path/stdout.txt 2>$curr_path/stderr.txt & | |
cd $curr_path |
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
cat jupyter.sh | |
SERVER=myserver.com # you need to update to your server DNS or IP address. | |
ssh $SERVER '~/jupyter/start.sh' | |
ssh -N -f -L localhost:9001:localhost:9001 rafidka.aka.corp.amazon.com | |
open http://localhost:9001 |