Skip to content

Instantly share code, notes, and snippets.

@ipcrm
ipcrm / frigate_notification.yaml
Last active January 3, 2022 22:42 — forked from hunterjm/frigate_notification.yaml
Frigate Notification Blueprint
blueprint:
name: Frigate Notification
description: |
## Frigate Mobile App Notification
This blueprint will send a notification to your device when a Frigate event for the selected camera is fired. The notification will initially include the thumbnail of the detection, but will update to include actionable notifications allowing you to view the saved clip/snapshot when available, or silence the notification for a configurable amount of time.
With this blueprint, you may send the notification to multiple devices by leaving "Device" blank and instead use a [notification group][1].
### Required entities:
@ipcrm
ipcrm / index.ts
Last active June 9, 2020 20:57
Triggered Listener Coordination
/*
* Copyright © 2020 Atomist, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@ipcrm
ipcrm / proxy.ts
Last active March 27, 2020 17:29
proxy stuff
/*
* Copyright © 2019 Atomist, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@ipcrm
ipcrm / index.ts
Last active March 23, 2020 19:04
Custom RepoRefResolver
export const configuration = configure<{}>(async sdm => {
// SDM Stuff
}, {
preProcessors: [
async cfg => {
cfg.sdm.repoRefResolver = new CustomBitBucketRepoRefResolver();
return cfg;
},
],
});
export const hasJenkinsfile: PredicatePushTest = predicatePushTest(
"hasJenkinsfile",
async p => {
const foundNumber = await projectUtils.countFiles(p, "**/Dockerfile");
return foundNumber !== 0;
},
);
@ipcrm
ipcrm / terraform.ts
Created April 22, 2019 10:40
Terraform Support
import {
DefaultGoalNameGenerator,
ExecuteGoal,
ExecuteGoalResult,
FulfillableGoalDetails,
FulfillableGoalWithRegistrations,
getGoalDefinitionFrom,
Goal,
GoalDefinition,
GoalInvocation,
@ipcrm
ipcrm / example.ts
Created April 19, 2019 12:01
Schedule Goals from PR Event
sdm.addPullRequestListener(async prl => {
const repo = await fetchBranchTips(
prl.context,
{
repo: prl.pullRequest.repo.name,
owner: prl.pullRequest.repo.owner,
providerId: prl.pullRequest.repo.org.provider.providerId,
},
);
@ipcrm
ipcrm / listSkills.ts
Last active March 4, 2019 22:56
Custom list Skills
/*
* Copyright © 2019 Atomist, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@ipcrm
ipcrm / test.ts
Created February 21, 2019 21:46
test
function createAxiosRequestConfig(config: AxiosRequestConfig): AxiosRequestConfig {
const tunnel = tunneling.httpsOverHttp({
proxy: configurationValue<tunneling.HttpsOverHttpOptions["proxy"]>("sdm.proxy"),
});
return {
...config,
httpsAgent: tunnel,
proxy: false,
};
@ipcrm
ipcrm / fingerprintsupport.ts
Last active February 21, 2019 21:02
fingerprints
fingerprintSupport(
fingerprint,
[
{
extract: createNpmDepsFingerprints,
apply: applyNpmDepsFingerprint,
selector: fp => fp.name.startsWith("npm-project-dep"),
summary: diffNpmDepsFingerprints,
},
{