This document will discribe a set of worklows I am implementing.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<!-- this one goes in /www/ubuslisten.html --> | |
<meta charset="UTF-8"> | |
<body></body> | |
<script> | |
var source = new EventSource("/cgi-bin/ubuslisten.lua"); | |
source.addEventListener('message', function(e) { | |
console.log(e.data); | |
}, false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?PHP | |
if(!empty($_FILES['uploaded_file'])) | |
{ | |
$path = "uploads/"; | |
$path = $path . basename( $_FILES['uploaded_file']['name']); | |
if(move_uploaded_file($_FILES['uploaded_file']['tmp_name'], $path)) { | |
echo "The file ". basename( $_FILES['uploaded_file']['name']). | |
" has been uploaded"; | |
} else{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env lua | |
require "ubus" | |
require "uloop" | |
uloop.init() | |
local conn = ubus.connect() | |
if not conn then | |
error("Failed to connect to ubus") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Listen for messages and process all messages at steady rate limit. | |
// | |
pubnub.subscribe({ | |
channel : "hello_world", | |
message : limit( function(message) { | |
// process your messages at set interval here. | |
}, 500 /* milliseconds */ ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
modprobe v4l2loopback video_nr=3 | |
gst-launch-1.0 -v ximagesrc startx=1 starty=1 endx=320 endy=240 ! videoconvert ! "video/x-raw,format=YUY2" ! tee ! v4l2sink device=/dev/video3 | |
# you can also use gst-launch to select a window https://superuser.com/questions/709866/ffmpeg-x11grab-a-single-window |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
window.erxesSettings = { | |
messenger: { | |
brand_id: "st3FrK", | |
}, | |
}; | |
(function() { | |
var script = document.createElement('script'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Use local app server and mdns/bonjour/zeroconf to announce it for signalling | |
2. use webrtc for p2p udp communications | |
https://github.com/bykof/cordova-plugin-webserver | |
https://github.com/floatinghotpot/cordova-httpd | |
https://github.com/becvert/cordova-plugin-zeroconf | |
https://github.com/cjb/serverless-webrtc | |
Uses: | |
* use pouchdb to sync dbs p2p for coordination |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
qemu-system-arm -kernel ~/Downloads/kernel-qemu-4.19.50-buster -cpu arm1136-r2 -M versatilepb -dtb ~/Downloads/versatile-pb.dtb -no-reboot -append "root=/dev/sda2 panic=1" -drive format=raw,file=2020-02-23-wiki-lite-qemu.img -nographic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<script src="https://togetherjs.com/togetherjs-min.js"></script> | |
<button onclick="TogetherJS(this); return false;">Start TogetherJS</button> | |
<script> | |
document.addEventListener('DOMContentLoaded', function() { | |
document.getElementById('browsingSession').href = 'https://tmate.io/t/' + window.location.hash.substring(1); | |
}); | |
</script> |
NewerOlder