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/bash | |
# /etc/init.d/minecraft | |
# Parameter | |
USERNAME='bukkit' | |
MCPATH='/opt/minecraft/' | |
BACKUPPATH='/opt/backup/' | |
RAM='1G' | |
FILENAME='craftbukkit-0.0.1-SNAPSHOT.jar' | |
START="java -Xincgc -Xmx$RAM -jar $FILENAME" |
For symmetic encryption, you can use the following: | |
To encrypt: | |
openssl aes-256-cbc -salt -a -e -in plaintext.txt -out encrypted.txt | |
To decrypt: | |
openssl aes-256-cbc -salt -a -d -in encrypted.txt -out plaintext.txt | |
For Asymmetric encryption you must first generate your private key and extract the public key. |
#!/bin/bash | |
# Convert TCX (Garmin Edge) to GPX with gpsbabel | |
# Usage: tcx2gpx tcx-file-name [-o gpx-file-name] -max 999 | |
# -o -- gpx-file-name, if not given, computed from tcx-file-name (it is assumed YYYY-MM-DD*.tcx) | |
# -max -- produce simplified track with maximum 999 trkpoints | |
# | |
SIMPLIFY="" | |
if [ $# -eq 0 ]; then |
SonarQube does currently not support Raspberry PI. | |
This is a workaround. It compiles a armv6 compatible version of the java-wrapper and configures sonarqube to use it. | |
(Testet with Raspbian, wheezy, 3.6) | |
Compile java-wrapper for ARMv6 | |
============================ | |
Download latest version of " wrapper_prerelease_XY.tar" from http://wrapper.tanukisoftware.com/downloads/ (for me 3.5.17 works) |
/* | |
UPDATED for 2023 - Now much simpler. The old tricks are no longer needed. | |
The following code makes an 800×600 canvas that is always as sharp as possible for the device. | |
You still draw on it as if it's the logical size (800×600 in this case), but everything just | |
looks sharper on high-DPI screens. Regular non-sharp screens are not affected. | |
*/ | |
const width = 800 |
# Windows (receiver) side: | |
.\ffplay.exe -nodisp -ac 2 -acodec pcm_u8 -ar 48000 -analyzeduration 0 -probesize 32 -f u8 -i udp://0.0.0.0:18181?listen=1 | |
# Linux (transmitter) side: | |
pactl load-module module-null-sink sink_name=remote | |
ffmpeg -f pulse -i "remote.monitor" -ac 2 -acodec pcm_u8 -ar 48000 -f u8 "udp://RECEIVER:18181" | |
pavucontrol # Change the default output to the Null sink or move single applications to this "output" device. |
If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.
Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.
If in doubt about what git is doing when you run these commands, just