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
{ | |
"Version": "2012-10-17", | |
"Id": "AWSConsole-AccessLogs-Policy", | |
"Statement": [ | |
{ | |
"Sid": "AWSConsoleStmt", | |
"Effect": "Allow", | |
"Principal": { | |
"AWS": "arn:aws:iam::${AwsAccount}:root" | |
}, |
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
// make sure to add this dependency | |
// npm i @aws-sdk/client-s3 | |
const s3lib = require("@aws-sdk/client-s3"); | |
const util = require("util"); | |
const s3 = new s3lib.S3Client({ | |
region: process.env.AWS_REGION || "us-east-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
import { CommandModule, Argv, Options, ArgumentsCamelCase } from 'yargs' | |
export interface MyOptions extends Options { | |
interactive: boolean | |
env: string | |
color: string | |
} | |
export class MyCommand<U extends MyOptions> implements CommandModule<{}, U> { | |
public command = 'my-cmd' |
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
SELECT justify_interval( | |
('2020-12-31'::TIMESTAMP - '2020-01-01'::TIMESTAMP) | |
) | |
-- results `1 year 5 days` |
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 suds | |
import os | |
url="https://api.cvent.com/soap/V200611.ASMX?WSDL" | |
client = suds.client.Client(url) | |
print(client) | |
login = client.factory.create('Login') | |
login.AccountNumber = os.environ['ACCOUNT_NUMBER'] | |
login.UserName = os.environ['USER_NAME'] |
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
#!/usr/bin/env bash | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
BRANCH=$(git rev-parse --abbrev-ref HEAD) |
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
#!/bin/bash | |
pbpaste | jq . | vim - |
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
#go to this url: https://carbon.now.sh/ |
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
<?php | |
/** | |
* @see \flipbox\saml\idp\models\Settings::class | |
*/ | |
return [ | |
'sloDestroySpecifiedSessions' => true, | |
]; |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "ListAllMyBuckets", | |
"Effect": "Allow", | |
"Action": [ | |
"s3:ListAllMyBuckets" | |
], | |
"Resource": "*" |
NewerOlder