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"
@AutomationD
AutomationD / gist:9b438c2de72ce1294642
Created November 24, 2014 23:17
python 3.4 on Raspbian wheezy
sudo su
cat << EOF > /etc/apt/preferences
Package: *
Pin: release n=wheezy
Pin-Priority: 900
Package: *
Pin: release n=jessie
Pin-Priority: 300
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:dfd1f82568b37ff95398
Created February 27, 2015 23:58
fpm - build openresty deb package
#!/bin/bash
version=1.7.7.2
wget http://openresty.org/download/ngx_openresty-${version}.tar.gz
tar zxf ngx_openresty-${version}.tar.gz
cd ngx_openresty-${version}
./configure --with-luajit \
--sbin-path=/usr/sbin/nginx \
--conf-path=/etc/nginx/nginx.conf \
@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}"