Skip to content

Instantly share code, notes, and snippets.

@zekiunal
zekiunal / docker-compose-coreos.sh
Last active February 29, 2016 20:12 — forked from sourcec0de/docker-compose-coreos.sh
Install docker compose on coreos
sudo su -
mkdir -p /opt/bin
curl -L https://github.com/docker/compose/releases/download/1.5.2/docker-compose-`uname -s`-`uname -m` > /opt/bin/docker-compose
chmod +x /opt/bin/docker-compose
@zekiunal
zekiunal / haproxy.conf
Last active August 28, 2015 15:25 — forked from nateware/haproxy.conf
HAProxy sample config for EC2
#
# This config file is a combination of ideas from:
# http://www.37signals.com/svn/posts/1073-nuts-bolts-haproxy
# http://www.igvita.com/2008/05/13/load-balancing-qos-with-haproxy/
# http://wiki.railsmachine.com/HAProxy
# http://elwoodicious.com/2008/07/15/nginx-haproxy-thin-fastcgi-php5-load-balanced-rails-with-php-support/
# http://upstream-berlin.com/2008/01/09/using-haproxy-with-multiple-backends-aka-content-switching/
# http://wiki.railsmachine.com/HAProxy
# http://gist.github.com/raw/25482/d39fb332edf977602c183194a1cf5e9a0b5264f9
#
@zekiunal
zekiunal / kibana.init
Last active August 29, 2015 14:19 — forked from NoodlesNZ/kibana.init
#!/bin/bash
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="Kibana 4"
NAME=kibana
DAEMON=/home/kibana/bin/$NAME
DAEMON_ARGS=""
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
LOG=/var/log/kibana.log

In a perfect world, where things are done well, not just quickly, I would expect to find the following when joining the company:

Documentation

  • Accurate / up-to-date systems architecture diagram

  • Accurate / up-to-date network diagram

  • Out-of-hours support plan

  • Incident management plan

<html>
<body>
<div id="hierarchy"></div>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mustache.js/0.7.2/mustache.min.js"></script>
<script type="text/template" id="recursive-partial">
{{#children}}
<li>{{name}}
# install missing libraries (if any)
cd ~
sudo yum update
yum install java-1.7.0-openjdk.x86_64
yum install unzip
yum install mc
yum install wget
yum install curl
# get and unpack elasticsearch zip file
<?php
// Crude check. Off course this should be stored in a (memory) database. $token is an
// access token that is provided by oauth.
$token = $_SERVER['HTTP_X_AUTH_TOKEN'];
if ($token == "mellon") {
header("X-Api-User: Gandalf");
header("X-Api-Context: Middle-Earth");
header("Cache-Control: public, max-age=120");
<?php
// Crude check. Off course this should be stored in a (memory) database. $token is an
// access token that is provided by oauth.
$token = $_SERVER['HTTP_X_AUTH_TOKEN'];
if ($token == "mellon") {
header("X-Api-User: Gandalf");
header("X-Api-Context: Middle-Earth");
header("Cache-Control: public, max-age=120");
wget -q https://raw.github.com/monorm/ShellScripts/master/apache_install.sh -O ./apache_install.sh
chmod +x apache_install.sh
./apache_install.sh

Awesome PHP

A curated list of amazingly awesome PHP libraries, resources and shiny things.

Composer

Composer Related