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
class EasyXterm { | |
commandListeners = []; | |
historyBuffer = ['']; // idx 0 is the latest | |
historyAt = 0; | |
cursorAt = 0; // 0 is at the end of commandBuffer. positive is left | |
hidden = false; | |
get commandBuffer() { | |
return this.historyBuffer[0]; | |
} | |
set commandBuffer(value) { |
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
{"Square":{"<1, 2>":[{"x":-89,"y":-539,"angle":-6.203125},{"x":-89,"y":-537,"angle":-6.21875},{"x":-89,"y":-534,"angle":-6.25},{"x":-89,"y":-532,"angle":-6.28125},{"x":-89,"y":-529,"angle":-6.296875},{"x":-89,"y":-527,"angle":-6.328125},{"x":-89,"y":-524,"angle":-6.359375},{"x":-89,"y":-522,"angle":-6.375},{"x":-89,"y":-519,"angle":-6.40625},{"x":-89,"y":-517,"angle":-6.421875},{"x":-89,"y":-514,"angle":-6.453125},{"x":-89,"y":-512,"angle":-6.46875},{"x":-89,"y":-509,"angle":-6.5},{"x":-89,"y":-507,"angle":-6.53125},{"x":-89,"y":-504,"angle":-6.546875},{"x":-89,"y":-502,"angle":-6.578125},{"x":-89,"y":-499,"angle":-6.609375},{"x":-89,"y":-497,"angle":-6.625},{"x":-90,"y":-494,"angle":-6.65625},{"x":-90,"y":-492,"angle":-6.671875},{"x":-90,"y":-489,"angle":-6.703125},{"x":-90,"y":-487,"angle":-6.71875},{"x":-91,"y":-484,"angle":-6.75},{"x":-91,"y":-482,"angle":-6.78125},{"x":-91,"y":-479,"angle":-6.796875},{"x":-92,"y":-477,"angle":-6.828125},{"x":-92,"y":-474,"angle":-6.859375},{"x":-92,"y":-472,"angle":-6.87 |
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
function formatMS(tempTime) { | |
var milliseconds = tempTime % 1000; | |
tempTime = Math.floor(tempTime / 1000); | |
var seconds = tempTime % 60; | |
tempTime = Math.floor(tempTime / 60); | |
var minutes = tempTime % 60; | |
tempTime = Math.floor(tempTime / 60); | |
var hours = tempTime % 24; | |
tempTime = Math.floor(tempTime / 24); | |
var days = tempTime; |
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 | |
#AWS User Data: sudo -H -u ubuntu bash -c 'curl -o- https://gist.githubusercontent.com/scheng123/06c2123650bbd2872ab9c253557a0dc1/raw/runFull | bash' | |
#EXECUTE COMMAND: curl -o- https://gist.githubusercontent.com/scheng123/06c2123650bbd2872ab9c253557a0dc1/raw/runFull | bash | |
touch ~/.bashrc | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.0/install.sh | bash | |
. ~/.nvm/nvm.sh | |
nvm install 10.16.3 | |
npm install -g anyproxy MDSLab/wstun | |
sudo bash -c "printf \"@reboot tmux new-session -d -s pRunner 'sudo /home/ubuntu/.nvm/versions/node/v10.16.3/bin/node /home/ubuntu/.nvm/versions/node/v10.16.3/bin/anyproxy -p 1935 -w 9999'\\n@reboot tmux new-session -d -s sshSecondStage 'sudo /home/ubuntu/.nvm/versions/node/v10.16.3/bin/node /home/ubuntu/.nvm/versions/node/v10.16.3/bin/wstun -s 443'\\n@reboot tmux new-session -d -s portFowrd 'sudo /home/ubuntu/.nvm/versions/node/v10.16.3/bin/node /home/ubuntu/.nvm/versions/node/v10.16.3/bin/wstun -r -s 8443'\" > /var/spool/cron/crontabs/ubuntu" | |
sudo chmod go=,+r |
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 | |
#AWS User Data: sudo -H -u ubuntu bash -c 'curl -o- https://gist.githubusercontent.com/scheng123/7985bbac79c0dc34c2c3a8f044ac066f/raw/run | bash' | |
#EXECUTE COMMAND: curl -o- https://gist.githubusercontent.com/scheng123/7985bbac79c0dc34c2c3a8f044ac066f/raw/run | bash | |
touch ~/.bashrc | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.0/install.sh | bash | |
. ~/.nvm/nvm.sh | |
nvm install 10.16.3 | |
npm install -g anyproxy | |
sudo bash -c "echo \"@reboot tmux new-session -d -s pRunner 'sudo /home/ubuntu/.nvm/versions/node/v10.16.3/bin/node /home/ubuntu/.nvm/versions/node/v10.16.3/lib/node_modules/anyproxy/bin/anyproxy -p 8080 -w 80'\" > /var/spool/cron/crontabs/ubuntu" | |
sudo chmod go=,+rw /var/spool/cron/crontabs/ubuntu |
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
<html> | |
<head> | |
<title>Adventures of Simon Cheng</title> | |
</head> | |
<body> | |
<h1>My Life Story</h1><article> | |
<p>We diminution preference thoroughly if. Joy deal pain view much her time. Led young gay would now state. Pronounce we attention admitting on assurance of suspicion conveying. That his west quit had met till. Of advantage he attending household at do perceived. Middleton in objection discovery as agreeable. Edward thrown dining so he my around to. | |
Building mr concerns servants in he outlived am breeding. | |
</p> |
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
hdf5._config = { | |
HDF5_INCLUDE_PATH = "/content/torch/hdf5-1.8.12-linux-x86_64-shared/include", | |
HDF5_LIBRARIES = "/content/torch/hdf5-1.8.12-linux-x86_64-shared/lib/libhdf5.so;/usr/lib/x86_64-linux-gnu/libpthread.so;/usr/lib/x86_64-linux-gnu/libz.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libm.so" | |
} |
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 bash | |
set -e | |
###################################################################### | |
# This script installs required dependencies for Torch7 | |
###################################################################### | |
{ | |
install_openblas() { | |
# Get and build OpenBlas (Torch is much better with a decent Blas) |
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
hello world |