The always enthusiastic and knowledgeable mr. @jasaltvik shared with our team an article on writing (good) Git commit messages: How to Write a Git Commit Message. This excellent article explains why good Git commit messages are important, and explains what constitutes a good commit message. I wholeheartedly agree with what @cbeams writes in his article. (Have you read it yet? If not, go read it now. I'll wait.) It's sensible stuff. So I decided to start following the
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node.override['chef_client']['bin'] = '/usr/bin/cinc-client' | |
node.override['chef_client']['conf_dir'] = '/etc/cinc' | |
node.override['chef_client']['log_dir'] = '/var/log/cinc' | |
node.override['chef_client']['log_file'] = 'client.log' | |
node.override['chef_client']['cron']['log_file'] = "#{node['chef_client']['log_dir']}/#{node['chef_client']['log_file']}" | |
node.override['chef_client']['run_path'] = '/var/run/cinc' | |
node.override['chef_client']['file_backup_path'] = '/var/lib/cinc' | |
node.override['chef_client']['log_rotation']['postrotate'] = 'systemctl reload cinc-client.service >/dev/null || :' | |
if node[:packages][:chef] | |
directory '/etc/cinc' do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CLEAR='\033[0m' | |
RED='\033[0;31m' | |
function usage() { | |
if [ -n "$1" ]; then | |
echo -e "${RED}👉 $1${CLEAR}\n"; | |
fi | |
echo "Usage: $0 [-n number-of-people] [-s section-id] [-c cache-file]" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CLEAR='\033[0m' | |
RED='\033[0;31m' | |
function usage() { | |
if [ -n "$1" ]; then | |
echo -e "${RED}👉 $1${CLEAR}\n"; | |
fi | |
echo "Usage: $0 [-n number-of-people] [-s section-id] [-c cache-file]" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
// This script cleans up old LogGroups (empty and olde than 90 days and old | |
// LogStreams (last event timestamp is over 30 days old or if the logstream | |
// is empty and has been created over 30 days ago) from AWS Cloudwatch | |
import ( | |
"github.com/aws/aws-sdk-go/aws/session" | |
"github.com/aws/aws-sdk-go/service/cloudwatchlogs" | |
"log" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://docs.aws.amazon.com/lambda/latest/dg/lambda-python-how-to-create-deployment-package.html | |
pip install elasticsearch-curator -t /path/to/project-dir | |
pip install requests-aws4auth -t /path/to/project-dir |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys, yaml, json | |
def funcparse(loader, node): | |
node.value = { | |
yaml.constructor.ScalarNode: loader.construct_scalar, | |
yaml.constructor.SequenceNode: loader.construct_sequence, | |
yaml.constructor.MappingNode: loader.construct_mapping, | |
}[type(node)](node) | |
node.tag = node.tag.replace(u'!Ref', 'Ref').replace(u'!', u'Fn::') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# keep last few executions for each job | |
KEEP=100 | |
# db connection params | |
HOST=YOURDBHOST | |
PORT=YOURDBPORT | |
USERNAME=YOURDBUSERNAME | |
PASSWORD=YOURDBPASSWORD |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const aws = require('aws-sdk'); | |
const s3 = new aws.S3({ apiVersion: '2006-03-01' }); | |
exports.handler = (event, context, callback) => { | |
const key = decodeURIComponent(event.Records[0].s3.object.key); | |
const meta = key.split('/'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[defaults] | |
cow_selection = random | |
cow_whitelist = ansible_lights,ansible_reindeer,ansible_tree |
NewerOlder