Invoke-WebRequest https://github.com/kubernetes/minikube/releases/download/v0.25.0/minikube-windows-amd64 -UseBasicParsing -Outfile c:\wip\minikube.exe
minikube start --extra-config=apiserver.Authorization.Mode=RBAC
$ClientID = "CLIENT_ID" # Should be a ~36 hex character string; insert your info here | |
$ClientSecret = "CLIENT_PASSWORD" # Should be a ~44 character string; insert your info here | |
$tenantdomain = "DOMAIN.onmicrosoft.com" # For example, contoso.onmicrosoft.com | |
$loginURL = "https://login.microsoft.com" | |
$resource = "https://graph.microsoft.com" | |
$body = @{grant_type="client_credentials";resource=$resource;client_id=$ClientID;client_secret=$ClientSecret} | |
$oauth = Invoke-RestMethod -Method Post -Uri $loginURL/$tenantdomain/oauth2/token?api-version=1.0 -Body $body |
function Get-Token($apikey) { | |
$user = "APIKEY" | |
$pass = $apikey | |
$pair = "${user}:${pass}" | |
$bytes = [System.Text.Encoding]::ASCII.GetBytes($pair) | |
$base64 = [System.Convert]::ToBase64String($bytes) | |
$basicAuthValue = "Basic $base64" | |
$headers = @{ Authorization = $basicAuthValue } | |
$body = @{ grant_type = "client_credentials"; scope = "auto" } |
Function Test-Function { | |
param ( | |
[ValidateSet('test','test1')][string]$a, | |
[ValidateSet('test','test2')][string]$b | |
) | |
if ($a) { Write-Host "a was set to $($a)" } | |
if ($b) { Write-Host "b was set to $($b)" } | |
} |
Moved this over to https://github.com/rayterrill/PowerCLIExtraFunctions |
var express = require('express'); | |
var mongoose = require('mongoose'); | |
var ObjectId = require('mongoose').Types.ObjectId; | |
var fs = require('fs-extra'); | |
var url = 'mongodb://username:password@server/mydb'; | |
var multer = require('multer'); | |
var upload = multer({limits: {fileSize: 1064960 },dest:'/uploads/'}).single('picture'); | |
var app = express(); | |
#requires https://github.com/darkoperator/Posh-SSH | |
function Get-VSANResyncStatus { | |
param( | |
[string]$esx_server, | |
[String]$esx_username, | |
[String]$esx_password | |
) | |
$secpasswd = ConvertTo-SecureString $esx_password -AsPlainText -Force |
import React, { Component } from 'react';
import { AppRegistry, StyleSheet, Text, View, Image } from 'react-native';
import { getStatusBarHeight } from 'react-native-status-bar-height';
export default class LotsOfStyles extends Component {
render() {
return (
More info: https://github.com/AzureAD/passport-azure-ad
git clone https://github.com/AzureADQuickStarts/AppModelv2-WebApp-OpenIDConnect-nodejs.git