Skip to content

Instantly share code, notes, and snippets.

View MaximRouiller's full-sized avatar
🏠
Working from home

Maxime Rouiller MaximRouiller

🏠
Working from home
View GitHub Profile
$resourceGroupName = "rgServiceFabricCluster"
$location = "eastus"
# Create our resource group
az group create --location $location --name $resourceGroupName
# Create our KeyVault Standard instance
az keyvault create --name my-sfcluster-keyvault --location $location --resource-group $resourceGroupName --enabled-for-deployment
# This command export the policy on file.

Keybase proof

I hereby claim:

  • I am maximrouiller on github.
  • I am maximrouiller (https://keybase.io/maximrouiller) on keybase.
  • I have a public key ASAzChgehk2OF52sMJsrNUN-nJopQylFGBr_uSetk0HkZwo

To claim this, I am signing this object:

@MaximRouiller
MaximRouiller / Program.cs
Last active March 27, 2024 22:45
GitHub API access with Personal Access Token using C# HttpClient and .NET Core
public class Program
{
public static void Main(string[] args)
{
Task.WaitAll(ExecuteAsync());
Console.ReadLine();
}
public static async Task ExecuteAsync()
{
Param (
[Parameter(Mandatory = $true)]
[string]$RepositoryUrl,
[string]$org
)
$RepositoryName = $RepositoryUrl.Split('/')[4]
git clone $RepositoryUrl
cd $RepositoryName
git checkout -b repositoryurl
@MaximRouiller
MaximRouiller / Dockerfile
Created February 21, 2019 19:04
NodeJS Multistage Dockerfile
#build stage for a Node.js application
FROM node:lts-alpine as build-stage
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
#production stage
FROM nginx:stable-alpine as production-stage
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"resourceNameSuffix": {
"defaultValue": "deployment",
"type": "String"
}
},
"variables": {
@MaximRouiller
MaximRouiller / WhatsNewBotFunctions.cs
Last active June 14, 2022 23:59
In C#, create a fork, sync its master with an upstream , create a branch, commit a file, then finally create a PR on the upstream
string githubToken = Environment.GetEnvironmentVariable("GitHubKey", EnvironmentVariableTarget.Process);
const string owner = "dotnet";
string user = "WhatsNewBot";
string repo = "docs";
var date = DateTime.UtcNow.ToString("yyyyMMdd-HHmmss");
string branchName = $"whats-new-{date}";
string filename = $"{DateTime.UtcNow:yyyy-MM-dd}.md";
var client = new HttpClient();
@MaximRouiller
MaximRouiller / feeds.txt
Created July 6, 2020 14:10
.NET focused blog feeds
http://10printhello.com/rss/
http://beyond-code.com/rss.xml
http://blog.bloomca.me/atom.xml
http://blog.davidebbo.com/atom.xml
http://blog.galasoft.ch/posts/feed/
http://blog.maartenballiauw.be/syndication.axd
http://blog.paranoidcoding.com/atom.xml
http://cecilphillip.com/rss/
http://codebetter.com/blogs/MainFeed.aspx
http://daveaglick.com/feed.rss
@MaximRouiller
MaximRouiller / Program.cs
Last active January 17, 2023 02:58
Automatically download files to Azure Blob Storage using Copy From URL API with C#
using Azure.Storage.Blobs;
using System;
using System.IO;
using System.Threading.Tasks;
namespace ConsoleApp2
{
class Program
{
// Required .NET Package: Azure.Storage.Blobs version >=12