This file contains 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
<system.webServer> | |
<staticContent> | |
<remove fileExtension=".woff" /> | |
<mimeMap fileExtension=".woff" mimeType="application/font-woff" /> | |
</staticContent> | |
</system.webServer> |
This file contains 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
<system.web> | |
<sessionState | |
mode="StateServer" | |
stateConnectionString="tcpip=localhost:42424" | |
cookieless="false" | |
timeout="120" /> | |
</system.web> |
This file contains 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
DECLARE @BackupPath nvarchar(512) = '<Directory Path of Destination Folder>' | |
DECLARE @BackupName nvarchar(512) = '<Name of Backup File>' | |
DECLARE @FullBackupPath nvarchar(512) = @BackupPath + '\' + @BackupName + '.bak' | |
BACKUP DATABASE <Database Name> | |
TO DISK = @FullBackupPath | |
WITH FORMAT, | |
MEDIANAME = @BackupName, | |
NAME = '<Backup Name>' | |
-- REMEMBER: Add the SQL Server user to be able to write to the destination directory |
This file contains 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
# This will give a list of interfaces (along with index) | |
Get-DnsClient | |
Set-DnsClientServerAddress -InterfaceIndex <Interface Index> -ServerAddresses ("<IP Address>", "<IP Address 2>") | |
Set-DnsClientServerAddress -InterfaceIndex <Interface Index> -ResetServerAddresses |
This file contains 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
$totalSeconds = 0 | |
$wmp = New-Object -ComObject wmplayer.ocx | |
ls {{movieDirectoryPathHere}} -Recurse -Filter *.m4v | %{ | |
$movie = $wmp.newMedia($_.FullName) | |
$totalSeconds += $movie.duration | |
} | |
Write-Host "$totalSeconds seconds." |
This file contains 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
var fromAddress = "[email protected]"; // TODO: Change this to your desired from address | |
var aws = require('aws-sdk'); | |
var ses = new aws.SES({ apiVersion: '2010-12-01' }); | |
exports.handler = function (event, context) { | |
// Validate the incoming event | |
if (!event.Records | |
|| event.Records.length == 0 | |
|| !event.Records[0].Sns |
This file contains 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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"logs:CreateLogGroup", | |
"logs:CreateLogStream", | |
"logs:PutLogEvents" | |
], |
This file contains 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
/** | |
* A sample Lambda function that looks up the latest AMI ID for a given region and architecture. | |
**/ | |
// Map instance architectures to an AMI name pattern | |
var archToAMINamePattern = { | |
"PV64": "amzn-ami-pv*.x86_64-ebs", | |
"HVM64": "amzn-ami-hvm*.x86_64-gp2", | |
"HVMG2": "amzn-ami-graphics-hvm-*x86_64-ebs*" | |
}; |
This file contains 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
{ | |
"AWSTemplateFormatVersion" : "2010-09-09", | |
"Description" : "AWS CloudFormation AMI Look Up Sample Template: Demonstrates how to dynamically specify an AMI ID. This template provisions an EC2 instance with an AMI ID that is based on the instance's type and region. **WARNING** This template creates an Amazon EC2 instance. You will be billed for the AWS resources used if you create a stack from this template.", | |
"Parameters": { | |
"InstanceType" : { | |
"Description" : "EC2 instance type", | |
"Type" : "String", | |
"Default" : "t2.micro", |
This file contains 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
from troposphere import Ref, Template | |
import troposphere.ec2 as ec2 | |
t = Template() | |
instance = ec2.Instance("myinstance") | |
instance.ImageId = "ami-951945d0" | |
instance.InstanceType = "t1.micro" | |
t.add_resource(instance) | |
print(t.to_json()) |
OlderNewer