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')
| #!/bin/sh | |
| gcc -Wall -shared -fPIC -o power.so -I/usr/include/lua5.1 -llua5.1 hellofunc.c | |
| # Notes: | |
| # gcc | |
| # The compiler | |
| # -Wall | |
| # Warn on almost anything |
| // uses Apache commons CSV, IO and Lang | |
| import org.apache.commons.csv.CSVFormat; | |
| import org.apache.commons.csv.CSVParser; | |
| import org.apache.commons.csv.CSVPrinter; | |
| import org.apache.commons.io.FileUtils; | |
| import org.apache.commons.io.IOUtils; | |
| import java.io.*; | |
| import java.util.ArrayList; | |
| import java.util.List; |
| package; | |
| import flash.display.Graphics; | |
| import flash.display.Sprite; | |
| import flash.events.Event; | |
| import flash.events.KeyboardEvent; | |
| import flash.Lib; | |
| import flash.ui.Keyboard; | |
| import flash.Vector; |
| function go() { | |
| var userId = prompt('Username?', 'Guest'); | |
| checkIfUserExists(userId); | |
| } | |
| var USERS_LOCATION = 'https://SampleChat.firebaseIO-demo.com/users'; | |
| function userExistsCallback(userId, exists) { | |
| if (exists) { | |
| alert('user ' + userId + ' exists!'); |
I hereby claim:
To claim this, I am signing this object:
Attach the script to a go containing the camera and send a message to that script with four parameters:
x = amount of shake in x-directiony = amount of shake in y-directiontime = duration of shake in secondsspeed = shakes per second - lower number means faster shakingTo try it out you can simply hot reload the script and it will initiate a shake immediately.
| # Derive an Ubuntu Image | |
| FROM ubuntu:18.04 | |
| # Update and Upgrade | |
| RUN apt-get update | |
| RUN apt-get upgrade | |
| # Install base `ruby` | |
| RUN sudo apt install ruby | |
| # Rails installs as a GEM |
| site "http://community.opscode.com/api/v1" | |
| cookbook 'apt' | |
| cookbook 'build-essential' | |
| cookbook 'system' | |
| cookbook 'ruby_build' | |
| cookbook 'ruby_rbenv', '~> 1.1.0' | |
| cookbook 'postgresql', git: 'https://github.com/ChowOps/chef-postgresql' | |
| cookbook 'vim' |