This file contains 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
# Synchronously | |
git ls-tree -r --name-only HEAD | foreach { (Get-Item $_).LastWriteTime = [DateTime]::Parse("$(git log -1 --format="%ad" --date=iso8601 -- $_)") } | |
# Asynchronously | |
git ls-tree -r --name-only HEAD | ForEach-Object -Parallel { (Get-Item $_).LastWriteTime = [DateTime]::Parse("$(git log -1 --format="%ad" --date=iso8601 -- $_)") } |
This file contains 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
search: | |
\[FunctionName\("(\w+)"\)\] | |
replace: | |
[FunctionName(nameof($1))] |
This file contains 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
// Required Package: @azure/storage-blob and dotenv | |
// API Docs: https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob-from-url | |
require('dotenv').config(); | |
const { BlobServiceClient } = require('@azure/storage-blob'); | |
const path = require('path'); | |
let now = new Date(); | |
const AZURE_STORAGE_CONNECTION_STRING = process.env.AZURE_STORAGE_CONNECTION_STRING; |
This file contains 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 os | |
from azure.storage.blob import BlobServiceClient, BlobClient, ContainerClient | |
from datetime import datetime | |
from urllib.parse import urlparse | |
# Required package: azure-storage-blob | |
# API Docs: https://docs.microsoft.com/en-us/rest/api/storageservices/copy-blob-from-url | |
now = datetime.now() | |
connection_string = os.getenv('AZURE_CONNECTION_STRING') |
This file contains 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 Azure.Storage.Blobs; | |
using System; | |
using System.IO; | |
using System.Threading.Tasks; | |
namespace ConsoleApp2 | |
{ | |
class Program | |
{ | |
// Required .NET Package: Azure.Storage.Blobs version >=12 |
This file contains 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
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 |
This file contains 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
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(); |
This file contains 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
{ | |
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"resourceNameSuffix": { | |
"defaultValue": "deployment", | |
"type": "String" | |
} | |
}, | |
"variables": { |
This file contains 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
#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 |
This file contains 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
Param ( | |
[Parameter(Mandatory = $true)] | |
[string]$RepositoryUrl, | |
[string]$org | |
) | |
$RepositoryName = $RepositoryUrl.Split('/')[4] | |
git clone $RepositoryUrl | |
cd $RepositoryName | |
git checkout -b repositoryurl |
NewerOlder