Skip to content

Instantly share code, notes, and snippets.

View drnic's full-sized avatar
🏆
Platinum Status Level

Dr Nic Williams drnic

🏆
Platinum Status Level
View GitHub Profile
@drnic
drnic / stub.yml
Last active January 8, 2017 19:39
spiff merge stub for redis deployment to aws ec2
---
meta:
environment: NAME
service_name: NAME
security_groups:
- default
job_templates:
- name: redis
release: redis
stemcell:
@drnic
drnic / manifest.yml
Last active November 29, 2017 10:19
BOSH deployment manifest - AWS
name: redis
director_uuid: 2ce88742-5da6-406e-93da-8d4fa9b8fa27
releases:
- name: redis
version: latest
compilation:
workers: 6
network: redis1
reuse_compilation_vms: true
cloud_properties:
jobs:
- name: job-traveling-cf-admin
plan:
- get: traveling-cf-admin
- task: build-traveling-cf-admin
file: traveling-cf-admin/ci/build.yml
- put: github-release
resources:
- name: repo-traveling-cf-admin
@drnic
drnic / pretty_ls.sh
Created April 8, 2015 04:38
Little script to pretty-print files in a tree from http://stackoverflow.com/a/1767559/36170
#!/bin/bash
ls -R $1 | awk '
/:$/&&f{s=$0;f=0}
/:$/&&!f{sub(/:$/,"");s=$0;f=1;next}
NF&&f{ print s"/"$0 }'

File X

File A

@drnic
drnic / concourse-example-tasks.md
Last active November 25, 2015 11:42
A simple concourse example task - fork and try anything

Concourse Tutorial - Example Tasks

This gist includes some https://concourse.ci job tasks

  • hello-world.yml - displays "hello world"
  • display-other-task.yml - uses this task as a resource itself and displays the hello-world.yml YAML; assumes that the gist is available in the concourse pipeline as resource-gist.
  • display-other-task-renamed-resource-input.yml - is like the task above, but assumes the resource is now named gist rather than resource-gist
---
name: redis-from-scratch
resource_pools:
- name: default
network: default
cloud_properties:
instance_type: m3.medium
jobs:
---
name: micro-aws-redis
networks:
- name: default
type: manual
cloud_properties:
subnet: subnet-4e01852b
range: 10.10.1.0/24
reserved: [10.10.1.1-10.10.1.3]
This file has been truncated, but you can view the full file.
package resources
import (
"bytes"
"compress/gzip"
"fmt"
"io"
"strings"
)