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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>test A - sender</title> | |
<script type="text/javascript" src="http://cdn.peerjs.com/0.3/peer.js"></script> | |
<script> | |
// PeerJS object | |
var peer = new Peer({ key: 'lwjd5qra8257b9', debug: 3, config: {'iceServers': [ | |
{ url: 'stun:stun.l.google.com:19302' } // Pass in optional STUN and TURN server for maximum network compatibility | |
]}}); |
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
--- | |
# Uses ansible inventory to generate file based service discovery for prometheus to scrap | |
{# Loop over all groups except some #} | |
{% for group in groups if not group in ['all', 'ungrouped', prometheus_node_exporter_group] %} | |
{# Loop through hosts in group, if host is part of the prom-exports group, print hostname and port #} | |
- targets: [{% for host in groups[group] %}{% if prometheus_node_exporter_group in hostvars[host].group_names %}'{{ host }}:{{ prometheus_node_exporter_port }}', {% endif %}{% endfor %}] | |
labels: | |
job: '{{ group }}' | |
{% endfor %} |
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
tasks: | |
- name: Change reserved blocks to 1 percent on ext4 filesystems that are not / mounted | |
shell: tune2fs -l {{ item.device }} | egrep "Reserved block count|Block count" | paste -sd\ | awk '{print ($7 / $3 * 100)}' | grep -q 1 || tune2fs -m1 {{ item.device }} | |
with_items: | |
- "{{ ansible_mounts }}" | |
when: item.fstype == 'ext4' and item.mount != '/' | |
register: tune2fs | |
changed_when: tune2fs.stdout != "" |
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
from picamera import PiCamera | |
import shlex, subprocess, os | |
camera = PiCamera() | |
# max resolution is (3280, 2464) for full FoV at 15FPS | |
camera.resolution = (1640, 1232) | |
# zoom (x, y, w, h) proportion of the image to include in the output | |
# use the following to crop 4:3 full FoV res when using 16:9 resize res to achieve full width sensor FoV | |
#camera.zoom = (0.0, 0.1, 1.0, 0.75) | |
camera.framerate = 30 |