Skip to content

Instantly share code, notes, and snippets.

@MattLud
MattLud / heating.yaml
Created June 24, 2021 16:07 — forked from r3mcos3/heating.yaml
Home Assistant Blueprint For Heating
blueprint:
name: Heating Control
description: Control your heating with options for person home, if temp is below a specific value, set temp, and heating between specific times.
domain: automation
input:
heating:
name: Climate Device
description: The climate device to use.
selector:
entity:
@MattLud
MattLud / unstick.groovy
Last active February 21, 2018 18:03
Unstick Stuck Docker executor jobs
import hudson.model.labels.*;
node ('master') {
Jenkins.instance.queue.items.each {
//http://javadoc.jenkins-ci.org/hudson/model/Queue.Item.html#isStuck--
//Means that buildable is "starved" and should have already run but no executor is available
//if this is on a docker template, there is no reason it shouldn't have already run.
if(it.stuck && !it.blocked)
{
println("Found stuck job - " + it.task.name + "- checking docker to see if we can unstick")
@MattLud
MattLud / StepExecution.java
Created February 12, 2018 23:19
ssh-agent-envVars
@Override
public boolean start() throws Exception {
StepContext context = getContext();
sockets = new ArrayList<String>();
initRemoteAgent();
//AgentEnvs is Map<String,String> of resulting ssh agent pid and sock.
context.newBodyInvoker().
withContext(EnvironmentExpander.merge(getContext().get(EnvironmentExpander.class), EnvironmentExpander.constant(agentEnvs))).
withCallback(BodyExecutionCallback.wrap(getContext())).withDisplayName(null).start();
@MattLud
MattLud / config.xml
Last active August 21, 2017 22:08
JENKINS-39867 issues
<?xml version='1.0' encoding='UTF-8'?>
<hudson>
<disabledAdministrativeMonitors/>
<version>2.32.1</version>
<numExecutors>2</numExecutors>
<mode>NORMAL</mode>
<useSecurity>false</useSecurity>
<authorizationStrategy class="hudson.security.FullControlOnceLoggedInAuthorizationStrategy">
<denyAnonymousReadAccess>true</denyAnonymousReadAccess>
</authorizationStrategy>
{"host":
{"mac":"52:53:00:1e:85:58",
"domain_id":1,
"operatingsystem_id":5,
"subnet_id":7,
"comment":"Created by elastic",
"hostgroup_id":95,
"compute_resource_id":1,
"compute_profile_id":1,
"provision_method":"image",
@MattLud
MattLud / packer_log
Created May 28, 2015 18:34
PackerLogs
2015/05/28 13:16:32 [INFO] Packer version: 0.7.5 9cd66feeacbd9cb318b72eb5ed59428c5b8c37ac+CHANGES
2015/05/28 13:16:32 Packer Target OS/Arch: windows amd64
2015/05/28 13:16:32 Built with Go Version: go1.3.3
2015/05/28 13:16:32 [DEBUG] Discoverd plugin: amazon-chroot = C:\HashiCorp\Vagrant\bin\packer-builder-amazon-chroot.exe
2015/05/28 13:16:32 [DEBUG] Discoverd plugin: amazon-ebs = C:\HashiCorp\Vagrant\bin\packer-builder-amazon-ebs.exe
2015/05/28 13:16:32 [DEBUG] Discoverd plugin: amazon-instance = C:\HashiCorp\Vagrant\bin\packer-builder-amazon-instance.exe
2015/05/28 13:16:32 [DEBUG] Discoverd plugin: amazon-windows-ebs = C:\HashiCorp\Vagrant\bin\packer-builder-amazon-windows-ebs.exe
2015/05/28 13:16:32 [DEBUG] Discoverd plugin: digitalocean = C:\HashiCorp\Vagrant\bin\packer-builder-digitalocean.exe
2015/05/28 13:16:32 [DEBUG] Discoverd plugin: docker = C:\HashiCorp\Vagrant\bin\packer-builder-docker.exe
2015/05/28 13:16:32 [DEBUG] Discoverd plugin: googlecompute = C:\HashiCorp\Vagrant\bin\packer-builder-goo
2015/05/14 16:07:30 [INFO] Packer version: 0.7.5 9cd66feeacbd9cb318b72eb5ed59428c5b8c37ac+CHANGES
2015/05/14 16:07:30 Packer Target OS/Arch: windows amd64
2015/05/14 16:07:30 Built with Go Version: go1.3.3
2015/05/14 16:07:30 [DEBUG] Discoverd plugin: amazon-chroot = C:\HashiCorp\Vagrant\bin\packer-builder-amazon-chroot.exe
2015/05/14 16:07:30 [DEBUG] Discoverd plugin: amazon-ebs = C:\HashiCorp\Vagrant\bin\packer-builder-amazon-ebs.exe
2015/05/14 16:07:30 [DEBUG] Discoverd plugin: amazon-instance = C:\HashiCorp\Vagrant\bin\packer-builder-amazon-instance.exe
2015/05/14 16:07:30 [DEBUG] Discoverd plugin: amazon-windows-ebs = C:\HashiCorp\Vagrant\bin\packer-builder-amazon-windows-ebs.exe
2015/05/14 16:07:30 [DEBUG] Discoverd plugin: digitalocean = C:\HashiCorp\Vagrant\bin\packer-builder-digitalocean.exe
2015/05/14 16:07:30 [DEBUG] Discoverd plugin: docker = C:\HashiCorp\Vagrant\bin\packer-builder-docker.exe
2015/05/14 16:07:30 [DEBUG] Discoverd plugin: googlecompute = C:\HashiCorp\Vagrant\bin\packer-builder-goo
function Start-CLR4 {
[CmdletBinding()]
param ( [string] $cmd )
if ($PSVersionTable.CLRVersion.Major -eq 4)
{