Skip to content

Instantly share code, notes, and snippets.

@mdemblani
mdemblani / amazon-cloudwatch-agent.log
Last active September 18, 2022 18:08
Cloudwatch Agent Configuration Snippets
2020-05-06T10:17:35Z I! will use file based credentials provider
2020-05-06T10:17:35Z I! cloudwatch: publish with ForceFlushInterval: 1m0s, Publish Jitter: 37s
2020-05-06T10:17:35Z I! Starting AmazonCloudWatchAgent (version 1.237768.0)
2020-05-06T10:17:35Z I! Loaded outputs: cloudwatch cloudwatchlogs
2020-05-06T10:17:35Z I! Loaded inputs: tail cpu diskio processes statsd swap disk mem netstat socket_listener
2020-05-06T10:17:35Z I! Tags enabled: host=ip-X-X-X-X
2020-05-06T10:17:35Z I! Agent Config: Interval:1m0s, Quiet:false, Hostname:"ip-X-X-X-X", Flush Interval:1s
2020-05-06T10:17:35Z I! Started the statsd service on :8125
2020-05-06T10:17:35Z I! Statsd listener listening on: [::]:8125
2020-05-06T10:17:35Z I! will use file based credentials provider
@ceshine
ceshine / detector.py
Last active April 22, 2020 05:57
A Simple CJK Language Detector
import re
def cjk_detect(texts):
# korean
if re.search("[\uac00-\ud7a3]", texts):
return "ko"
# japanese
if re.search("[\u3040-\u30ff]", texts):
return "ja"
@merikan
merikan / Jenkinsfile
Last active May 21, 2024 08:52
Some Jenkinsfile examples
Some Jenkinsfile examples
@DeviaVir
DeviaVir / redis-sentinel
Last active February 13, 2019 20:06
An init.d script for redis sentinel, to have it run as a daemon instead of in a screen. (Tested on CentOS 6)
#!/bin/sh
#
# redis - this script starts and stops the redis-server daemon
#
# chkconfig: - 85 15
# description: Redis is a persistent key-value database
# processname: redis-server
# config: /etc/redis/redis.conf
# config: /etc/sysconfig/redis
# pidfile: /var/run/redis.pid