Skip to content

Instantly share code, notes, and snippets.

@stevenmunro
stevenmunro / consul-a-install.txt
Created January 24, 2019 02:24 — forked from sdorsett/consul-a-install.txt
install 3 node consul cluster on Centos 7
yum install -y epel-release
yum install -y bind-utils unzip jq
cd ~/
wget https://releases.hashicorp.com/consul/1.0.2/consul_1.0.2_linux_amd64.zip
unzip consul_1.0.2_linux_amd64.zip
mv consul /usr/local/bin/
adduser consul
mkdir /etc/consul.d
chown -R consul:consul /etc/consul.d/
mkdir /var/consul
@stevenmunro
stevenmunro / docker-compose.yml
Last active September 19, 2018 23:04 — forked from langhard/docker-compose.yml
Invoice-Ninja for Rancher
version: '2'
services:
app:
image: invoiceninja/invoiceninja
environment:
DB_DATABASE: ninja
DB_HOST: mysql
DB_PASSWORD: pwd
DB_USERNAME: ninja
volumes:
<Default>
GlobalDownload 5m #total speed download for all clients
GlobalUpload 0 #total speed download for all clients (0 for unlimited)
Download 0 #limit speed download for each connection
Upload 0 #unlimit speed upload for each connection
StayAtHome true #limit client to his home
VirtualChroot true #fake a chroot to the home account
LimitConnection 50 #max connection for the server sftp
LimitConnectionByUser 20 #max connection for the account
LimitConnectionByIP 20 #max connection by ip for the account
* soft nofile 10000000
* hard nofile 10000000
root soft nofile 10000000
root hard nofile 10000000
# /etc/sysctl.conf - Configuration file for setting system variables
# See /etc/sysctl.d/ for additional system variables.
# See sysctl.conf (5) for information.
#
#kernel.domainname = example.com
# Uncomment the following to stop low-level messages on console
#kernel.printk = 3 4 1 3
We couldn’t find that file to show.
@stevenmunro
stevenmunro / alpha_control.php
Last active September 3, 2024 16:34
How to add a color control with alpha/opacity to the WordPress theme customizer
<?php
// See full blog post here
// http://pluto.kiwi.nz/2014/07/how-to-add-a-color-control-with-alphaopacity-to-the-wordpress-theme-customizer/
function pluto_add_customizer_custom_controls( $wp_customize ) {
class Pluto_Customize_Alpha_Color_Control extends WP_Customize_Control {
public $type = 'alphacolor';