Skip to content

Instantly share code, notes, and snippets.

@lucas1
lucas1 / README.md
Created September 7, 2019 01:48 — forked from pbojinov/README.md
Two way iframe communication- Check out working example here: http://pbojinov.github.io/iframe-communication/

Two way iframe communication

The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.

Parent

Send messages to iframe using iframeEl.contentWindow.postMessage Recieve messages using window.addEventListener('message')

iframe

@lucas1
lucas1 / CentOS
Created January 14, 2021 20:44 — forked from ihipop/CentOS
Openresty init.d script for CENTOS / DEBIAN / UBUNTU
#!/bin/sh
#
# chkconfig: 2345 55 25
# Description: Openresty init.d script, put in /etc/init.d, chmod +x /etc/init.d/openresty
# For Debian, run: update-rc.d -f openresty defaults
# For CentOS, run: chkconfig --add openresty
#
### BEGIN INIT INFO
# Provides: openresty
# Required-Start: $all
@lucas1
lucas1 / soffice.service
Created November 18, 2022 02:40 — forked from milouse/soffice.service
Headless LibreOffice systemd service file
[Unit]
Description=Control headless soffice instance
After=network.target xvfb.service
Requires=xvfb.service
[Service]
Type=simple
ExecStart=/opt/libreoffice4.4/program/soffice --headless \
--accept=socket,host=127.0.0.1,port=8101;urp; --display :5.0 \
--pidfile=/var/run/soffice.pid --nologo --nodefault --nofirststartwizard