Skip to content

Instantly share code, notes, and snippets.

View indrayam's full-sized avatar
💭
Onwards and upwards

Anand Sharma indrayam

💭
Onwards and upwards
View GitHub Profile
<!-- HA setup; may be overridden with $JENKINS_HOME/jgroups.xml -->
<config xmlns="urn:org:jgroups"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-3.1.xsd">
<TCP loopback="false"
recv_buf_size="${tcp.recv_buf_size:128K}"
send_buf_size="${tcp.send_buf_size:128K}"
max_bundle_size="64K"
max_bundle_timeout="30"
use_send_queues="true"
@alecthegeek
alecthegeek / go-install-tools
Last active September 3, 2015 18:18
Set up a "standard" go project workspace with support for 3rdparty modules, version control repo and a template main package
# Install all the Go tools and godep tool
# Location of gobin is based on installation by OS X Homebrew
sudo -u admin GOPATH=/tmp GOBIN=/usr/local/opt/go/bin go get -u golang.org/x/tools/cmd/...
sudo -u admin GOPATH=/tmp GOBIN=/usr/local/opt/go/bin go get -u github.com/tools/godep
anonymous
anonymous / gist:8397963
Created January 13, 2014 10:36
Java Build Tools Report Part 2 - Gradle build script
apply plugin: 'java'
apply plugin: 'war'
apply plugin: HelloPlugin
group = 'org.springframework.samples'
version = '1.0.0-SNAPSHOT'
description = "petclinic"
sourceCompatibility = 1.7
@castrojo
castrojo / phase
Created September 18, 2017 16:00
$ ./kubeadm init
...
[preflight] Running pre-flight checks
...
kubeadm phase preflight

RabbitMQ Basics

As demonstrated by the tutorials on the website, RabbitMQ can be used for everything from queuing background work to building RPC systems. To use RabbitMQ effectively, it is important to understand the core concepts: queues, exchanges, bindings, and messages. The documentation on rabbitmq.com is excellent, so I won't go into much depth, but it's worth briefly mentioning the core ideas.

Basic Terminology

Exchanges are where messages are sent. Every time a message is pushed in to RabbitMQ, it goes through an exchange.

@alq666
alq666 / carbon-relay.md
Created July 31, 2012 18:45
Setting up carbon-relay

For ubuntu:

Install graphite

sudo add-apt-repository ppa:muffinresearch/graphite
sudo apt-get update
sudo apt-get install python-graphite

Create /etc/carbon/relay-rules.conf

apiVersion: v1
kind: Namespace
metadata:
name: istio-system
labels:
istio-injection: disabled
---
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
@sjl
sjl / ext.vim
Created December 15, 2014 18:58
ways to run external commands in vim
" run command
" no stdin
" output displayed in "Press enter to continue" style
" current buffer untouched
:!uptime
" run command
" pipe range of text to command on stdin
" output replaces the range in the current buffer
:RANGE!grep foo
@nmagee
nmagee / retrieve-ec2-instance-types.sh
Last active November 25, 2019 12:26
Query the AWS Pricing API to get all currently available EC2 instance types
#!/bin/bash
curl https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/AmazonEC2/current/index.json | jq -r '.products[].attributes["instanceType"]' | sort -u | grep '\.'
@neuroticnerd
neuroticnerd / landrush.rst
Last active February 2, 2020 22:14
Vagrant landrush DNS plugin tips and troubleshooting

landrush

landrush is an excellent Vagrant plugin if you are trying to develop or test in a multi-machine VM environment. It works by spinning up a small local DNS server and registering the private network IPs of each machine during vagrant up so that they can be accessed via their hostname in both the host machine as well as the other guest machines. A great bonus of using landrush is that the VMs can be defined in separate Vagrantfiles (e.g. if you have separate git repos for building different machines).

useful commands

  • vagrant landrush status - show whether the DNS server