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 | |
| # | |
| # Purpose: Use the bash file to automate the creation of an Azure Static Web App with CICD Github Pipeline | |
| # Requirements: Azure subscription, Github branch and repo token | |
| # Author: 0garcia - ozkary | |
| # Article: https://www.ozkary.com/2021/02/azure-static-web-app-github-actions-cicd.html | |
| # | |
| clear | |
| # creates the azure resources for a static web app with github cicd pipeline |
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
| /* | |
| Filename: azure-sql-read-only-user.sql | |
| Purpose: Create a read-only login user on a target database to enable the access to the data, but disable any insert, update, delete operations. | |
| Author: | |
| Oscar Garcia @ozkary | |
| Reference: |
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 { ClientRequest} from "http"; | |
| import http = require("https"); | |
| /** | |
| * https request class in typesript to show how to manage errors and events | |
| * to help prevent ECONNRESET errors | |
| */ | |
| export class HttpRequest { | |
| public async send(options: http.RequestOptions, data?: any): Promise<any> { |
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
| using System; | |
| using System.Runtime.InteropServices; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| namespace ConsoleApp1 | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) |
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
| internal class AuthWebViewClient : WebViewClient | |
| { | |
| public string Username { get; } | |
| public string Password { get; } | |
| private int LoginCount = 0; | |
| /// <summary> | |
| /// gets the user credentials for the impersonation process | |
| /// </summary> | |
| /// <param name="username"></param> |
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
| static void Main(string[] args) | |
| { | |
| Console.WriteLine("Running a simple multi join statement on EF!"); | |
| var connection = @"Server=.\sqlexpress;Database=dev;Trusted_Connection=True;ConnectRetryCount=0"; | |
| var optionsBuilder = new DbContextOptionsBuilder<TaskContext>(); | |
| optionsBuilder.UseSqlServer(connection); | |
| using (TaskContext context = new TaskContext(optionsBuilder.Options)) |
NewerOlder