Skip to content

Instantly share code, notes, and snippets.

Avatar

Chris Stevens stevenscg

View GitHub Profile
@stevenscg
stevenscg / fcgi.sh
Last active August 7, 2017 13:00
PHP-FPM FastCGI Health Check
View fcgi.sh
#!/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
View README.md

Project tree:

foo-app

  • composer.json
  • app
    • file1.txt
    • foo
      • bar.txt
  • provision
  • nginx
View keybase.md

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
View consul-template.txt
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)
View submodule_strategy.rb
# 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
View google-analytics-for-static-sites.sh
#!/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.
View app.tss
Window: {
barColor: '#000',
barImage: 'header.png',
backgroundColor: "#fff"
},
TextArea: {
autocapitalization: Ti.UI.TEXT_AUTOCAPITALIZATION_NONE,
autocorrect: false
},