Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
| #! /usr/bin/env python | |
| """Uses the brilliant Evohome Client from Andrew Stock to query the status of | |
| a Honeywell Evohome heat system and publishes the responses to an a MQTT broker. | |
| Evohome Client available https://github.com/watchforstock/evohome-client | |
| Run with your username and password | |
| eventcmd = /home/pi/bin/evohomemqtt.py -u username -p password | |
| """ |
| # The MIT License (MIT) | |
| # Copyright (c) 2016 Vladimir Ignatev | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining | |
| # a copy of this software and associated documentation files (the "Software"), | |
| # to deal in the Software without restriction, including without limitation | |
| # the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
| # and/or sell copies of the Software, and to permit persons to whom the Software | |
| # is furnished to do so, subject to the following conditions: | |
| # |
| function download(fileUrl, apiPath, callback) { | |
| var url = require('url'), | |
| http = require('http'), | |
| p = url.parse(fileUrl), | |
| timeout = 10000; | |
| var file = fs.createWriteStream(apiPath); | |
| var timeout_wrapper = function( req ) { | |
| return function() { |
| #### Contents of the preconfiguration file (for squeeze) | |
| ### Localization | |
| # Preseeding only locale sets language, country and locale. | |
| #d-i debian-installer/locale string en_US | |
| # The values can also be preseeded individually for greater flexibility. | |
| d-i debian-installer/language string en | |
| d-i debian-installer/country string CA | |
| d-i debian-installer/locale string en_US.UTF-8 | |
| # Optionally specify additional locales to be generated. |
| #!/bin/bash | |
| # Sometimes you need to move your existing git repository | |
| # to a new remote repository (/new remote origin). | |
| # Here are a simple and quick steps that does exactly this. | |
| # | |
| # Let's assume we call "old repo" the repository you wish | |
| # to move, and "new repo" the one you wish to move to. | |
| # | |
| ### Step 1. Make sure you have a local copy of all "old repo" | |
| ### branches and tags. |
| //************************************************ | |
| // | |
| // Catmull-Rom Spline to Bezier Spline Converter | |
| // | |
| // | |
| // This is an experimental extension of the SVG 'path' element syntax to | |
| // allow Catmull-Rom splines, which differs from Bézier curves in that all | |
| // defined points on a Catmull-Rom spline are on the path itself. | |
| // | |
| // This is intended to serve as a proof-of-concept toward inclusion of a |
| #!/bin/bash | |
| # Usage: slackpost <token> <channel> <message> | |
| # Enter the name of your slack host here - the thing that appears in your URL: | |
| # https://slackhost.slack.com/ | |
| slackhost=PUT_YOUR_HOST_HERE | |
| token=$1 |
| #!/usr/bin/env python | |
| # jsonenv reads a json object as input and produces | |
| # escaped shell commands for setting environment vars | |
| import json | |
| import pipes | |
| import sys | |
| for k, v in json.load(sys.stdin).items(): |
VMware ESXi includes a built in VNC server that can be used to access a VMs console for manipulation via automated tools (e.g., veewee) or by users on platforms where the vSphere Client is not supported. In ESXi 5.x, the built-in firewall does not allow VNC traffic to be received by the VNC server, even when an individual VM is configured to support this configuration. To complete this activity, the firewall has to be modified to allow the appropriate ports.
The below script can be run via the ESXi command line to setup the firewall rules necessary to run VNC. A few items to note:
/etc/rc.local (ESXi 5.0) or `/etc/rc.local