This file contains hidden or 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
import logging | |
from urllib.request import urlopen | |
logger = logging.getLogger() | |
logger.setLevel(logging.INFO) | |
SITE = 'http://www.google.com' | |
def lambda_handler(event, context): | |
response = urlopen(SITE) |
This file contains hidden or 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
function Update-OktaConfigFile { | |
Param( | |
[Bool]$Uncomment, | |
[Int]$MatchLineNumber | |
) | |
$content = Get-Content -Path $PSScriptRoot\config.properties | |
$content | | |
ForEach-Object { | |
if ($_.ReadCount -eq $MatchLineNumber -or $_.ReadCount -eq $MatchLineNumber+1) { |
This file contains hidden or 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
{ ($.eventSource="ec2.amazonaws.com") && ($.userIdentity.type="IAMUser") } |
This file contains hidden or 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
@echo off | |
powershell.exe -File %USERPROFILE%\.okta\run-okta-aws.ps1 |
This file contains hidden or 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
const AWS = require('aws-sdk'); | |
const snsTopicArn = process.env.SNSTopicArn; | |
const idepAccountNumbers = process.env.IDEPAWSAccountNumbers.split(',').map(item => item.trim()); | |
const ninetyninesmeAccountNumbers = process.env.Project99SMEAWSAccountNumbers.split(',').map(item => item.trim()); | |
AWS.config.update({ region: 'us-east-1' }); | |
const costexplorer = new AWS.CostExplorer(); | |
const getTotal = (params) => { |
This file contains hidden or 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
const http = require('https'); | |
var hipchatToken = process.env['hipchatToken'] | |
var hipchatRoom = '96'; | |
exports.handler = async (event, context, callback) => { | |
const body = JSON.parse(event.body); | |
const message = body.message; | |
var hipchatMessage = JSON.stringify({ |
This file contains hidden or 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
$apitoken = <redacted> | |
$roomid = "20" | |
$messageText = "message_goes_here" | |
$color = 'yellow' | |
$body = @{ | |
color = $color | |
message = $messageText | |
notify = $true | |
message_format = "text" |