#WeBWorK ec2 AMI
##Set up Amazon ec2
- Go to Amazon AWS and click sign up now.
- Follow the on screen instructions.
- Sign into ec2 at https://console.aws.amazon.com/ec2/ Use the email address and password that you specified when signing up for AWS.
| function MyObject(){ | |
| this.button = document.getElementById("myButton"); | |
| var workAroundTheClosure = this; | |
| this.button.addEventListener('click', function(){ | |
| workAroundTheClosure.buttionClick(); | |
| }, | |
| false); | |
| } | |
| MyObject.prototype.buttonClick = function(){ |
| #this goes in config/initializers | |
| Paperclip.options[:log] = false |
| <script> | |
| var require = { | |
| waitSeconds: 15, | |
| urlArgs : "bust=" + (new Date()).getTime(), | |
| deps : ['main'] | |
| }; | |
| </script> |
| # find gateway based on global zone gateway | |
| export GATEWAY=$(netstat -r | grep default | awk '{ print $2 }') | |
| for uuid in `vmadm list -H -o uuid`; do echo "{ | |
| \"update_nics\": [ | |
| { | |
| `vmadm get $uuid | json nics | grep mac` | |
| \"gateway\":\"${GATEWAY}\" | |
| } |
| #!/bin/bash | |
| mv /etc/nsswitch.conf /etc/nsswitch.conf_old | |
| cp /etc/nsswitch.dns /etc/nsswitch.conf | |
| svcadm enable multicast | |
| svcs multicast |
| #!/bin/bash | |
| export GATEWAY=$(netstat -r | grep default | awk '{ print $2 }') | |
| echo "{ | |
| \"brand\": \"joyent\", | |
| \"dataset_uuid\": \"$1\", | |
| \"hostname\": \"$2\", | |
| \"alias\": \"$3\", | |
| \"nics\": [ | |
| { |
#WeBWorK ec2 AMI
##Set up Amazon ec2
I hereby claim:
To claim this, I am signing this object:
| ### Keybase proof | |
| I hereby claim: | |
| * I am whytheplatypus on github. | |
| * I am whytheplatypus (https://keybase.io/whytheplatypus) on keybase. | |
| * I have a public key ASDyKeq5YK0NOmM0o1YRUg2tymYbsL4vrTT7kV_AVogsVgo | |
| To claim this, I am signing this object: |
| #!/bin/bash | |
| if [ $# -lt 1 ]; then | |
| echo "Must supply a file name" | |
| exit 1 | |
| fi | |
| REPO_NAME=$(echo "$1" | base64) | |
| LOCAL_REPO=$HOME/.gist/$REPO_NAME | |
| FILE_PATH=$(pwd)/$1 |