Skip to content

Instantly share code, notes, and snippets.

View smalltown's full-sized avatar

smalltown

View GitHub Profile
; -*- mode: clojure; -*-
; vim: filetype=clojure
(logging/init :file "/var/log/riemann/riemann.log")
; Listen on the local interface over TCP (5555), UDP (5555), and websockets
; (5556)
(let [host "127.0.0.1"]
@smalltown
smalltown / class.gaparse.php
Created July 1, 2014 15:26
Sample code about how to pass data to GA
<?
class GA_Parse
{
var $campaign_source; // Campaign Source
var $campaign_name; // Campaign Name
var $campaign_medium; // Campaign Medium
var $campaign_content; // Campaign Content
var $campaign_term; // Campaign Term
var $first_visit; // Date of first visit
var $previous_visit; // Date of previous visit
@smalltown
smalltown / start.sh
Last active October 11, 2015 12:52
This start.sh is for windows "Docker Quick Start"
#!/bin/bash
trap '[ "$?" -eq 0 ] || read -p "Looks like something went wrong... Press any key to continue..."' EXIT
VM=default
DOCKER_MACHINE=./docker-machine.exe
BLUE='\033[1;34m'
GREEN='\033[0;32m'
NC='\033[0m'
---
driver:
name: vagrant
provisioner:
name: chef_zero
# Uncomment the following verifier to leverage Inspec instead of Busser (the
# default verifier)
# verifier:
#
# Cookbook Name:: apache
# Recipe:: default
#
# Copyright (c) 2016 The Authors, All Rights Reserved.
package "apache2" do
action :install
end
<html>
<body>
<h1>Hello, world!</h1>
</body>
</html>
#
# Cookbook Name:: motd
# Recipe:: default
#
# Copyright (c) 2016 The Authors, All Rights Reserved.
template "/etc/motd" do
source "motd.erb"
mode "0644"
end
This server is property of <%= node["motd"]["company"] %>
<% if node["pci"]["in_scope"] -%>
This server is in-scope for PCI compliance
<% end -%>
#
# Cookbook Name:: apache
# Recipe:: default
#
# Copyright (c) 2016 The Authors, All Rights Reserved.
package "apache2" do
action :install
end
<% if @port != 80 -%>
Listen <%= @port %>
<% end -%>
<VirtualHost *:<%= @port %>>
ServerAdmin webmaster@localhost
DocumentRoot <%= @document_root %>
<Directory />
Options FollowSymLinks