This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: nginx | |
# Required-Start: $local_fs $remote_fs $network $syslog | |
# Required-Stop: $local_fs $remote_fs $network $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the nginx web server | |
# Description: starts nginx using start-stop-daemon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local _M = {} | |
local cjson = require "cjson" | |
local mysql = require "resty.mysql" | |
local math = require "math" | |
local encode = cjson.encode | |
local random = math.random | |
local insert = table.insert |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rock https://raw.github.com/Neopallium/lua-pb/master/lua-pb-scm-0.rockspec | |
rock git https://github.com/bakins/lua-resty-riak refactor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#some defaults | |
PROJECT_VERSION=0.1.0 | |
NODE_VERSION=0.10.5 | |
PROJECT=$(basename $(pwd)) | |
if [ -r .node_version ]; then | |
. .node_version | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desc "Generate jekyll site" | |
task :generate do | |
raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir) | |
puts "## Generating Site with Jekyll" | |
system "bundle exec compass compile --css-dir #{source_dir}/stylesheets" | |
system "bundle exec jekyll" | |
Find.find "public" do |path| | |
if FileTest.file?(path) and path.match(/\.(css|js|html|xml|txt)$/) | |
system "gzip -c #{path} > #{path}.gz" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user www www; | |
worker_processes 1; | |
worker_rlimit_nofile 8256; | |
events { | |
worker_connections 8192; | |
} | |
http { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
if [[ ! -f /root/.ssh/authorized_keys ]]; then | |
authorized_keys=$(/usr/sbin/mdata-get root_authorized_keys) | |
if [[ -n ${authorized_keys} ]]; then | |
mkdir -p /root/.ssh | |
echo -e "${authorized_keys}" > /root/.ssh/authorized_keys | |
chmod 700 /root/.ssh | |
chmod 600 /root/.ssh/authorized_keys | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "ridley" | |
require "multi_json" | |
require 'pp' | |
require 'chef_zero/server' | |
plan = MultiJson.load(IO.read(ARGV[0])) | |
#pp plan | |
environment = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# should be /etc/sv/my-awesome-containerized-app/log/run | |
# create a lumberjack ( https://github.com/jordansissel/lumberjack ) config like | |
# | |
# { | |
# ..put serevr stuff here... | |
# "files": [ | |
# { | |
# "paths": [ "-" ], | |
# "fields": { "type": "stdin" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# should be /etc/sv/my-awesome-containerized-app/log/run | |
# create a lumberjack ( https://github.com/jordansissel/lumberjack ) config like | |
# | |
# { | |
# ..put server stuff here... | |
# "files": [ | |
# { | |
# "paths": [ "-" ], | |
# "fields": { "type": "stdin" } |