0. Create kafka user
sudo adduser kafka
sudo adduser kafka sudo
su -l kafka
1. Download and Install kafka archive
| import { | |
| ActionContext, | |
| ActionTree, | |
| GetterTree, | |
| MutationTree, | |
| Module, | |
| Store as VuexStore, | |
| CommitOptions, | |
| DispatchOptions, | |
| } from 'vuex' |
| import { createStore } from 'vuex'; | |
| // The modules to import | |
| import auth, { Store as AuthStore, State as AuthState } from './auth'; | |
| import counter, { Store as CounterStore, State as CounterState } from './counter'; | |
| // A State type with all the submodules | |
| type State = { | |
| auth: AuthState; | |
| counter: CounterState; |
| # -*- coding: utf-8 -*- | |
| # | |
| # Author: Vegard Nossum <[email protected]> | |
| import math | |
| import os | |
| import sys | |
| import cairo |
| class ComponentCommit(db.Model): | |
| __tablename__ = 'component_version' | |
| __table_args__ = ( | |
| db.UniqueConstraint('component_id', 'commit_id', name='unique_component_commit'), | |
| ) | |
| id = db.Column(db.Integer, primary_key=True) | |
| component_id = db.Column(db.Integer, db.ForeignKey("component.id")) | |
| commit_id = db.Column(db.String) | |
| branch = db.Column(db.String) | |
| dependencies = db.Column(db.Text) |
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| # This script to install Kubernetes will get executed after we have provisioned the box | |
| $script = <<-SCRIPT | |
| # Install kubernetes | |
| apt-get update && apt-get install -y apt-transport-https | |
| curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - | |
| cat <<EOF >/etc/apt/sources.list.d/kubernetes.list |
| <!-- refer generated css/js file --> | |
| <link rel="stylesheet" href="{{$.Site.BaseURL}}/{{ if eq (getenv "APP_ENV") "dev" }}main.css{{ else }}{{ index .Site.Data.manifest "main.css" | relURL }}{{ end }}"> | |
| <script type="text/javascript" src="{{$.Site.BaseURL}}/{{ if eq (getenv "APP_ENV") "dev" }}main.js{{ else }}{{ index .Site.Data.manifest "main.js" | relURL }}{{ end }}"></script> |
| <template> | |
| <el-menu :router="true" :default-active="activeLink"> | |
| <template v-for="rule in $router.options.routes"> | |
| <el-submenu v-if="rule.children && rule.children.length > 0" | |
| :index="rule.path" | |
| > | |
| <template slot="title"><i :class="rule.icon"></i>{{ rule.title }}</template> | |
| <el-menu-item v-for="child in rule.children" :index="rule.path + '/' + child.path">{{ child.title }}</el-menu-item> | |
| </el-submenu> | |
| <el-menu-item v-else |
| #!/usr/bin/env python | |
| import subprocess | |
| from multiprocessing import Pool | |
| from functools import partial | |
| import argparse | |
| import sys | |
| from itertools import chain | |
| def execute_playbook(ansible_string, pb): |
| Here's how to make jQuery DataTables work with npm and webpack. This is the simplest way I found to do it. | |
| See the previous revision of this gist for a way to do it with forcing AMD to be disabled if you need that. | |
| Install DT core: npm install datatables.net | |
| Install a DT style: npm install datatables.net-dt | |
| Then to initialize DT in your app, do this in your main entry point: | |
| // you can use import or require | |
| import dt from 'datatables.net'; |