Skip to content

Instantly share code, notes, and snippets.

@ntk148v
ntk148v / ansible-summary.md
Created May 6, 2016 03:13
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of

@ntk148v
ntk148v / install.sh
Last active May 14, 2016 03:18
#Openstack #ec2 api #install.sh
#!/bin/bash -e
#Parameters to configure
SERVICE_USERNAME=ec2api
SERVICE_PASSWORD=ec2api
SERVICE_TENANT=service
CONNECTION="mysql://ec2api:ec2api@127.0.0.1/ec2api?charset=utf8"
LOG_DIR=/var/log/ec2api
CONF_DIR=/etc/ec2api
NOVA_CONF=/etc/nova/nova.conf
@ntk148v
ntk148v / baocao.md
Last active May 20, 2016 04:53
#InfluxDB #Kapacitor

BÁO CÁO

Tổ chức Data Model.

Measurement Tag1 Tag2 Field1 Field2 Field3 Time
download_speed snode dnode speed mean_deviation acceleration
tcp_three_way_handshake_time snode dnode value
time_to_first_byte snode dnode value
round_trip_time snode dnode value

Note về bài tập lớn Hệ Cơ sở dữ liệu đa phương tiện.

Yêu cầu.

Phân đoạn video đơn giản (phát hiện các shot) sử dụng đặc trưng toàn cục Sử dụng OpenCV để thực hiện cài đặt 1 ứng dụng phân đoạn video đơn giản.

Yêu cầu cơ bản: Input : 1 Video Output : các đoạn video và các keyframe tương ứng

  1. Install Nagios Core and Nagios Plugins first.
  2. Download NRPE:
  curl -L -O http://downloads.sourceforge.net/project/nagios/nrpe-2.x/nrpe-2.15/nrpe-2.15.tar.gz
  1. Extract the NRPE archive:
# default: on
# description: NRPE (Nagios Remote Plugin Executor)
service nrpe
{
flags = REUSE
socket_type = stream
port = 5666
wait = no
user = nagios
group = nagios
  1. Install NRPE and Nagios Plugins.
  sudo apt-get install nagios-nrpe-server nagios-plugins
  1. Configure NRPE. Change your nrpe configurtion, open /etc/nagios/nrpe.cfg then change these lines:
#############################################################################
# Sample NRPE Config File
# Written by: Ethan Galstad (nagios@nagios.org)
#
# Last Modified: 11-23-2007
#
# NOTES:
# This is a sample configuration file for the NRPE daemon. It needs to be
# located on the remote host that is running the NRPE daemon, not the host
# from which the check_nrpe client is being executed.

##########

BASICS

##########

To make changes:

git add path/to/file1 path/to/file2
git commit -m "templates: Changed the XX template to do XX"

To push that to the central server (which makes it available for deployment):

@ntk148v
ntk148v / ridge.py
Created September 27, 2016 02:11 — forked from diogojc/ridge.py
Ridge Regression
#!/usr/bin/python
# -*- coding: utf-8 -*-
import numpy as np
import matplotlib.pyplot as plt
class RidgeRegressor(object):
"""
Linear Least Squares Regression with Tikhonov regularization.