Skip to content

Instantly share code, notes, and snippets.

View thdotnet's full-sized avatar

Thiago Custodio thdotnet

  • Xpirit USA
  • Texas, USA
View GitHub Profile
@thdotnet
thdotnet / gist:4c1968781b74a4864a05374742bac52b
Last active January 27, 2024 15:21
combine audio and video files with ffmpeg
ffmpeg -i '.\video.mp4' -i '.\audio.m4a' -c:v copy -c:a aac day5.mp4
@thdotnet
thdotnet / nba-azure.txt
Created November 22, 2022 22:19
url sample
NBA and Microsoft team up to transform fan experiences with cloud application modernization
Posted on November 16, 2022
Ashmi Chokshi General Manager, Azure Digital and Application Innovation
There’s nothing quite like watching a basketball game and cheering on your favorite team as they battle it out for points before the buzzer sounds. From the players and employees to the technology, all need to work in lockstep to deliver a truly immersive experience.
As fans, we expect personalized experiences that bring the virtual world and the real world together on and off the court. This means brand new viewing experiences and virtual reality, real-time highlights of our favorite basketball games, and seamless ways to connect with other fans (and rivals!) when we want, how we want.
Having the right technology partner and cloud-based app transformation strategy is necessary to help organizations like the National Basketball Association (NBA) continue to deliver such unforgettable experiences and exceed fan expecta
dependencies
| extend contextId = tostring(customDimensions["ProcessFunction-Context ID"])
| extend rowsCount = toint(customDimensions["ProcessFunction-Context ID|RowsCount"])
| extend processedCount = toint(customDimensions["ProcessFunction-RowsInjected"])
| where contextId == "d459341f-5d68-469e-bec1-27090bda91dc"
| project rowsCount, processedCount, timestamp
| render columnchart kind=unstacked
dependencies
| extend parentId = tostring(customDimensions["ChangeFeedProcessor-Context ID"])
@thdotnet
thdotnet / gist:5cbf2e9af85cd826b5e56f536bf9b648
Last active January 31, 2022 18:33
fixing The subscription is not registered to use namespace 'Microsoft.AzureActiveDirectory'
# 1
Start up a shell and type the following command.
az login
This will start up a browser and you will need to log into Azure.
# 2
Use the account list command you can get a list of your subscriptions.
using System;
using System.Linq;
using System.Linq.Expressions;
namespace Logic.Movies
{
internal sealed class IdentitySpecification<T> : Specification<T>
{
public override Expression<Func<T, bool>> ToExpression()
{
using System;
using System.Linq.Expressions;
namespace Sample
{
public class GenericSpecification<T>
{
public Expression<Func<T, bool>> Expression { get; }
public GenericSpecification(Expression<T, bool> expression)
apiVersion: apps/v1
# The type of workload we are creating
kind: Deployment
metadata:
# Name of deployment - Required
name: aks-web-app-deployment
spec:
replicas: 2
selector:
matchLabels:
apiVersion: v1
# The type of workload we are creating
kind: Service
metadata:
# Name of Service - Required
name: aks-web-app-service
# Specific details about the Service
spec:
# Type of Service to be deployed
type: LoadBalancer
@thdotnet
thdotnet / gist:4781ad32ab126da27af144ab6e90f928
Created September 24, 2021 12:58
load and interpret JS scripts
//sample.js
window.onload = function () {
var setInnerHTML = function (elm, html) {
elm.innerHTML = html;
Array.from(elm.querySelectorAll("script")).forEach(oldScript => {
const newScript = document.createElement("script");
Array.from(oldScript.attributes)
.forEach(attr => newScript.setAttribute(attr.name, attr.value));
newScript.appendChild(document.createTextNode(oldScript.innerHTML));
@thdotnet
thdotnet / gist:a70bcfa3858f6ac7f01e6990bb6bf604
Created March 9, 2020 21:38
T-SQL - GeoDistance sample
DECLARE @LAT VARCHAR(10)
DECLARE @LONG VARCHAR(10)
DECLARE @GEO2 GEOGRAPHY
DECLARE @LAT_B VARCHAR(10)
DECLARE @LONG_B VARCHAR(10)
SET @LAT='29.0'
SET @LONG='-95.612528'