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 / 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.
@ntk148v
ntk148v / install_byobu_centos.sh
Last active September 22, 2017 07:30 — forked from kranzrm/install_byobu_centos.sh
Install byobu on CentOS (7.x)
#!/bin/bash
yum install wget
wget http://download.fedoraproject.org/pub/epel/7/x86_64/epel-release-7-10.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm
yum install byobu
byobu-enable
# Default Key Bindings
# F2 -> Create new window
@ntk148v
ntk148v / local.conf
Created January 27, 2017 09:36 — forked from amotoki/local.conf
local.conf (Mitaka) - Almost all services are enabled with Neutron
[[local|localrc]]
#OFFLINE=True
RECLONE=True
HORIZON_BRANCH=stable/mitaka
KEYSTONE_BRANCH=stable/mitaka
NOVA_BRANCH=stable/mitaka
NEUTRON_BRANCH=stable/mitaka
GLANCE_BRANCH=stable/mitaka
CINDER_BRANCH=stable/mitaka
@ntk148v
ntk148v / dispatch.py
Created February 6, 2017 09:29 — forked from aortbals/dispatch.py
Synchronize two folders using python.
#! /usr/bin/python
# Dispatch - synchronize two folders
import os
import filecmp
import shutil
from stat import *
class Dispatch:
''' This class represents a synchronization object '''
@ntk148v
ntk148v / README.md
Created February 28, 2017 17:48 — forked from mbbx6spp/README.md
Gerrit vs Github for code review and codebase management

Gerrit vs Github: for code review and codebase management

Sure, Github wins on the UI. Hands down. But, despite my initial annoyance with Gerrit when I first started using it almost a year ago, I am now a convert. Fully. Let me tell you why.

Note: This is an opinionated (on purpose) piece. I assume your preferences are like mine on certain ideas, such as:

  • Fast-forward submits to the target branch are better than allowing merge commits to the target branch. The reason I personally prefer this is that, even if a non-conflicting merge to the target branch is possible, the fact that the review/pull request is not up to date with the latest on the target branch means feature branch test suite runs in the CI pipeline reporting on the review/PR may not be accurate. Another minor point is that forced merge commits are annoying as fuck (opinion) and clutter up Git log histories unnecessarily and I prefer clean histories.
  • Atomic/related changes all in one commit is something worth striving for. Having your dev
@ntk148v
ntk148v / git.migrate
Created April 20, 2017 02:46 — forked from niksumeiko/git.migrate
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
@ntk148v
ntk148v / gist:3f4dc26d3916bdb88fb66d222aac062d
Created May 1, 2017 01:45 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@ntk148v
ntk148v / local.conf
Last active June 2, 2017 02:46 — forked from toanalien/local.conf
local.conf for devstack stable/mitaka
[[local|localrc]]
# Modify to your environment
#FIXED_RANGE=10.0.0.0/24
#FLOATING_RANGE=192.168.1.224/27
#PUBLIC_NETWORK_GATEWAY=192.168.1.225
#PUBLIC_INTERFACE=em1
#PHYSICAL_NETWORK=public
#OVS_PHYSICAL_BRIDGE=br-ex
#HOST_IP=104.199.204.70
@ntk148v
ntk148v / 00-MapSideJoinDistCacheTextFile
Created June 12, 2017 16:14 — forked from airawat/00-MapSideJoinDistCacheTextFile
Map-side join example - Java code for joining two datasets - one large (tsv format), and one with lookup data (text), made available through DistributedCache
This gist demonstrates how to do a map-side join, loading one small dataset from DistributedCache into a HashMap
in memory, and joining with a larger dataset.
Includes:
---------
1. Input data and script download
2. Dataset structure review
3. Expected results
4. Mapper code
5. Driver code