Skip to content

Instantly share code, notes, and snippets.

View AutomationD's full-sized avatar
🎛️
Turning Knobs

Dmitry Kireev AutomationD

🎛️
Turning Knobs
View GitHub Profile
class cluster::tdqueue::node {
class {'company::limits-performance':
notify => Service['rabbitmq-server'],
}
class { 'rabbitmq':
config_cluster => true,
cluster_nodes => ['tdqueue1a.company.prod', 'tdqueue1b.company.prod'],
cluster_node_type => 'ram',
config_mirrored_queues => true,
@AutomationD
AutomationD / provider
Created October 15, 2014 18:07
registry_posh
Puppet::Type.type(:registry_key_posh).provide(:registry_key_posh) do
@doc = %q{Manage registry entry via powershell}
desc "Manage windows users and groups"
confine :operatingsystem => :windows
defaultfor :operatingsystem => :windows
commands :powershell =>
if File.exists?("#{ENV['SYSTEMROOT']}\\sysnative\\WindowsPowershell\\v1.0\\powershell.exe")
"#{ENV['SYSTEMROOT']}\\sysnative\\WindowsPowershell\\v1.0\\powershell.exe"
exec { "install-chocolatey":
creates => 'C:\Programdata\Chocolatey',
command => 'iex ((new-object net.webclient).DownloadString(\'http://chocolatey.org/install.ps1\'))',
require => Class["packages::dotnetall"],
provider => powershell,
}
windows_env {'ChocolateyInstall':
ensure => present,
@AutomationD
AutomationD / gist:c0ee7116424da47f59f6
Last active August 29, 2015 14:17
Sming on Linux & esp_open_sdk
#####
export ESP_HOME="/opt/esp-open-sdk"
export SMING_HOME="/opt/sming/Sming"
export SDK_BASE="${ESP_HOME}/sdk"
export XTENSA_TOOLS_ROOT="${ESP_HOME}/xtensa-lx106-elf/bin"
export SDK_TOOLS="${SDK_BASE}/tools"
@AutomationD
AutomationD / MacOS-SDK.sh
Last active August 29, 2015 14:18
Install Sming
# Prerequisites:
# Xcode
# Homebrew:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew tap homebrew/dupes
brew install binutils coreutils automake wget gawk libtool gettext gperf gnu-sed --with-default-names grep
export PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"
@AutomationD
AutomationD / Ubuntu - prerequisites.sh
Last active August 29, 2015 14:19
Merge bin and add files to spiffs
# Getting required packages - Ubuntu
sudo apt-get install -y python-serial srecord bc
@AutomationD
AutomationD / main.c.patch
Last active August 29, 2015 14:19
Spiffy patches for Windows
8,9c8,9
< //16k
< #define MAX_SIZE 4*4*1024
---
> //192k
> #define MAX_SIZE 12*4*4*1024
@AutomationD
AutomationD / gist:daa5a6ac55ec4cadd0c8
Created May 27, 2015 23:20
Remove java from windows via puppet
puppet apply -e "package {'Java 7 Update 71': ensure => absent} package {'Java 8 Update 31': ensure => absent} package {'Java 8 Update 31 (64-bit)': ensure => absent}"
@AutomationD
AutomationD / gist:1f512ef4cbfb09ac918c
Created July 7, 2015 22:29
Arduino 2 Nodemcu Passthrough
#include <dht.h>
#define DHT11_PIN 4
dht DHT;
HardwareSerial trm = Serial2;
HardwareSerial esp = Serial1;
HardwareSerial dbg = Serial;
const int moistureAO = 7;
float moisture = 0.0;
float temperature = 0.0;
[program:kafka]
command = /usr/local/kafka/bin/kafka-run-class.sh -name kafkaServer -loggc kafka.Kafka /usr/local/kafka/config/server.properties
stopwaitsecs = 60
redirect_stderr = true
stdout_logfile = /var/log/kafka/kafka-stdout.log
stdout_logfile_maxbytes = 0
stdout_logfile_backups = 0
stopasgroup=true
environment =
JAVA_HOME="/usr/java/default",