INSERT GRAPHIC HERE (include hyperlink in image)
Subtitle or Short Description Goes Here
ideally one sentence >
| #!/usr/bin/env python3 | |
| # inspire by https://www.slsmk.com/getting-the-size-of-an-s3-bucket-using-boto3-for-aws/ | |
| import boto3 | |
| import datetime | |
| def main(): | |
| # Get all regions | |
| ec2 = boto3.setup_default_session(region_name='us-east-1') | |
| ec2 = boto3.client('ec2') | |
| desc_regions = ec2.describe_regions() |
| import boto3 | |
| from datetime import date | |
| from datetime import datetime | |
| today = date.today() | |
| today = datetime.combine(today, datetime.min.time()) | |
| client = boto3.client('s3') | |
| # Get all buckets | |
| response = client.list_buckets() |
| // Javascript helper functions for parsing and displaying UUIDs in the MongoDB shell. | |
| // This is a temporary solution until SERVER-3153 is implemented. | |
| // To create BinData values corresponding to the various driver encodings use: | |
| // var s = "{00112233-4455-6677-8899-aabbccddeeff}"; | |
| // var uuid = UUID(s); // new Standard encoding | |
| // var juuid = JUUID(s); // JavaLegacy encoding | |
| // var csuuid = CSUUID(s); // CSharpLegacy encoding | |
| // var pyuuid = PYUUID(s); // PythonLegacy encoding | |
| // To convert the various BinData values back to human readable UUIDs use: | |
| // uuid.toUUID() => 'UUID("00112233-4455-6677-8899-aabbccddeeff")' |
| // | |
| // RXTimer.h | |
| // | |
| // Copyright 2013 Andreas Grosam | |
| // | |
| // Licensed under the Apache License, Version 2.0 (the "License"); | |
| // you may not use this file except in compliance with the License. | |
| // You may obtain a copy of the License at | |
| // | |
| // http://www.apache.org/licenses/LICENSE-2.0 |
| ## I just ran into this after initializing a Visual Studio project _before_ adding a .gitignore file (like an idiot). | |
| ## I felt real dumb commiting a bunch of files I didn't need to, so the commands below should do the trick. The first two commands | |
| ## came from the second answer on this post: http://stackoverflow.com/questions/7527982/applying-gitignore-to-committed-files | |
| # See the unwanted files: | |
| git ls-files -ci --exclude-standard | |
| # Remove the unwanted files: | |
| git ls-files -ci --exclude-standard -z | xargs -0 git rm --cached |
| var express = require('express') | |
| var app = express() | |
| app.listen(1337) | |
| app.all('/stream/:chunks', function (req, res, next) { | |
| res.writeHead(200, { | |
| 'Content-Type': 'text/plain', |
| -- Gets all queries for a given date range | |
| select starttime, endtime, trim(querytxt) as query | |
| from stl_query | |
| where starttime between '2014-11-04' and '2014-11-05' | |
| order by starttime desc; | |
| -- Gets all queries that have been aborted for a given date range | |
| select starttime, endtime, trim(querytxt) as query, aborted | |
| from stl_query | |
| where aborted=1 |
| git branch -m old_branch new_branch # Rename branch locally | |
| git push origin :old_branch # Delete the old branch | |
| git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |