kubectl -n kube-system create sa tiller
kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller
helm init --service-account tiller
#!/bin/bash | |
set -e | |
cf_ips() { | |
echo "# https://www.cloudflare.com/ips" | |
for type in v4 v6; do | |
echo "# IP$type" | |
curl -sL "https://www.cloudflare.com/ips-$type/" | sed "s|^|allow |g" | sed "s|\$|;|g" |
<template> | |
<div class="wrapper"> | |
<div class="box" @scroll="handleScroll"> | |
<p>Your content here...</p> | |
</div> | |
<a href="#" v-if="hasScrolledToBottom">Show After Scrolling</a> | |
</div> | |
</template> | |
<script> | |
export default { |
#!/bin/bash | |
bucket=$1 | |
set -e | |
echo "Removing all versions from $bucket" | |
versions=`aws s3api list-object-versions --bucket $bucket |jq '.Versions | .[] | select(.IsLatest | not)'` | |
markers=`aws s3api list-object-versions --bucket $bucket |jq '.DeleteMarkers'` |
- What do Etcd, Consul, and Zookeeper do?
- Service Registration:
- Host, port number, and sometimes authentication credentials, protocols, versions numbers, and/or environment details.
- Service Discovery:
- Ability for client application to query the central registry to learn of service location.
- Consistent and durable general-purpose K/V store across distributed system.
- Some solutions support this better than others.
- Based on Paxos or some derivative (i.e. Raft) algorithm to quickly converge to a consistent state.
- Service Registration:
- Centralized locking can be based on this K/V store.
-
Check if Ubuntu Linux Kernel version is 4.9
$ uname -r
-
If not, follow the link http://www.yourownlinux.com/2016/12/how-to-install-linux-kernel-4-9-0-in-linux.html instructions to update your Ubuntu Linux Kernel to 4.9
-- Create a group | |
CREATE ROLE readaccess; | |
-- Grant access to existing tables | |
GRANT USAGE ON SCHEMA public TO readaccess; | |
GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess; | |
-- Grant access to future tables | |
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess; |
FROM php:7.1-fpm | |
ENV LIBEVENT_VERSION=2.0.22 | |
RUN apt-get -y update && \ | |
apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libmcrypt-dev \ | |
libpng12-dev libmemcached-dev libmysqlclient-dev libicu-dev libcurl4-nss-dev \ | |
libzmq-dev libpq-dev libyaml-dev zlib1g-dev \ | |
curl git wget netcat && \ | |
rm -rf /var/lib/apt/lists/* |
Sometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.
git revert {commit_id}
Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32: