Skip to content

Instantly share code, notes, and snippets.

View minhdanh's full-sized avatar

Minh-Danh minhdanh

View GitHub Profile
Jul 26 00:52:17 192-168-45-10 nomad[2148]: http: Request /v1/agent/servers (67.036µs)
Jul 26 00:52:27 192-168-45-10 nomad[2148]: http: Request /v1/agent/servers (252.952µs)
Jul 26 00:52:37 192-168-45-10 nomad[2148]: http: Request /v1/agent/servers (265.374µs)
Jul 26 00:52:47 192-168-45-10 nomad[2148]: http: Request /v1/agent/servers (262.459µs)
Jul 26 00:52:57 192-168-45-10 nomad[2148]: http: Request /v1/agent/servers (65.531µs)
Jul 26 00:53:07 192-168-45-10 nomad[2148]: http: Request /v1/agent/servers (306.963µs)
Jul 26 00:53:10 192-168-45-10 nomad[2148]: client: updated allocations at index 23 (pulled 0) (filtered 0)
Jul 26 00:53:10 192-168-45-10 nomad[2148]: client: allocs: (added 0) (removed 0) (updated 0) (ignore 0)
Jul 26 00:53:10 192-168-45-10 nomad[2148]: client: updated allocations at index 26 (pulled 1) (filtered 0)
Jul 26 00:53:10 192-168-45-10 nomad[2148]: client: allocs: (added 1) (removed 0) (updated 0) (ignore 0)
@minhdanh
minhdanh / kafka-move-leadership.sh
Created March 16, 2016 02:28 — forked from miguno/kafka-move-leadership.sh
A simple Ops helper script for Apache Kafka to generate a partition reassignment JSON snippet for moving partition leadership away from a given Kafka broker. Use cases include 1) safely restarting a broker while minimizing risk of data loss, 2) replacing a broker, 3) preparing a broker for maintenance.
#!/usr/bin/env bash
#
# File: kafka-move-leadership.sh
#
# Description
# ===========
#
# Generates a Kafka partition reassignment JSON snippet to STDOUT to move the leadership
# of any replicas away from the provided "source" broker to different, randomly selected
# "target" brokers. Run this script with `-h` to show detailed usage instructions.
@minhdanh
minhdanh / gist:14c379a31b71c5a85c02
Last active April 17, 2020 15:28
nodogsplash.conf
#
# Nodogsplash Configuration File
#
# Parameter: GatewayInterface
# Default: NONE
#
# GatewayInterface is not autodetected, has no default, and must be set here.
# Set GatewayInterface to the interface on your router
# that is to be managed by Nodogsplash.
@minhdanh
minhdanh / register_domain.py
Last active August 29, 2015 14:18
Python script to register domain using DNSimple API
from dnsimple import DNSimple
import time
import daemon
import logging
dns = DNSimple(email="my_email@example.com", api_token="YOUR_API_TOKEN")
logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
fh = logging.FileHandler("./your-desired-domain.log")
formatter = logging.Formatter('%(asctime)s - %(levelname)s - %(message)s')
#
# This file configures the New Relic Agent. New Relic monitors
# Ruby, Java, .NET, PHP, and Python applications with deep visibility and low overhead.
# For more information, visit www.newrelic.com.
#
# Generated April 28, 2014
#
# This configuration file is custom generated for SimpleIMS