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
provider "aws" { | |
access_key = "${var.access_key}" | |
secret_key = "${var.secret_key}" | |
region = "${var.region}" | |
} | |
resource "aws_iam_role" "iam_for_terraform_lambda" { | |
name = "app_${var.app_env}_lambda" | |
assume_role_policy = <<EOF | |
{ |
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
git branch -r --merged master | %{$_.trim()} | ?{$_ -notmatch 'develop' -and $_ -notmatch 'stage' -and $_ -notmatch 'master'} | %{git branch -d -r $_; if($?){ git push origin $_.Replace("origin/",":refs/heads/")}} |
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
#!/usr/bin/env bash | |
# tlrecode.sh | |
# Decode and encode TP-LINK router config files. | |
# | |
# Creative Commons CC0 License: | |
# http://creativecommons.org/publicdomain/zero/1.0/ | |
# | |
# To the extent possible under law, the person who associated CC0 with this | |
# work has waived all copyright and related or neighboring rights to this work. |
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
<# | |
.SYNOPSIS | |
Gets a PowerShell Credential (PSCredential) from the Windows Credential Manager | |
.DESCRIPTION | |
Adapted from: http://stackoverflow.com/questions/7162604/get-cached-credentials-in-powershell-from-windows-7-credential-manager | |
.PARAMETER TargetName | |
The name of the target login informations in the Windows Credential Manager |
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
git branch -a | %{$_.trim()} | ?{$_ -notmatch 'develop' -and $_ -notmatch 'master'} | %{$_.Replace("remotes/","")} | %{git branch -d -r $_ ; if($?){ git push origin $_.Replace("origin/",":refs/heads/")}} |
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
dir cert:\localmachine\my | |
'' | |
'Get the certificate''s Thumbprint' | |
Pause |
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 work (Modern Encryption of a String C#, by James Tuley), | |
* identified by James Tuley, is free of known copyright restrictions. | |
* https://gist.github.com/4336842 | |
* http://creativecommons.org/publicdomain/mark/1.0/ | |
*/ | |
using System; | |
using System.IO; | |
using System.Text; |