Skip to content

Instantly share code, notes, and snippets.

@deepakputhraya
deepakputhraya / auto_scaling.config
Created September 27, 2017 14:04
Elastic Beanstalk configurations
option_settings:
- namespace: aws:elasticbeanstalk:command
option_name: DeploymentPolicy
value: Immutable
- namespace: aws:elasticbeanstalk:command
option_name: Timeout
value: 900
- namespace: aws:elasticbeanstalk:cloudwatch:logs
@arilivigni
arilivigni / ci-workflow-defaults.yml
Last active May 6, 2024 19:16
Jenkins Job Builder Example
- defaults:
name: ci-workflow-provision
description: |
Managed by Jenkins Job Builder. Do not edit via web.
concurrent: true
scm:
- git:
url: 'https://code.engineering.redhat.com/gerrit/ci-ops-central'
branches:
- origin/master
@icedfish
icedfish / create_index_template_for_logstash
Last active August 29, 2015 14:01
Logstash Mapping 说明
curl -XPUT 'http://localhost:9200/_template/logstash_default' -d @/<path>/xxxx.json
# template的mapping和普通mapping略有不同
# 需要在settings前面增加一行
# 非常适合logstash的场景,所以本例中以logstash做sample。
# 相关文档: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-templates.html
@untergeek
untergeek / logstash-1-collectd.conf
Created May 7, 2014 15:48
Logstash 1.4.1+ Collectd configuration
# This is the simplest definition, with the addition of a type
input {
udp {
port => 25826 # Must be specified. 25826 is the default for collectd
buffer_size => 1452 # Should be specified. 1452 is the default for recent versions of collectd
codec => collectd { } # This will invoke the default options for the codec
type => "collectd"
}
}
@carlessistare
carlessistare / tuning_nginx_nodejs
Created September 2, 2013 20:34
Tuning Nginx for heavy loading with nodejs as upstream. Short requests and a lot of concurrence.
# This number should be, at maximum, the number of CPU cores on your system.
# (since nginx doesn't benefit from more than one worker per CPU.)
worker_processes 8;
# Determines how many clients will be served by each worker process.
# (Max clients = worker_connections * worker_processes)
# "Max clients" is also limited by the number of socket connections available on the system (~64k)
# run ss -s and u'll see a timewait param
# The reason for TIMED_WAIT is to handle the case of packets arriving after the socket is closed.
<LoadPlugin java>
</LoadPlugin>
<Plugin "java">
JVMArg "-Djava.class.path=/usr/share/collectd/java/collectd-api.jar:/usr/share/collectd/java/generic-jmx.jar"
LoadPlugin "org.collectd.java.GenericJMX"
<Plugin "GenericJMX">
################
# MBean blocks #
@thinkdevcode
thinkdevcode / gist:4106633
Created November 18, 2012 18:18
Route53 create record set example
r53 = AWS::Route53.new(
:access_key_id => 'KEY_ID',
:secret_access_key => 'ACCESS_KEY')
host_zone_id = "ZONE_ID"
resp = r53.client.change_resource_record_sets({ :hosted_zone_id => host_zone_id, :change_batch => {
:comment => "Creating new subdomain for user: #{name}", :changes => [{
:action => "CREATE", :resource_record_set => {
@jamesflorentino
jamesflorentino / cookie-util.coffee
Created May 17, 2012 03:25
CoffeeScript // Cookie Handling
@rubiojr
rubiojr / quick_vm.rb
Created May 7, 2012 11:44
Quick OpenStack Server Create with ruby Fog
#!/usr/bin/env ruby
#
# Before we start, make sure you have Essex support in Fog
#
# Essex support has not been merged into upstream Fog so you'll need
# a custom ruby fog build to run through the examples
#
require 'fog'
require 'pp'
require 'highline/import'
@whylom
whylom / README.md
Created April 23, 2012 18:01
How to install Graphite on Vagrant with Chef

Here are some quick notes on installing Graphite on a Vagrant virtual machine using Chef recipes from GitHub. This more or less assumes you know what you're doing with Vagrant and Chef.

Notes

  • I used the "lucid32" Ubuntu base box you see in most Vagrant examples (http://files.vagrantup.com/lucid32.box)
  • Where possible, I used the cookbooks from Opscode. I was forced to use alternatives for Python (did not work for me) and for Graphite (no Opscode cookbook as of now).
  • The Graphite recipe depends on the Python, Apache2, and runit recipes.
  • I'm running the apt recipe first to update the Ubuntu package manager. The out-of-date manager that ships with the lucid32 box errored out for me when running the Python recipe.

Cookbooks Used