Skip to content

Instantly share code, notes, and snippets.

@boly38
boly38 / rabbitStateAndPurge.sh
Last active August 13, 2019 08:34
shell script to state and purge RabbitMQ queues using RabbitMQ Management HTTP API (https://pulse.mozilla.org/api/) and Jq JSON Processor (https://stedolan.github.io/jq/) #rabbitmq #purge #bash #script #jq #json
#!/bin/bash
#
# This Gist is under MIT License
#
# Copyright 2018 Orange - Brice Vandeputte
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
#
@DrSnowbird
DrSnowbird / docker-ce-install-CentOS7.sh
Last active August 13, 2019 08:34
Docker-CE install over CentOS 7.x
#!/bin/bash -x
# maintainer [email protected]
# ref: https://docs.docker.com/install/linux/docker-ce/centos/#os-requirements
# Ref: https://docs.docker.com/install/linux/docker-ce/centos/#set-up-the-repository
# -- To Use Overlay2 driver or not: 1 (Yes), 0 (No) --
# -- Default 0 (NO): use default Docker setup, i.e., devicemapper loop (not for scaling!) --
OVERLAY2_DRIVER=${1:-0}
kubectl get services # List all services
kubectl get pods # List all pods
kubectl get nodes -w # Watch nodes continuously
kubectl version # Get version information
kubectl cluster-info # Get cluster information
kubectl config view # Get the configuration
kubectl describe node <node> # Output information about a node
kubectl get pods # List the current pods
kubectl describe pod <name> # Describe pod <name>
kubectl get rc # List the replication controllers
@baymaxium
baymaxium / content.md
Created October 18, 2017 08:09
魅族容器云平台基于k8s的自动化运维实践

原文:高效运维

解放您的双眼,扫码听在线课堂

作者简介:

@3Hren
3Hren / IPVS.md
Last active April 26, 2025 13:46

Hub as a Gateway

Miners are required to have a public IP address and a properly configured firewall to make all things work properly. But sometimes it is not possible due to either security, privacy or provider limitations. This also includes miners behind the NAT.

To be able to work with these miners a Hub can be configured as a gateway.

Note: we assume that it is possible to build a private network between Hub and miners.

NAT

@monkeym4ster
monkeym4ster / docker.sh
Created July 6, 2017 06:04
Docker: save/load container using tgz file (tar.gz)
#for not running docker, use save:
docker save <dockernameortag> | gzip > mycontainer.tgz
#for running or paused docker, use export:
docker export <dockernameortag> | gzip > mycontainer.tgz
#load
gunzip -c mycontainer.tgz | docker load
@a-yee
a-yee / nvimCondaEnv.txt
Last active December 24, 2024 11:53
Setting up neovim python3 environment using conda
# bash commands
# lists all of your conda env
conda env list
# Create a conda env w/ python3.5
# -n sets the name for your new env. I call it neovim here
conda create -n neovim python=3.5
# add neovim for python3 to the env
# specify version you want here, 0.1.13 up to date ver atm
@Tset-Noitamotua
Tset-Noitamotua / README.md
Last active January 13, 2025 12:19
HOW-TO enable MarkDown support in RobotFramework

HOW-TO enable MarkDown support in RobotFramework

You want to execute robot test which are inside fenced code blocks of a markdown file (.md) like any normal robot test? Follow the steps below then you can run your tests as simple as robot your_test_suite.md with all robot command line execution options.

This will add support for .md files to RF

  1. Clone [RobotFramework][4] repository
  2. Save the code below as 'mdreader.py' in parsing folder of your local clone. It's based on [restreader.py][1]
  3. Add this from .mdreader import MarkDownReader [here][2] to your local clone.
@iguoli
iguoli / LoadBalance.md
Last active August 13, 2019 08:36
负载均衡学习
@ys-qb
ys-qb / hacluster..md
Created April 4, 2017 09:37
HA cluster

HA


SPOF

A single point of failure (SPOF) is a part of a system that, if it fails, will stop the entire system from working.

source: wikipedia