Skip to content

Instantly share code, notes, and snippets.

View stevenscg's full-sized avatar

Chris Stevens stevenscg

View GitHub Profile
@stevenscg
stevenscg / fcgi.sh
Last active August 7, 2017 13:00
PHP-FPM FastCGI Health Check
#!/bin/sh
#
# Health Check - php-fpm
#
# Usage:
# ./fcgi.sh host:port|path/to/socket /path/to/file
#
# Examples:
# ./fcgi.sh ip:port /status?json
#
@stevenscg
stevenscg / README.md
Last active March 8, 2017 15:33
packer-ansible-docker demo

Project tree:

foo-app

  • composer.json
  • app
    • file1.txt
    • foo
      • bar.txt
  • provision
  • nginx

Keybase proof

I hereby claim:

  • I am stevenscg on github.
  • I am stevenscg (https://keybase.io/stevenscg) on keybase.
  • I have a public key ASC-AVtbIw7MWlEN7Ia_FeTqKOGzNQe7u2rs5oQWHxSM1Qo

To claim this, I am signing this object:

@stevenscg
stevenscg / consul-template.txt
Created August 26, 2016 13:15
Building consul-template from source
docker run --rm -it -v $PWD:/opt/build golang:1.7 sh
then run:
mkdir -p $GOPATH/src/github.com/hashicorp/
cd $GOPATH/src/github.com/hashicorp/
git clone https://github.com/hashicorp/consul-template.git
cd consul-template
make updatedeps
@stevenscg
stevenscg / submodule_strategy.rb
Last active July 12, 2019 23:50
Capistrano deploy strategy that supports git submodules (requires Capistrano v3.1.0 or later)
# this include won't work for some reason:
# include Capistrano::Git::DefaultStrategy
module SubmoduleStrategy
# check for a .git directory
def test
test! " [ -d #{repo_path}/.git ] "
end
@stevenscg
stevenscg / google-analytics-for-static-sites.sh
Created June 25, 2013 16:16
Add Google Analytics tracking to an existing static website
#!/bin/sh
#
# Add a Google Analytics tag to static website files
# @see http://adambuchanan.me/post/26345221717/updating-google-analytics-code-on-many-static-pages
# Tested on MacOS 10.8.X
#
# Usage:
# Set the GA parameters below
# Execute the script from the top-level of the static site
#
@stevenscg
stevenscg / app.tss
Last active December 16, 2015 12:59
Alloy 1.1.1 style merge/override issue Create a new Titanium mobile app with SDK 3.1.0.GA and Alloy 1.1.1. Update or create the files below and build for iphone 6.1. If "TextArea" is defined in app.tss, some or all of app.tss is skipped. "TextArea" was fine for Alloy 1.0.0 and 1.1.0.
Window: {
barColor: '#000',
barImage: 'header.png',
backgroundColor: "#fff"
},
TextArea: {
autocapitalization: Ti.UI.TEXT_AUTOCAPITALIZATION_NONE,
autocorrect: false
},