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
| # returning 202 status from Azure function will result in data factory to poll the status every "Retry-After" seconds | |
| # This is now possible also with durable functions | |
| def main(req: func.HttpRequest) -> func.HttpResponse: | |
| try: | |
| status = get_status() | |
| status_query_url = os.getenv("status_query_app_url") % (os.getenv('env')) | |
| if not status: | |
| return func.HttpResponse(status_code=202, headers={"Retry-After": "60", "Expires": "-1", | |
| "Location": status_query_url}) | |
| return func.HttpResponse(status_code=200) |
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
| """ | |
| Azure Table Storage - Python Batching Example | |
| (C) 2016 MediaRealm.com.au | |
| Needs v0.30.0 of the Azure Storage Python SDK | |
| https://github.com/Azure/azure-storage-python/releases/tag/v0.30.0 | |
| """ | |
| from azure.storage.table import TableService, Entity, TableBatch |
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 | |
| # Sometimes you need to move your existing git repository | |
| # to a new remote repository (/new remote origin). | |
| # Here are a simple and quick steps that does exactly this. | |
| # | |
| # Let's assume we call "old repo" the repository you wish | |
| # to move, and "new repo" the one you wish to move to. | |
| # | |
| ### Step 1. Make sure you have a local copy of all "old repo" | |
| ### branches and tags. |
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
| 1. screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty | |
| 2. when done use CTRL-A CTRL-\ and then y (for yes) to exit | |
| Alternative method: | |
| 1. docker run -it --privileged --pid=host debian nsenter -t 1 -m -u -n -i 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
| // # Mocha Guide to Testing | |
| // Objective is to explain describe(), it(), and before()/etc hooks | |
| // 1. `describe()` is merely for grouping, which you can nest as deep | |
| // 2. `it()` is a test case | |
| // 3. `before()`, `beforeEach()`, `after()`, `afterEach()` are hooks to run | |
| // before/after first/each it() or describe(). | |
| // | |
| // Which means, `before()` is run before first it()/describe() |
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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |