Skip to content

Instantly share code, notes, and snippets.

@andy-leonard
andy-leonard / series_table.sql
Created March 5, 2014 17:51
Create some aribitrary PostgreSQL data
CREATE TABLE t_test_01 AS SELECT * FROM generate_series(1, 1000000);
@andy-leonard
andy-leonard / gist:9077193
Last active August 29, 2015 13:56
"knife solo data bag" in a cookbook - outside of a chef-solo repo
# Create secret key:
openssl rand -base64 512 | tr -d '\r\n' > test/integration/edb_secret
# Create EDB:
knife solo data bag create pgsql_creds postgres --secret-file test/integration/edb_secret \
--data-bag-path test/data_bags
# This creates:
#
# test/data_bags
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
require 'English'
puts 'Checking for whitespace errors...'
git_ws_check = `git diff-index --check --cached HEAD --`
unless $CHILD_STATUS.success?
puts git_ws_check
exit 1