Skip to content

Instantly share code, notes, and snippets.

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discussions around concrete examples, not handy-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@inthecloud247
inthecloud247 / net.conf
Created February 11, 2013 08:21 — forked from rca/net.conf
addr={{ pillar['shoe']['network'].addr }}
apt-update:
cmd:
- run
- name: /usr/bin/apt-get update
- onlyif: /bin/false
{% macro postconf(key, value) -%}
postconf-{{ key }}:
cmd:
- run
- name:
- postconf -e {{ key }}='{{ value }}'
- unless: test "x$(postconf -h {{ key }} )" = 'x{{ value }}'
- require:
- pkg: postfix
# Include the instantiated macro here
include:
- pkg_repo.10gen
mongo-10gen-server:
pkg:
- installed
- require:
- file: 'pkg_repo.10gen'
snmpd:
pkg.installed:
- name: {{ pillar['snmpd'] }}
- order: 1
/etc/snmp/snmpd.conf:
file.managed:
- source: salt://etc/snmp/snmpd.conf
- template: jinja
- requires:
@inthecloud247
inthecloud247 / gist:4569472
Created January 18, 2013 23:08
my salt top.sls file that handles multiple environments...
#!mako|yaml
base:
'*':
- base.services
- base.states
'environment:localdev':
- match: grain
- localdev.services
#!/usr/bin/env python
'''
Support for deploying an application
'''
# Import python libs
import os
import argparse
import re
import logging
import tempfile
@inthecloud247
inthecloud247 / saltstack-sudoers-config
Created January 15, 2013 23:16
salt sudoer config example
sudoer-amazing:
file.append:
- name: /etc/sudoers
- text:
- "ydavid ALL=(ALL) NOPASSWD: ALL"
sudoer-defaults:
file.append:
- name: /etc/sudoers
- text:
@inthecloud247
inthecloud247 / deploy.sh
Created October 22, 2012 14:03
Minimal Race-free Deployment
#!/bin/sh
# deploy.sh
N="`readlink \"$1\"`"
mv -T "$1.stage" "$1"
ln -s "$N" "$1.stage"
rm -rf "$N"
cp -aH "$1" "$N"