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 | |
# minimum size to get benefit from AWS S3 intelligent tiering. | |
size=128000 | |
function help() { | |
echo "" | |
echo "Usage: s3-stats.sh (options)" | |
echo "" | |
echo " Get counts and percent of files over a given size." |
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 | |
# list empty buckets | |
buckets=$(aws s3api list-buckets| jq --raw-output '.Buckets[].Name') | |
for bucket in $buckets;do | |
files=$(aws s3 ls $bucket) | |
if [[ -z "$myVar" ]]; then | |
echo "$bucket" | |
fi | |
done |
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 node | |
'use strict'; | |
// Stream unlimited rows into a Sql Server table. | |
// WARNING!!! WE DROP and RE-CREATE the table. Then stream the data into it. | |
// Source stream must be an object stream. Object property names must match | |
// table column names. Since SQL Server isn't case sensitive, don't think case |
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
@isTest | |
private class StackTrace_Test { | |
public class MyException extends Exception {} | |
static testMethod void test() { | |
Test.StartTest(); | |
someMethod(); | |
Test.StopTest(); | |
} |
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 | |
help () { | |
echo " | |
Usage: | |
test/s3select.sh -v \\ | |
--bucket some-bucket \\ | |
--prefix foo/2020/10/20/20/57 \\ | |
--expression \"select * from s3object o where o.rawmsghostname = 'ynthtest-Oct20T20-filler-5b45a8d7'\" |
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
mongo --ssl \ | |
--host $(cat ~/infrastructure/keys/varsdb-creds | cut -d ':' -f2 | cut -d '@' -f2):27017 \ | |
--sslCAFile /opt/helix-tools/rds-combined-ca-bundle.pem \ | |
--username $(cat ~/infrastructure/keys/varsdb-creds | cut -d ':' -f1) \ | |
--password $(cat ~/infrastructure/keys/varsdb-creds | cut -d ':' -f2 | cut -d '@' -f1) |
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 class provides logic for inbound just-in-time provisioning of single | |
// sign-on users in your Salesforce organization. | |
// Here's all the info we're going to have. | |
// | |
// Employee Id | |
// First Name | |
// Last Name | |
// Active Flag |
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
ubuntu@tmpc1:/etc/syslog-ng$ cat syslog-ng.conf | |
@version: 3.5 | |
@include "scl.conf" | |
@include "`scl-root`/system/tty10.conf" | |
# Syslog-ng configuration file, compatible with default Debian syslogd | |
# installation. | |
# First, set some global options. | |
options { chain_hostnames(off); flush_lines(0); use_dns(no); use_fqdn(no); |
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 node | |
'use strict'; | |
class Log { | |
constructor(options) { | |
options = options || {}; | |
this.level = 'off'; | |
this.levels = { | |
debug: 0, | |
info: 1, | |
warn: 2, |
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 node | |
'use strict'; | |
const AWS = require('aws-sdk'); | |
if (process.env.AWS_PROFILE) { // eslint-disable-line | |
AWS.config.credentials = new AWS.SharedIniFileCredentials({ | |
profile: process.env.AWS_PROFILE // eslint-disable-line | |
}); | |
AWS.config.logger = console; | |
} | |
const s3opts = {}; |
NewerOlder