Enable memberOf attribute on an openldap server.
Source: https://www.brianshowalter.com/blog/installing-configuring-openldap
RewriteEngine On | |
# special mod_rewrite variables | |
RewriteRule .* - [E=MR_SPECIALS_API_VERSION:%{API_VERSION},NE] | |
RewriteRule .* - [E=MR_SPECIALS_THE_REQUEST:%{THE_REQUEST},NE] | |
RewriteRule .* - [E=MR_SPECIALS_REQUEST_URI:%{REQUEST_URI},NE] | |
RewriteRule .* - [E=MR_SPECIALS_REQUEST_FILENAME:%{REQUEST_FILENAME},NE] | |
RewriteRule .* - [E=MR_SPECIALS_IS_SUBREQ:%{IS_SUBREQ},NE] | |
RewriteRule .* - [E=MR_SPECIALS_HTTPS:%{HTTPS},NE] | |
#!/usr/bin/awk -f | |
# | |
# Take a PEM format file as input and split out certs and keys into separate files | |
# | |
BEGIN { n=0; cert=0; key=0; if ( ARGC < 2 ) { print "Usage: pem-split FILENAME"; exit 1 } } | |
/-----BEGIN PRIVATE KEY-----/ { key=1; cert=0 } | |
/-----BEGIN CERTIFICATE-----/ { cert=1; key=0 } | |
split_after == 1 { n++; split_after=0 } | |
/-----END CERTIFICATE-----/ { split_after=1 } |
Enable memberOf attribute on an openldap server.
Source: https://www.brianshowalter.com/blog/installing-configuring-openldap
export PS1='\[\e[1;33m\]\u\[\e[1;37m\]@\[\e[1;32m\]\h\[\e[1;37m\]: \[\e[1;31m\]\w\[\e[0;36m\]$(__git_ps1 "\e[37m (\e[36m%s ⎇ \e[37m)\e[0m")\n\[\e[1;36m\]└─\$ ▶ \[\e[0m\]' | |
# if you don't have __git_ps1 (git-prompt.sh) , you can download it from here https://github.com/git/git/blob/master/contrib/completion/git-prompt.sh , and source it in your bash init files (ie. .bashrc) |
# -*- coding:utf-8 -*- | |
''' | |
Simplistic script to parse the detailed AWS billing CSV file. | |
Script displays cost of S3 operations broken down per region, bucket and usage | |
type (either storage or network). It also sums up the amount of storage used per bucket. | |
Output is filtered wrt to costs < 1$. | |
See http://docs.aws.amazon.com/awsaccountbilling/latest/about/programaccess.html for | |
how to set up programmatic access to your billing. |
#!/usr/bin/env python3 | |
import boto3 | |
from dateutil import parser | |
import argparse | |
import json | |
vendor_ami_filters = { | |
'amazon' : [{ 'Name': 'owner-id', 'Values': ['137112412989']}, {'Name': 'name', 'Values': ['amzn-ami-hvm-*'] }], | |
'ubuntu' : [{ 'Name': 'owner-id', 'Values': ['099720109477']}, {'Name': 'name', 'Values': ['ubuntu/images/hvm-*'] }] |
I've been having an issue with the following error appear in the prompt after upgrading to Yosemite. The solution was to source the git bash completion and prompt files from a local copy.
curl -o ~/.git-completion.bash https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash
curl -o ~/.git-prompt.sh https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh
Then in:
vi ~/bash_profile
Add:
curl 'http://<rancher_server_ip>/v2-beta/apikey' -H 'content-type: application/json' --data-binary '{"type":"apiKey","accountId":"1a1","name":"kubectl","description":"Provides workstation access to kubectl"}' --compressed | jq -r '.publicValue + ":" + .secretValue' | base64 | tr /+ _- | tr -d = |
sed -i -ne '/<!-- BEGIN realm -->/ {p; r realm.xml' -e ':a; n; /<!-- END realm -->/ {p; b}; ba}; p' server.xml |
By default Microsoft active directory servers will offer LDAP connections over unencrypted connections (boo!).
The steps below will create a new self signed certificate appropriate for use with and thus enabling LDAPS for an AD server. Of course the "self-signed" portion of this guide can be swapped out with a real vendor purchased certificate if required.
Steps have been tested successfully with Windows Server 2012R2, but should work with Windows Server 2008 without modification. Will require both a system with OpenSSL (ideally Linux/OSX) and (obviously) a Windows Active Directory server.