Skip to content

Instantly share code, notes, and snippets.

View RafPe's full-sized avatar
🎯
Focusing

Rafal Pieniazek RafPe

🎯
Focusing
View GitHub Profile
@RafPe
RafPe / elasticsearch_sample_conf.yml
Last active April 1, 2016 05:51
Sample config file for elastic search using environment variables for cluster name and node name. More details on pre flight checks for ES you can find at http://asquera.de/opensource/2012/11/25/elasticsearch-pre-flight-checklist/
cluster.name: ${ES_CLUSTERNAME}
node.name: ${HOSTNAME}
network.host: 0.0.0.0
discovery.zen.ping.multicast.enabled: true
@RafPe
RafPe / logstash_config_agent_with_redis.conf
Last active April 1, 2016 05:51
Simple config for logstash agent forwarder and redis as event broker
input
{
tcp
{
port => 25827
type => syslog
}
udp
{
port => 25827
@RafPe
RafPe / logstash_config_central.conf
Last active April 1, 2016 05:49
iCentral logstash configuration file for input from redis and output to elastic search. stdout can be disabled when not debugging
input
{
redis
{
host => "redis-cache"
type => "redis-input"
data_type => "list"
key => "logstash"
}
}
@RafPe
RafPe / azure_arm_4vms.ps1
Created September 29, 2015 09:26
Azure ARM deployment creating 4 VMs from which one has static IP address (as we will use it later for DC configuraitons ). There is no availability set and only first VM has public IP address.
#region Setup subscription and script variables
## Get up your credentials (only if using Azure AD )
# credentialSubscription = Get-Credential
# Add-AzureAccount -Credential
## Enable debugging ?
# $DebugPreference ='Continue'
@RafPe
RafPe / AD_cookie_sync.ps1
Created October 23, 2015 11:16
Synchronize AD changes with synchronization cookie and PowerShell
@RafPe
RafPe / AutoMarkdown.ps1
Last active December 3, 2017 23:00
Autodocument your Powershell modules using Markdown
param
(
[string]$PathToModule='C:\temp\Cos.psm1',
[string]$ModuleName = 'cos',
[string]$OutputFolderPath='C:\temp',
[string]$ResultFileNamePrefix='cos_module',
[string]$ResultFileNameSuffix = 'md'
)
@RafPe
RafPe / elkstack_prep.sh
Last active November 30, 2015 20:09
Bash script to automate required actions for deploying whole docker ELK stack. ( update to http://rafpe.ninja/2015/10/04/docker-compose-elk-automated-setup/ ).Shortened to http://git.io/vBPqC
#!/bin/bash
dir=`pwd`
if [ $# -lt 1 ]; then
echo "Please specify clustername"
exit
fi
sudo mkdir -p ${dir}/elasticsearch/data
@RafPe
RafPe / Dockerfile-owncloud-with-ldap
Last active January 9, 2016 14:38
This Docker file compiles image which allows to use LDAP with owncloud within Docker container
FROM php:5.6-apache
RUN apt-get update && apt-get install -y \
bzip2 \
libcurl4-openssl-dev \
libfreetype6-dev \
libicu-dev \
libjpeg-dev \
libmcrypt-dev \
libmemcached-dev \
@RafPe
RafPe / upload_files_to_storage_account.sh
Created January 30, 2016 22:27
Upload files to storage account using xplat-cli
#! /bin/bash
# Upload all the files from a local folder to an azure storage container.
usage()
{
cat << EOF
usage: $0 options
OPTIONS:
-d The local folder from which files will be upload to azure storage blob.
@RafPe
RafPe / nomad.upstart
Created February 11, 2016 08:38
Nomad Hashicorp upstart script
description "Nomad by HashiCorp"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
script
# CONFIG_DIR=/usr/local/etc/nomad
# mkdir -p $CONFIG_DIR