The current spec states that ports are a top level entry in the package.yaml as
name: go-example-webserver
vendor: Alexander Sack <[email protected]>
architecture: amd64
icon: meta/go.svg
version: 1.0.1| # standard wsgi middleware | |
| def some_wsgi_middleware(app): | |
| def middleware(environ, start_response) | |
| def custom_start_response(status, headers, exc_info): | |
| # they get overwritten here from func args | |
| custom_start_response._status = status | |
| custom_start_response._headers = headers | |
| response = app(environ, custom_start_response) |
The current spec states that ports are a top level entry in the package.yaml as
name: go-example-webserver
vendor: Alexander Sack <[email protected]>
architecture: amd64
icon: meta/go.svg
version: 1.0.1| from fabric.api import env, task, run, sudo, cd, local | |
| from fabric.decorators import with_settings | |
| from fabric.operations import put | |
| env.user = 'ec2-user' | |
| env.hosts = [ | |
| 'ec2-your-address-1.us-west-2.compute.amazonaws.com', | |
| 'ec2-your-address-2.us-west-2.compute.amazonaws.com', | |
| 'ec2-your-address-3.us-west-2.compute.amazonaws.com', | |
| 'ec2-your-address-4.us-west-2.compute.amazonaws.com', |
| import json | |
| import urllib2 | |
| username = 'ignorethecrane' | |
| url = 'https://twitter.com/statuses/user_timeline/%s.json' % (username,) | |
| u = urllib2.urlopen(url) | |
| tweets = json.loads(u.read()) |
| # Show current git branch or SVN subfolder in prompt. | |
| GREEN="\[\033[0;32m\]" | |
| LIGHT_GREEN="\[\033[1;32m\]" | |
| GRAY="\[\033[1;30m\]" | |
| LIGHT_BLUE="\[\033[1;34m\]" | |
| LIGHT_GRAY="\[\033[0;37m\]" | |
| COLOR_OFF="\[\e[0m\]" | |
| LAST_GIT_DIR="!" | |
| function prompt_func() { | |
| PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' |
| <target name="wordpress.upgrade"> | |
| <property name="tmp" value="/tmp" /> | |
| <property name="src" value="${tmp}/wordpress" /> | |
| <delete dir="${src}" includeemptydirs="true" failonerror="true" /> | |
| <exec dir="${tmp}" command="curl -s http://wordpress.org/latest.tar.gz | tar -xz" /> | |
| <delete dir="wp-admin" includeemptydirs="true" failonerror="true" /> | |
| <delete dir="wp-includes" includeemptydirs="true" failonerror="true" /> | |
| <move file="wp-config.php" tofile="wp-config.php.bak" overwrite="true"/> |