Skip to content

Instantly share code, notes, and snippets.

Avatar

Mike Arnold razorsedge

View GitHub Profile
@razorsedge
razorsedge / bdmapping
Created Apr 17, 2012 — forked from smoser/bdmapping
bdmapping: utility for providing the correct block-device-mapping args for ebs instances on EC2
View bdmapping
#!/bin/sh
Usage() {
cat <<EOF
${0##*/} [-c] instance-type
print ephemeral store block-device-mapping arguments for 'instance-type'
If '-c' given, also print "--instance-type <instance-type>"
examples:
@razorsedge
razorsedge / autodiscover-json.php
Last active Feb 10, 2019
Simplified version of https://github.com/mailcow/mailcow-dockerized/blob/master/data/web/autodiscover-json.php for anyone wanting to to support email autodiscovery like at https://github.com/gronke/email-autodiscover . Keywords: GET /autodiscover/autodiscover.json?Email=user%40domain.com&Protocol=ActiveSync&RedirectCount=1
View autodiscover-json.php
<?php
header("Content-Type: application/json");
if ($_GET['Protocol'] == 'ActiveSync') {
echo '{"Protocol":"ActiveSync","Url":"https://' . $_SERVER['HTTP_HOST'] . '/Microsoft-Server-ActiveSync"}';
}
elseif ($_GET['Protocol'] == 'AutodiscoverV1') {
echo '{"Protocol":"AutodiscoverV1","Url":"https://' . $_SERVER['HTTP_HOST'] . '/Autodiscover/Autodiscover.xml"}';
}
else {
View keybase.md

Keybase proof

I hereby claim:

  • I am razorsedge on github.
  • I am razorsedge (https://keybase.io/razorsedge) on keybase.
  • I have a public key ASDm5TO9PIpl7ZgzDpGExzVgSbALPmwp8IfXtjpfgaTJAgo

To claim this, I am signing this object:

@razorsedge
razorsedge / encrypt-centos.org-6-ami.json
Created Nov 29, 2016
Packer templates to copy and encrypt a Marketplace AMI.
View encrypt-centos.org-6-ami.json
{
"description": "Copy the centos.org CentOS 6 AMI into our account so that we can add boot volume encryption.",
"min_packer_version": "0.11.0",
"variables": {
"aws_region": "us-east-1",
"aws_vpc": null,
"aws_subnet": null,
"ssh_username": "centos"
},
"builders": [
You can’t perform that action at this time.