Skip to content

Instantly share code, notes, and snippets.

blueprint:
name: Send a notification with camera snapshot when motion is detected with blocking state and URL (or lovelace view) on click, critical or not, collapse or not.
description: >
This automation blueprint creates a camera snapshot if motion is detected
and sends a notification to your phone with the picture.
Optionally you can define a binary sensor that will block the automation from running when state is ON.
For Example do not run when somebody is home (you can use the people_home template example).
Furthermore you have the option to make the notification critical or high priority and to collapse/overwrite or not.
@rb2k
rb2k / gist:3e09ff3e9d622eca52e24fc69a2c367b
Created May 21, 2023 15:22
frigate ffmpeg oom killed
[Sun May 21 09:27:27 2023] Memory cgroup out of memory: Killed process 20370 (ffmpeg) total-vm:8533984kB, anon-rss:6989448kB, file-rss:64852kB, shmem-rss:0kB, UID:0 pgtables:14260kB oom_score_adj:0
[Sun May 21 09:28:36 2023] ffmpeg invoked oom-killer: gfp_mask=0xcc0(GFP_KERNEL), order=0, oom_score_adj=0
[Sun May 21 09:28:36 2023] CPU: 1 PID: 30270 Comm: ffmpeg Not tainted 6.1.29-Unraid #1
[Sun May 21 09:28:36 2023] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./X470D4U, BIOS L4.24 02/23/2022
[Sun May 21 09:28:36 2023] Call Trace:
[Sun May 21 09:28:36 2023] <TASK>
[Sun May 21 09:28:36 2023] dump_stack_lvl+0x44/0x5c
[Sun May 21 09:28:36 2023] dump_header+0x4a/0x211
[Sun May 21 09:28:36 2023] oom_kill_process+0x80/0x111
[Sun May 21 09:28:36 2023] out_of_memory+0x3b3/0x3e5
type: horizontal-stack
title: EV Charger current
cards:
- show_name: true
show_icon: false
type: button
tap_action:
action: call-service
service: emporia_vue.set_charger_current
data:
Sources taken from https://git.fedorahosted.org/git/nss-pem.git
Patches taken from http://pkgs.fedoraproject.org/cgit/nss.git/
Following patches were applied in that order:
nss-enable-pem.patch
0039-Sync-up-with-nss-3.15.4-changes-in-freebl-and-softok.patch
Signed-off-by: Lars Wendler <[email protected]>
[ 28.693672] [drm] amdgpu kernel modesetting enabled.
[ 28.699541] amdgpu: Topology: Add APU node [0x0:0x0]
[ 28.699778] amdgpu 0000:30:00.0: enabling device (0000 -> 0003)
[ 28.699971] [drm] initializing kernel modesetting (RAVEN 0x1002:0x15D8 0x1002:0x15D8 0xC8).
[ 28.699994] amdgpu 0000:30:00.0: amdgpu: Trusted Memory Zone (TMZ) feature enabled
[ 28.700365] [drm] register mmio base: 0xFCC00000
[ 28.700376] [drm] register mmio size: 524288
[ 28.700400] [drm] add ip block number 0 <soc15_common>
[ 28.700413] [drm] add ip block number 1 <gmc_v9_0>
[ 28.700434] [drm] add ip block number 2 <vega10_ih>
@rb2k
rb2k / epub_compressor.rb
Created May 22, 2016 17:34
Quick hack to recompress epub files
def compress(file)
raise unless system("rm -rf tmp/")
raise unless system("unzip -q -o -d tmp/ '#{file}'")
raise unless system("imageOptim --directory tmp/ ")
raise unless system("pushd tmp/ && zip -q -9 -rX '#{file}' 'mimetype' '*' && popd")
end
def filesize(file)
'%.2f' % (File.size(file).to_f / 2**20)
end
@rb2k
rb2k / gist:5f8a881a698ff20ba2ba
Last active August 29, 2015 14:06
apple iphone 6 search
require 'json'
require 'open-uri'
phones = {
'64 gb silver tmo' => 'MG5C2LL%2FA',
'64 gb gray tmo' => 'MG5A2LL%2FA'
}
zip_code = '02138'
hiermit bestätigen wir Ihnen den Eingang Ihrer Anfrage und können Ihnen ergänzend folgende Informationen hierzu geben:
Das Bundesministerium des Innern und die U.S.-Behörden haben eine Verknüpfung der jeweiligen nationalen Trusted Traveler Programme vereinbart. Auf U.S.-Seite handelt es sich um das System Global Entry und auf deutscher Seite um die Automatisierte Biometriegestützte Grenzkontrolle (ABG). Diese Kooperationsvereinbarung ermöglicht es, am Global Entry registrierten U.S.-Staatsangehörigen an der ABG und umgekehrt an der ABG registrierten deutschen Staatsangehörigen am Global Entry teilzunehmen (Vielfliegerprogramm). Die Aufnahme in das Global Entry System über die Onlineregisrierung GOES erfordert daher die vorherige Teilnahme / Registrierung an der ABG.
Reisende werden bei uns im Servicecenter der Bundespolizei somit zunächst im deutschen ABG-Programm (Retinascan) registriert. Dazu benötigen wir einen gültigen, maschinenlesbaren Reisepass (mit Chip). Die Registrierung ist derzeit ausschließlic
2.1.1 :001 > require 'oj'
=> true
2.1.1 :002 > require 'multi_json'
=> true
2.1.1 :003 > MultiJson.dump({:test => 'bla'})
=> "{\"test\":\"bla\"}"

httpclient - HTTP accessing library. Copyright (C) 2000-2012 NAKAMURA, Hiroshi [email protected].

'httpclient' gives something like the functionality of libwww-perl (LWP) in Ruby. 'httpclient' formerly known as 'http-access2'.

See HTTPClient for documentation.

== Features