Skip to content

Instantly share code, notes, and snippets.

View razorsedge's full-sized avatar

Mike Arnold razorsedge

View GitHub Profile
@razorsedge
razorsedge / autodiscover-json.php
Last active June 17, 2022 10:50
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
<?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 {
@razorsedge
razorsedge / keybase.md
Last active July 19, 2019 19:13
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 November 29, 2016 01:11
Packer templates to copy and encrypt a Marketplace AMI.
{
"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": [
@razorsedge
razorsedge / bdmapping
Created April 17, 2012 16:55 — forked from smoser/bdmapping
bdmapping: utility for providing the correct block-device-mapping args for ebs instances on EC2
#!/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: