Skip to content

Instantly share code, notes, and snippets.

View matt-hensley's full-sized avatar

Matt Hensley matt-hensley

View GitHub Profile
@matt-hensley
matt-hensley / gist:d86c279aa66a5aa5ee30
Last active January 11, 2016 15:25
Ansible sshd/ufw
---
- hosts: all
tasks:
- ufw: rule=allow port={{ item.port }} proto={{ item.proto }}
with_items:
- { port: 22, proto: tcp }
- { port: 80, proto: tcp }
- { port: 8080, proto: tcp }
- { port: 1953, proto: tcp }
- ufw: policy=deny state=enabled
@matt-hensley
matt-hensley / Rollbar.targets
Last active November 2, 2017 03:47
MSBuild target to notify Rollbar of a publish. Requires RollbarSharp web.config entries and git on user's path.
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="NotifyRollbarOfDeploy" AfterTargets="MSDeployPublish;CopyAllFilesToSingleFolderForPackage">
<XmlPeek XmlInputPath="$(_PackageTempDir)\web.config"
Query="//appSettings/add[@key='Rollbar.AccessToken']/@value">
<Output TaskParameter="Result" ItemName="RollbarAccessToken" />
</XmlPeek>
<XmlPeek XmlInputPath="$(_PackageTempDir)\web.config"
Query="//appSettings/add[@key='Rollbar.Environment']/@value">
<Output TaskParameter="Result" ItemName="RollbarEnvironment" />
@matt-hensley
matt-hensley / web.config
Created February 8, 2014 22:44
kirby rewrite rules
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpErrors errorMode="Detailed" />
<asp scriptErrorSentToBrowser="true" />
<rewrite>
<rules>
<rule name="Block text files" stopProcessing="true">