- Template name:
telegram.message - Content:
{{- /* Telegram message to use: {{ template "telegram.message2" . }} */ -}} {{ define "__alerts_list" -}} {{ range . }} {{if ne (index .Labels "alertname") "" -}} {{ if eq .Status "firing" }}🔴{{ else }}🟢{{ end }} {{- if ne (index .Labels "severity") "" -}} <u><b>P{{ index .Labels "severity" }}</b></u> {{ end -}}
This file contains hidden or 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
| provider "aws" { | |
| access_key = "${var.access_key}" | |
| secret_key = "${var.secret_key}" | |
| region = "${var.region}" | |
| } | |
| resource "aws_iam_role" "iam_for_terraform_lambda" { | |
| name = "app_${var.app_env}_lambda" | |
| assume_role_policy = <<EOF | |
| { |
Usually if you screw up the configuration.nix you can rollback to a previous generation during boot.
Then you use https://nixos.org/nixos/manual/#sec-rollback to fix the rollback generation.
However if you really screw it up, and none of the generations work, you may need use a recovery method.
Get a NixOS ISO (it's best to get one that has a same or similar version as your current one).
Summarized from https://stgraber.org/2016/03/19/lxd-2-0-your-first-lxd-container-312/.
Interestingly, the LXD command line client is named.... lxc!
lxc image list ubuntu: # ubuntu: is officially supported image source
lxc image list images: # images: is an unsupported source
lxc image alias list images: # lists user-friendly names
This file contains hidden or 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
| /* | |
| This functions opens a video file and extracts the frames and put them into a vector of Mat(its the class for representing an img) | |
| */ | |
| void extract_frames(const string &videoFilePath,vector<Mat>& frames){ | |
| try{ | |
| //open the video file | |
| VideoCapture cap(videoFilePath); // open the video file | |
| if(!cap.isOpened()) // check if we succeeded | |
| CV_Error(CV_StsError, "Can not open Video file"); |