Skip to content

Instantly share code, notes, and snippets.

View n-my's full-sized avatar

Nico Monchy n-my

View GitHub Profile
@n-my
n-my / redshift.tf
Created October 26, 2016 14:04
TF template for an encrypted Redshift cluster
resource "aws_redshift_cluster" "rs_cluster" {
cluster_identifier = "${var.cluster_identifier}"
database_name = "${var.database_name}"
master_username = "${var.master_username}"
master_password = "${var.master_password}"
node_type = "${var.node_type}"
cluster_type = "${var.cluster_type}"
number_of_nodes = "${var.number_of_nodes}"
vpc_security_group_ids = ["${aws_security_group.redshift.id}"]
publicly_accessible = "${var.publicly_accessible}"

Keybase proof

I hereby claim:

  • I am n-my on github.
  • I am nmy (https://keybase.io/nmy) on keybase.
  • I have a public key whose fingerprint is 0506 CC77 D338 A6B8 0A23 06A0 2651 8D76 2F95 7F4F

To claim this, I am signing this object:

@n-my
n-my / new_relic_PHP_agent_installation
Last active February 3, 2017 17:06
Install the New Relic PHP agent with Packer and Terraform via the user data
### Packer
# Install New Relic
echo 'deb http://apt.newrelic.com/debian/ newrelic non-free' | tee /etc/apt/sources.list.d/newrelic.list
apt-get install -y ca-certificates
wget -q -O /tmp/548C16BF.gpg https://download.newrelic.com/548C16BF.gpg
apt-key add /tmp/548C16BF.gpg
apt-get update -q
echo newrelic-php5 newrelic-php5/application-name string "__NEW_RELIC_APP_NAME__" | debconf-set-selections
echo newrelic-php5 newrelic-php5/license-key string "__NEW_RELIC_LICENSE__" | debconf-set-selections
@n-my
n-my / cloudwatch_logs_agent_installation
Created February 3, 2017 17:01
Install the Cloudwatch Logs agent with Packer and Terraform via the user data
### Packer
CW_LOGS_SCRIPT="/tmp/awslogs-agent-setup.py"
CW_LOGS_CONF="/tmp/cloudwatch/awslogs.conf"
# Download the agent setup script
curl -sSL https://s3.amazonaws.com/aws-cloudwatch/downloads/latest/awslogs-agent-setup.py > ${CW_LOGS_SCRIPT}
chmod +x ${CW_LOGS_SCRIPT}
# Run the agent setup script
@n-my
n-my / splunk_universal_forwarder_installation
Created February 3, 2017 17:04
Install the Splunk Universal Forwarder for Splunk Cloud with Packer and Terraform via the user data
### Packer
UF_VERSION="6.5.2-67571ef4b87d-linux-2.6-amd64"
UF_SHORT_VERSION="6.5.2"
UF_DOWNLOAD_URL="https://www.splunk.com/bin/splunk/DownloadActivityServlet?architecture=x86_64&platform=linux&version=${UF_SHORT_VERSION}&product=universalforwarder&filename=splunkforwarder-${UF_VERSION}.deb&wget=true"
UF_DEB_PACKAGE="/tmp/splunkforwarder-${UF_VERSION}.deb"
UF_DIRECTORY="/opt/splunkforwarder"
SPLUNK_DIRECTORY="/home/ubuntu/.splunk"
# Download the Universal Forwarder (UF)
@n-my
n-my / mysql_to_big_query.sh
Created September 11, 2017 17:06 — forked from shantanuo/mysql_to_big_query.sh
Copy MySQL table to big query. If you need to copy all tables, use the loop given at the end. Exit with error code 3 if blob or text columns are found. The csv files are first copied to google cloud before being imported to big query.
#!/bin/sh
TABLE_SCHEMA=$1
TABLE_NAME=$2
mytime=`date '+%y%m%d%H%M'`
hostname=`hostname | tr 'A-Z' 'a-z'`
file_prefix="trimax$TABLE_NAME$mytime$TABLE_SCHEMA"
bucket_name=$file_prefix
splitat="4000000000"
bulkfiles=200
@n-my
n-my / dark-theme-for-slack-in-rambox.js
Created October 9, 2018 11:33
Get your Slack in Rambox a dark theme
function applycss(css){
var head = document.getElementsByTagName('head')[0];
var s = document.createElement('style');
s.setAttribute('type', 'text/css');
s.appendChild(document.createTextNode(css));
head.appendChild(s);
}
applycss(`
body { background: #222; color: #e6e6e6; }
a { color: #949494; }
@n-my
n-my / confluent-platform-community-edition-docker-compose.yml
Last active October 13, 2020 14:55
Docker Compose for Confluent Platform Community
---
version: '2'
services:
zookeeper:
image: confluentinc/cp-zookeeper:6.0.0
hostname: zookeeper
container_name: zookeeper
ports:
- "2181:2181"
environment: