Useful Azure CLI commands
- Register all Microsoft resource providers
az provider list --query "[? starts_with(@.namespace, 'Microsoft')].namespace" -o tsv \ | xargs -I{} sh -c 'echo "Registering provider {}" && az provider register -n {}'
| bool invariantsEnabled() @trusted nothrow pure | |
| { | |
| static struct HasInvariant | |
| { | |
| @safe pure: | |
| invariant { throw new Exception("From invariant"); } | |
| void triggerInvaraint() { } | |
| } | |
| try | |
| HasInvariant().triggerInvaraint(); |
| extern(C) void _start() { | |
| static if ("a" == "a") {} | |
| } |
| module range_primitives_example; | |
| /++ | |
| Takes a slice of the first `n` elements from `input` and advances it by the | |
| same amount. | |
| +/ | |
| inout(int[]) readN_version1(ref inout(int)[] input, size_t n) | |
| { | |
| auto result = input[0 .. n]; | |
| input = input[n .. $]; |
| void main() {} | |
| immutable string[ubyte] valueTypes; | |
| // This is a shared module constructor. Code in this block will be executed | |
| // exactly once at application startup. It is similar to running code in the | |
| // global scope in JavaScript. Shared module constructors are allowed to | |
| // "mutate" immutable global variables in order to initialize them. | |
| shared static this() | |
| { |
| void main() {} | |
| enum string[ubyte] valueTypes = [ | |
| 0x7F: "i32", | |
| 0x7E: "i64", | |
| 0x7D: "f32", | |
| 0x7C: "f64" | |
| ]; | |
| pure unittest |
| void main() | |
| { | |
| import std.stdio : writeln; | |
| import std.traits : EnumMembers; | |
| foreach (SymbolKind kind; [EnumMembers!SymbolKind]) | |
| kind.enumUdatoString.writeln; | |
| `----------------------`.writeln; | |
| void main() | |
| { | |
| import std.json : parseJSON; | |
| import std.stdio : writeln; | |
| const parsed = mySampleJson.parseJSON; | |
| const tree = parsed.jsonToTree; | |
| (*tree).writeln; | |
| } |
| [0;33m[INFO] Running /data/data/com.termux/files/home/code/repos/dlang/dlang/dub/test/0-init-fail-json.sh...[0m | |
| [0;33m[INFO] Running /data/data/com.termux/files/home/code/repos/dlang/dlang/dub/test/0-init-fail.sh...[0m | |
| [0;33m[INFO] Running /data/data/com.termux/files/home/code/repos/dlang/dlang/dub/test/0-init-interactive.sh...[0m | |
| Package recipe format (sdl/json) [json]: Name [0-init-interactive]: Description [A minimal D application.]: Author name [u0_a160]: License [proprietary]: Copyright string [Copyright © 2020, author]: Add dependency (leave empty to skip) []: Successfully created an empty project in '/data/data/com.termux/files/home/code/repos/dlang/dlang/dub/test/0-init-interactive'. | |
| Package successfully created in 0-init-interactive | |
| [0;33m[INFO] Running /data/data/com.termux/files/home/code/repos/dlang/dlang/dub/test/0-init-multi-json.sh...[0m | |
| Successfully created an empty project in '/data/data/com.termux/files/home/code/repos/dlang/dlang/dub/test/0-init-multi-pack'. | |
| Package successfully cre |
Useful Azure CLI commands
az provider list --query "[? starts_with(@.namespace, 'Microsoft')].namespace" -o tsv \
| xargs -I{} sh -c 'echo "Registering provider {}" && az provider register -n {}'| ARG BASE_IMAGE=node:lts-alpine | |
| FROM $BASE_IMAGE | |
| WORKDIR /src | |
| ENV HOST=0.0.0.0 PORT=8080 | |
| RUN echo $'\ | |
| "use strict";\n\ | |
| const http = require("http");\n\ | |
| const server = http.createServer((request, response) => {\n\ response.writeHead(200, {"Content-Type": "text/plain"});\n\ | |
| response.end("Hello, World!");\n\ | |
| });\n\ |