Skip to content

Instantly share code, notes, and snippets.

View thoughtful-solutions's full-sized avatar

Thoughtful Solutions, Creatively Implemented and Communicated thoughtful-solutions

View GitHub Profile
@thoughtful-solutions
thoughtful-solutions / Azure-Cognitive-Search-on-JSON-in-Blob-Storage.md
Last active September 2, 2020 15:57
Azure-Cognitive-Services-on-JSON-in-Blob-Storage

Azure Congnative Search

Azure Cognative Search is a search tool capable of ingesting and searching a number of data formats including Office and JSON documents.

The service is currently under development and marked as preview This means that the azure CLI does not provide all the tooling you might wish and you are required to post some configuration pieces using curl or similar.

Build Search Service

The free tier of service (SKU) is limited in the size of the documents it can handle.

@thoughtful-solutions
thoughtful-solutions / jq.md
Last active December 10, 2020 11:15
JSON to CSV

JSON to CSV

jq provides a tool for processeding JSON files, in a similar manner to sed

Proccessing JSON files to CSV

 jq '.daily.calls | input_filename + "," + @csv' *.json  \
    |  sed -e 's/^"\([a-z7]*\)\-\([0-9]*\).json/\"\2,\1/'  \
    | sed -e 's/\"//g' > test.csv  

# OS VMs
It is often needed for the testing of ideas the ability to construct VMs on demand.
[Boxcutter](https://github.com/boxcutter) provides such a service.
## Using on Windows-10
The key item to having boxcutter working on windows-10 is to have [Scoop.sh](https://scoop.sh] installed and to have GnuMake installed
as well as the packer tools.
## example buid
'''
@thoughtful-solutions
thoughtful-solutions / python-module.md
Created January 6, 2022 09:28
Python Module redirection

Python Module Redirection

It is occassionally necessary to redirect where a python module is installed from.

Using a module from the existing sites structure

from pprint import pprint
from pii_generator.pii_data_generator import PIIGenerator
## to build a container
'''
docker build . -t test
'''
## to run a container
'''
docker run --rm -ir --entrypoint bash test
'''
## to delete zombine containers
'''

Gherkin Recorder

One problem with starting people working with Gherkin is getting them to interact with web pages quickly and record the syntax for those interactions

gherkin-scenario-builder provides a way to introduce people to the gherkin syntax and the associated output.

Install Chromium

Azure-AD

Install PowerShell AZ modules

Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Install-Module -Name Az -Scope CurrentUser -Repository PSGallery -Force
Install-Module -Name AzureAD -Scope CurrentUser

Connect Azure Account

@thoughtful-solutions
thoughtful-solutions / azure-devops.md
Last active October 24, 2022 10:26
Azure DevOPS

Azure DevOPS cli

Configure the CLI

Begin by creating ensuring the tools are in place to work with Azure DevOPS

scoop install azure-cli
az extension --name azure-devops
az extension list
@thoughtful-solutions
thoughtful-solutions / Azure_CosmosDB_Emulator.md
Last active July 4, 2024 14:33
Azure_CosmosDB_Emulator.md

Some musing on github (gh) cli

Configure on dnf Linux access.

Install packages

sudo dnf install 'dnf-command(config-manager)'
sudo dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo
sudo dnf install gh --repo gh-cli

Configure Authentications