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
#!/bin/bash | |
set -e | |
echo "Setting up Neovim with a modern configuration..." | |
# Detect the operating system | |
if [ -f /etc/os-release ]; then | |
. /etc/os-release | |
OS=$NAME |
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
function Load-RoutingTableFromJson { | |
param ( | |
[string]$JsonFilePath | |
) | |
if (-not (Test-Path $JsonFilePath)) { | |
Write-Error "JSON file not found: $JsonFilePath" | |
return $null | |
} |
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 json | |
import requests | |
import subprocess | |
import logging | |
import argparse | |
import csv | |
from datetime import datetime | |
import uuid | |
def configure_logging(debug): |
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
#!/bin/bash | |
# ============================================================================= | |
# Install AzCopy on Linux | |
# https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-v10 | |
# https://github.com/Azure/azure-storage-azcopy | |
# ----------------------------------------------------------------------------- | |
# Developer.......: Andre Essing (https://www.andre-essing.de/) | |
# (https://github.com/aessing) | |
# (https://twitter.com/aessing) | |
# (https://www.linkedin.com/in/aessing/) |
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
#!/bin/bash | |
set -x | |
patName="nameOfThePatToken" | |
adoOrgName="yourOrgName" | |
apiVersion="7.1-preview.1" | |
apiUri="https://vssps.dev.azure.com/$adoOrgName/_apis/tokens/pats?api-version=$apiVersion" | |
validTo=$(date -d '+90 days' +'%Y-%m-%dT%H:%M:%S.%3NZ') |
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
This is sample public gist |
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
function Invoke-DatabricksAdminCreation { | |
[CmdletBinding()] | |
param ( | |
[Parameter(Mandatory = $true, HelpMessage = 'Databricks instance URL')] | |
[string]$databricksUrl, | |
[Parameter(Mandatory = $true, HelpMessage = 'Databricks JWT token')] | |
[string]$bearerToken, | |
[Parameter(Mandatory = $true, HelpMessage = 'Object ID for the user')] |
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
curl --location 'https://{openaiName}.openai.azure.com/openai/chunks?api-version=2023-03-31-preview' \ | |
--header 'api-key: {openai api key}' \ | |
--header 'Content-Type: application/json' \ | |
--data '{ | |
"values": [ | |
{ | |
"recordId": "0", | |
"data": { | |
"document_id": "aHR0cHM6Ly9zdGtuc294Zm9yZGRhdGFzYm94ZXVzMDEuYmxvYi5jb3JlLndpbmRvd3MubmV0L2RhdGEwMS9CZW5lZml0c19VSyUyMCgxKS5wZGY1", | |
"text": "\nYour employee benefits summary \n\nYour employee \nbenefits summary\n\n\n\nYour employee benefits summary \n\n\n\nYour employee benefits summary Your employee benefits summary \n\nYour benefits\nAs well as your salary and continued support of your professional \ndevelopment, we aim to go further and reward you with some truly \nexceptional core benefits. Here’s a summary of some of these - \nmake sure you’re not missing out on anything!\n\n\n\nYour employee benefits summary \n\nValues \nOur values drive us. Our values are not abstract, intangible beliefs: \nfor Kainos, our values are what we expect fr |
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
$transcriptsDirectory = "C:\transcripts" | |
$currentUser = [Security.Principal.WindowsIdentity]::GetCurrent() | |
$currentUserName = $currentUser.Name | |
$transcriptUser = $currentUserName.replace('\', '_') | |
if (!(Test-Path $transcriptsDirectory)) { New-Item -Path $transcriptsDirectory -ItemType Directory } | |
if ($currentUserName.Contains("SYSTEM")) { icacls "C:\AzureData" /grant Everyone:F /T } | |
$date = Get-Date | |
$transcriptFileName = "customData" + '_' + $transcriptUser + '_' + $date.ToString("yyyy-MM-dd_HH-mm-ss") + ".log" |
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
name: CI | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Create tmate session | |
run: | | |
set -m |
NewerOlder