Skip to content

Instantly share code, notes, and snippets.

Anatoly Mironov mirontoli

Block or report user

Report or block mirontoli

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View azure-cli-commands.ps1
#INstall update
Invoke-WebRequest -Uri https://aka.ms/installazurecliwindows -OutFile .\AzureCLI.msi; Start-Process msiexec.exe -Wait -ArgumentList '/I AzureCLI.msi /quiet'
az login
az account set --subscription mirontoli-msdn
az account get-access-token --resource-type ms-graph
View nvm-spfx.sh
nvm use 12
npm list -g --depth 0
npm i -g gulp yo @microsoft/generator-sharepoint
yo @microsoft/sharepoint
View tensorflow-azure-function.ps1
#https://docs.microsoft.com/en-us/azure/azure-functions/functions-machine-learning-tensorflow
git clone https://github.com/Azure-Samples/functions-python-tensorflow-tutorial.git
cd functions-python-tensorflow-tutorial
cd start
#windows -3.6
py -3.7 -m venv .venv
#don't forget to activate it every time you start the project
.venv\scripts\activate
#deactivate
python --version #3.8.1
View o365-lab.ps1
Install-Module MSOnline -Scope CurrentUser
Connect-MsolService
Get-MsolUser
Get-MsolUser -All | Where-Object { $_.isLicensed -eq $true}
Get-MsolUser -All -UnlicensedUsersOnly
$user = Get-MsolUser | Where-Object { $_.UserPrincipalName.StartsWith("EmilyB") }
$status = $user.Licenses[0].ServiceStatus
$status | Where-Object { $_.ServicePlan.ServiceName -eq "TEAMS1" }
$licensedUsers = Get-MsolUser -All | Where-Object {$_.isLicensed -eq $true }
$usersWithoutTeams = $licensedUsers `
View members-private-channels.http
PATH https://graph.microsoft.com/v1.0/teams/{id}
Content-type: application/json
{
"memberSettings": {
"allowCreatePrivateChannels": false
}
}
View secure-secret-parse-schema.json
{
"properties": {
"value": {
"type": "string"
}
},
"type": "object"
}
View binding-filter-function.json
{
"bindings": [
{
"authLevel": "anonymous",
"type": "httpTrigger",
"direction": "in",
"name": "req",
"methods": ["options", "get"]
},
{
View minecraft-makecode-hello-world.js
player.onChat("panda", function () {
for (let index = 0; index < 100; index++) {
mobs.spawn(AnimalMob.Panda, positions.create(0, 10, 0))
}
})
player.onChat("sik", function () {
player.teleport(positions.create(0, 10, 0))
})
player.onItemInteracted(Item.IronShovel, function () {
blocks.place(Block.NoteBlock, positions.create(2, 0, 0))
View machine-learning-001-svc.py
# make predictions
from pandas import read_csv
from sklearn.model_selection import train_test_split
from sklearn.metrics import classification_report
from sklearn.metrics import confusion_matrix
from sklearn.metrics import accuracy_score
from sklearn.svm import SVC
# Load dataset
url = "https://raw.githubusercontent.com/jbrownlee/Datasets/master/iris.csv"
names = ['sepal-length', 'sepal-width', 'petal-length', 'petal-width', 'class']
View get-secret.js
try {
var xhr = new XMLHttpRequest();
xhr.open("GET", "/sites/DailyWork/_api/web/Lists/GetByTitle('Secrets')/Items", true);
xhr.setRequestHeader("Accept","application/json;odata=nometadata");
xhr.onreadystatechange = function() {
if (xhr.readyState == 4) {
if (xhr.status == 200) {
var content = xhr.responseText;
var time = new Date().getTime();
var url = _spPageContextInfo.webServerRelativeUrl
You can’t perform that action at this time.