Skip to content

Instantly share code, notes, and snippets.

View bbelyeu's full-sized avatar

Brad Belyeu bbelyeu

View GitHub Profile

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a
@bbelyeu
bbelyeu / README-Template.md
Created October 6, 2017 20:00 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

Keybase proof

I hereby claim:

  • I am bbelyeu on github.
  • I am bradleylamar (https://keybase.io/bradleylamar) on keybase.
  • I have a public key ASDI1rnw3Hi-zKDiLZ_j9mohrxGVl2kFo2iYgCcMN49uvAo

To claim this, I am signing this object:

# Gearman doesn't make the connection until it
# is needed so let's set it up now for convenience
self.connection = _GearmanClient([config['gearman']])
if [ "$1" == "" ]; then
TRUNK="integration"
else
TRUNK=$1
fi
if [ "$2" == "" ]; then
REMOTE_PREFIX="bb/"
else
REMOTE_PREFIX=$2
class StringProp(BaseDescriptor):
required = False
def __init__(self, default=None, required=False):
self.default = default
self.data = WeakKeyDictionary()
self.required = bool(required)
def __set__(self, instance, val):
if self.required and not val:
# Create index
curl -XPUT 'http://localhost:9200/events/' | pjson
# Create explicit mapping
curl -XPUT 'http://localhost:9200/events/_mapping/event' -d '
{
"event" : {
"properties" : {
"event_id": {
"type": "integer",
git_solr:
git.latest:
- name: git@github.com:lifechurch/youversion-solr.git
{% if salt['grains.get']('environment', 'production') == 'production' %}
- rev: master
{% elif salt['grains.get']('environment', 'production') == 'staging' %}
- rev: integration
{% else %}
- rev: integration
{% endif %}
import re
def valid_username(string):
"""
>>> valid_username('a')
True
>>> valid_username('brad')
True
>>> valid_username('0')
download_database = subprocess.Popen((
"rm -rf GeoIP* &&"
"curl http://download.maxmind.com/app/geoip_download?" +
"edition_id=133\&suffix=tar.gz\&license_key={maxmind_key} " +
">GeoIPCity.dat.tar.gz 2>/dev/null && " +
"tar xzf GeoIPCity.dat.tar.gz").format(
maxmind_key=MAXMIND_LICENSE_KEY
), shell=True)