This is a command I use to gather data from git logs for processing and visualization.
{ | |
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", | |
"blocks": [ | |
{ | |
"alignment": "left", | |
"newline": true, | |
"segments": [ | |
{ | |
"foreground": "#eae600", | |
"leading_diamond": "<#eae600> \ue201 </>", |
OK so you just made a SQL database somewhere... A VM, in the cloud, whatever. Then you made an app server somewhere else and you want to make sure the app server vm can actually access the database. This little script tests the ability to connect, do some basic CRUD, then cleans up after itself.
This is helpful if you run into problems and you need to rule out connectivity to the database.
You need Python3 and pymssql to make it work.
This gist contains a few exmaples of how to export your VSI data. In particular, 12 months of enterprise summary data. You can export to either a CSV file or a JSON file allowing you to then import the data into any analytics tool you choose.
This is a RESTful API call, so you need to create a script that can make an HTTP POST request to https://vsi5.visualstorageintelligence.com/api/export/v1/enterprise_summary_12_months
. The payload you post should be in JSON format and should contain the following key value pairs:
output_format: "csv" or "json" request_user: the email address you use to login to VSI request_password: the password you use to login to VSI
This REST api call allows you to export your company's business unit forecast by data center. You need to send an HTTP POST to https://vsi5.visualstorageintelligence.com/api/export/v1/get_bu_forecasting
along with the folloing parameters in JSON format:
export_format : "json" or "csv" request_date : formatted as mm-dd-yyyy such as 11-04-2022 request_user : the email address you use to login to VSI request_password : the password you use to login to VSI
In this gist, we have a curl script, a PowerShell script, and a Python 3 script to help with automated retrieval.
import http.client | |
import json | |
conn = http.client.HTTPSConnection("vsi5.visualstorageintelligence.com") | |
payload = json.dumps({ | |
"export_format": "json", | |
"request_date": "10-31-2022", | |
"request_user": "your email here", | |
"request_password": "your password here" | |
}) |
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]" | |
$headers.Add("Content-Type", "application/json") | |
$body = "{ | |
`n `"export_format`": `"json`", | |
`n `"request_date`": `"10-31-2022`", | |
`n `"request_user`": `"your email address here`", | |
`n `"request_password`": `"your password here`" | |
`n}" |
curl --location --request POST 'https://vsi5.visualstorageintelligence.com/api/export/v1/enterprise_summary' \ | |
--header 'Content-Type: application/json' \ | |
--data-raw '{ | |
"export_format": "json", | |
"request_date": "10-31-2022", | |
"request_user": "your email here", | |
"request_password": "your password here" | |
}' |
NOTE: There is now an official way to do this in WSL 2, use it if possible - see MS post here
This guide will enable systemd
to run as normal under WSL 2. This will enable services like microk8s
, docker
and many more to just work
during a WSL session. Note: this was tested on Windows 10 Build 2004, running Ubuntu 20.04 LTS in WSL 2.
-
To enable
systemd
under WSL we require a tool calledsystemd-genie
-
Copy the contents of
install-sg.sh
to a new file/tmp/install-sg.sh
: