Skip to content

Instantly share code, notes, and snippets.

View paulcalabro's full-sized avatar

Paul Calabro paulcalabro

View GitHub Profile
@paulcalabro
paulcalabro / redis_bulk.sh
Created October 23, 2015 19:11 — forked from egemenyildiz/redis_bulk.sh
[LUA] Redis bulk/batch operation scripts (rename, delete)
# Bulk deletes keys start with "prefix"
EVAL "for i, name in ipairs(redis.call('KEYS', 'prefix*')) do redis.call('DEL', name); end" 0
# Bulk renames keys start with "prefix" to "postfix".
# e.g. prefixwithtail -> postfixwithtail
EVAL "for i, name in ipairs(redis.call('KEYS', 'prefix*')) do local x = string.gsub(name, 'pre', 'post'); redis.call('RENAME', name, x); end" 0
@paulcalabro
paulcalabro / JolokiaCommands.md
Created June 15, 2017 19:12 — forked from yashpatil/JolokiaCommands.md
Jolokia URLs for quick access to A-MQ statistics

This is a quick reference to get to Jolokia statistics urls for JBoss Fuse or JBoss A-MQ statistics. Sometimes, when you are interested in very specific attributes, it's easier to keep monitoring a specific url rather than loading the full Hawtio console.

@paulcalabro
paulcalabro / replication.sh
Created June 26, 2017 01:10 — forked from valerysntx/replication.sh
Replicates mysql realtime from many to many databases
git clone https://github.com/mysqlDBReplication/replication
- Replicates mysql realtime from many to many databases
https://github.com/mysqlDBReplication/replication/blob/master/src/Master-Master_configuration
SETTING UP MASTER MASTER CONFIGURATION OF MYSQL ON UBUNTU
STEP 1
Install the mysql-server and mysql-client in both the servers
@paulcalabro
paulcalabro / mule
Created July 21, 2017 03:03 — forked from rhoegg/mule
RHEL init.d script for Mule ESB
#!/bin/bash
# RHEL Mule Init Script
#
# chkconfig: 2345 65 64
# description: Mule ESB service
. /etc/init.d/functions
#
if [ -f /etc/sysconfig/mule ]; then
. /etc/sysconfig/mule
@paulcalabro
paulcalabro / pedantically_commented_playbook.yml
Created October 18, 2017 20:36 — forked from marktheunissen/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
@paulcalabro
paulcalabro / tweet_dumper.py
Created October 19, 2017 23:07 — forked from yanofsky/LICENSE
A script to download all of a user's tweets into a csv
#!/usr/bin/env python
# encoding: utf-8
import tweepy #https://github.com/tweepy/tweepy
import csv
#Twitter API credentials
consumer_key = ""
consumer_secret = ""
access_key = ""
@paulcalabro
paulcalabro / CustomBusinessEventComponent.java
Created November 23, 2017 10:51 — forked from djuang1/CustomBusinessEventComponent.java
Java code to create Business Event in Mule Management Console (MMC)
package com.mulesoft.dejim;
import java.util.HashMap;
import java.util.Map;
//import org.apache.commons.logging.Log;
//import org.apache.commons.logging.LogFactory;
import org.mule.DefaultMuleEvent;
import org.mule.MessageExchangePattern;
import org.mule.api.MuleEvent;
@paulcalabro
paulcalabro / php_apache_homebrew.md
Created January 31, 2018 15:56 — forked from DragonBe/php_apache_homebrew.md
Installation of Apache 2.4 and PHP 7.1 with Homebrew

I posted several talks about compiling PHP from source, but everyone was trying to convince me that a package manager like Homebrew was a more convenient way to install.

The purpose of Homebrew is simple: a package manager for macOS that will allow you to set up and install common packages easily and allows you to update frequently using simple commands.

I used a clean installation of macOS Sierra to ensure all steps could be recorded and tested. In most cases you already have done work on your Mac, so chances are you can skip a few steps in this tutorial.

Apache and PHP with homebrew

I’ve made this according to the installation instructions given on GetGrav.

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@paulcalabro
paulcalabro / configure-macos.sh
Created January 9, 2018 21:17 — forked from seize-the-dave/configure-macos.sh
Script to install everything onto a new Mac
# Install command line developer tools
xcode-select --install
# Install Brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Reset brew
brew update && brew upgrade brew-cask && brew cleanup && brew cask cleanup
# Install HTTPIE