- 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 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
# Checkout config tool: https://zed0.co.uk/clang-format-configurator/ | |
# Or http://cf.monofraps.net/ | |
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html | |
# https://github.com/01org/parameter-framework/blob/master/.clang-format | |
# Tested on: clang-format version 6.0.1 | |
# Common settings | |
BasedOnStyle: WebKit |
This file contains 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
package com.dexode.fragment; | |
import android.annotation.TargetApi; | |
import android.app.Activity; | |
import android.os.Build; | |
import android.os.Bundle; | |
import android.os.Handler; | |
import android.support.v4.app.Fragment; | |
import android.view.KeyEvent; |
This file contains 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
#!/usr/bin/python | |
import sys | |
import os | |
import json | |
from shutil import copyfile | |
print('Number of arguments:', len(sys.argv), 'arguments.') | |
if len(sys.argv) < 3: |
This file contains 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
docker logs $container 2>&1 | grep -P "\[(W|E)\]" | |
Example: | |
``` | |
04-16 22:04:19.222 [E](StatsApp) Animation has no fills: 1 in 0 | |
04-16 22:27:24.239 [E](StatsApp) Animation has no fills: 1 in 0 | |
``` |
This file contains 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
#import <UIKit/UIKit.h> | |
//Based on: https://github.com/aclissold/CardView | |
@interface CardView : UIView | |
@end |
This file contains 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
#!/bin/bash | |
# http://stackoverflow.com/a/35822173/1052261 | |
# http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in | |
SOURCE="${BASH_SOURCE[0]}" | |
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink | |
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" | |
SOURCE="$(readlink "$SOURCE")" | |
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located | |
done |
This file contains 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
assignee was currentUser() during (startOfDay(-2w), now()) AND updated >= startOfDay(-2w) AND ( resolutiondate is EMPTY OR resolutiondate >= startOfDay(-2w) ) |
NewerOlder