Skip to content

Instantly share code, notes, and snippets.

haproxy.conf
============
frontend spdy
mode tcp
bind xxx.xxx.xxx.xxx:443 ssl crt /etc/haproxy/ssl.pem crt /etc/haproxy/certs.d npn spdy/3.1,http/1.1 ciphers AES256+EECDH:AES256+EDH:AES128+EDH:EECDH:!aNULL:!eNULL:!LOW:!DES:!3DES:!RC4; no-sslv3
option tcplog
log global
# route to nginx
@diyan
diyan / uwsgi_json_access_log.md
Last active October 29, 2018 14:44
uWSGI logging configuration that could be used with central logging servers such as Logstash, Fluentd, etc.

uWSGI logging configuration that could be used with central logging servers such as Logstash, Fluentd, etc.

[uwsgi]
project = some_project
...

# file: prefix is required for req-logger
req-logger = file:/var/log/%(project)/%(project)_access.log
log-format = "method": "%(method)", "uri": "%(uri)", "proto": "%(proto)", "status": %(status), "referer": "%(referer)", "user_agent": "%(uagent)", "remote_addr": "%(addr)", "http_host": "%(host)", "pid": %(pid), "worker_id": %(wid), "core": %(core), "async_switches": %(switches), "io_errors": %(ioerr), "rq_size": %(cl), "rs_time_ms": %(msecs), "rs_size": %(size), "rs_header_size": %(hsize), "rs_header_count": %(headers)
@P7h
P7h / jdk_download.sh
Last active February 20, 2024 11:29
Script to download JDK / JRE / Java binaries from Oracle website from terminal / shell / command line / command prompt
##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### #####
### Shell script to download Oracle JDK / JRE / Java binaries from Oracle website using terminal / command / shell prompt using wget.
### You can download all the binaries one-shot by just giving the BASE_URL.
### Script might be useful if you need Oracle JDK on Amazon EC2 env.
### Script is updated for every JDK release.
### Features:-
# 1. Resumes a broken / interrupted [previous] download, if any.
# 2. Renames the file to a proper name with including platform info.
https://github.com/jordansissel/fpm
require 'irb/completion'
# THIS FILE MANAGED BY PUPPET - EDIT BY HAND AT YOUR PERIL
<% foo = scope.to_hash -%>
<% foo.sort.each do |k,v| -%>
<%= "#{k} = #{v}" %>
<% end -%>
@atmos
atmos / heaven.md
Last active November 23, 2020 22:35
Response to a dude who asked about heaven. https://github.com/holman/feedback/issues/422

@holman got a request about our deployment system, heaven

I know it's not a high priority, but has there been any activity on open-sourcing the core Heaven gem?

There is. I've been working on extracting the non-GitHub specific parts into two gems. This first is a CLI portion called hades. The second is an HTTP API portion called heaven.

When you open source something previously used as in internal tool like Heaven, Hubot, Boxen, etc., how do you manage and hook in the parts that need to stay internal?

Normally I focus around four questions:

@jperkin
jperkin / gist:3436515
Created August 23, 2012 13:18
Upgrade SmartOS pkgsrc
From 2012Q1 to 2012Q2, assuming 32-bit dataset (i386)
# Update repositories.conf for pkgin, and set $PKG_PATH for pkg_add
REPO=http://pkgsrc.joyent.com/sdc6/2012Q2/i386/All
echo ${REPO} >/opt/local/etc/pkgin/repositories.conf
export PKG_PATH=${REPO}
# Update core packages manually
pkg_add -u bootstrap-mk-files bmake
import os
from fabric.api import env, run, prompt, local, get
from fabric.state import output
env.environment = ""
env.hosts = ["example.com"]
env.user = "admin"
env.full = False
output['running'] = False