The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.
Send messages to iframe using iframeEl.contentWindow.postMessage
Recieve messages using window.addEventListener('message')
| // https://stackoverflow.com/a/6036392/383904 | |
| var open = window.XMLHttpRequest.prototype.open, | |
| send = window.XMLHttpRequest.prototype.send, | |
| onReadyStateChange; | |
| function openReplacement(method, url, async, user, password) { | |
| var syncMode = async !== false ? 'async' : 'sync'; | |
| console.warn( | |
| 'Preparing ' + | |
| syncMode + |
| ! Molokai theme | |
| *xterm*background: #101010 | |
| *xterm*foreground: #d0d0d0 | |
| *xterm*cursorColor: #d0d0d0 | |
| *xterm*color0: #101010 | |
| *xterm*color1: #960050 | |
| *xterm*color2: #66aa11 | |
| *xterm*color3: #c47f2c | |
| *xterm*color4: #30309b | |
| *xterm*color5: #7e40a5 |
$ pg_dump -h <public dns> -U <my username> -f <name of dump file .sql> <name of my database>$ psql -U <postgresql username> -d <database name> -f <dump file that you want to restore>| /* Tiny web server in Golang for sharing a folder | |
| Copyright (c) 2010 Alexis ROBERT <alexis.robert@gmail.com> | |
| Contains some code from Golang's http.ServeFile method, and | |
| uses lighttpd's directory listing HTML template. */ | |
| package main | |
| import ( | |
| "compress/gzip" |
| import org.yaml.snakeyaml.Yaml; | |
| import java.io.FileNotFoundException; | |
| import java.io.FileInputStream; | |
| import java.io.File; | |
| import java.util.Map; | |
| public class HelloYaml { | |
| @SuppressWarnings("unchecked") | |
| public static void main(String[] args) throws FileNotFoundException { |