This file contains hidden or 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
# Set the default path. | |
ppath="/c/repos" #TODO - change to your repo dir | |
# openInRepoDir() { cd $ppath ; } | |
###### Alias ##### | |
### Git; this should probably go into the .gitconfig | |
alias gs='git status -s' | |
alias cma='git commit -a -m' | |
alias cm='git commit -m' | |
alias r='git remote -v' |
This file contains hidden or 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
// http://stackoverflow.com/questions/16245767/creating-a-blob-from-a-base64-string-in-javascript, thank you Jeremy Banks | |
function createBlob(base64EncodedImage) { | |
var myString = base64EncodedImage.value.slice(0); | |
// This goes into the WordJS library. | |
var byteCharacters = window.atob(myString); | |
var byteNumbers = new Array(byteCharacters.length); | |
for (var i = 0; i < byteCharacters.length; i++) { |
This file contains hidden or 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
################################################################################ | |
# | |
# Credit to Sergey Babkins | |
# https://blogs.msdn.microsoft.com/sergey_babkins_blog/2016/12/31/how-to-pretty-print-xml-in-powershell-and-text-pipelines/ | |
function Format-Xml { | |
<# | |
.SYNOPSIS | |
Format the incoming object as the text of an XML document. | |
#> |
This file contains hidden or 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
# Copied from https://github.com/gbowerman/azure-minecraft/blob/master/azure-marketplace/minecraft-server-ubuntu/install_minecraft.sh | |
#!/bin/bash | |
# Custom Minecraft server install script for Ubuntu 15.04 | |
# $1 = Minecraft user name | |
# $2 = difficulty | |
# $3 = level-name | |
# $4 = gamemode | |
# $5 = white-list | |
# $6 = enable-command-block |
This file contains hidden or 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: Set and get values - 1 | |
description: Set and get values and formulas for a range | |
author: MIchaelMainer | |
host: EXCEL | |
api_set: {} | |
script: | |
content: | | |
$("#setup").click(setup); | |
$("#set-value").click(setValue); |
This file contains hidden or 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: Set and get values - 1 | |
description: Set and get values and formulas for a range | |
author: MIchaelMainer | |
host: EXCEL | |
api_set: {} | |
script: | |
content: | | |
$("#setup").click(setup); | |
$("#set-value").click(setValue); |
This file contains hidden or 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
$url = "https://graph.microsoft.com/beta/`$metadata" | |
$liveMetadataSavePath = "beta_2018_08_07.xml" | |
$client = new-object System.Net.WebClient | |
$client.Encoding = [System.Text.Encoding]::UTF8 | |
$client.DownloadFile($url, $liveMetadataSavePath) |
This file contains hidden or 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
# Linter will check for client secrets, and other best practices around using MSGraph. |
This file contains hidden or 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
SERVER_JAR_URL=https://launcher.mojang.com/v1/objects/4d1826eebac84847c71a77f9349cc22afd0cf0a1/server.jar | |
# adjust memory usage depending on VM size | |
totalMem=$(free -m | awk '/Mem:/ { print $2 }') | |
if [ $totalMem -lt 1024 ]; then | |
memoryAlloc=512m | |
else | |
memoryAlloc=1024m | |
fi |
This file contains hidden or 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
# Assuming the latest release always has typewriter.exe/ | |
# Get information about the GitHub releases. | |
$feedQuery = 'https://api.github.com/repos/microsoftgraph/MSGraph-SDK-Code-Generator/releases' | |
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 | |
$jsonObject = Invoke-WebRequest -Uri $feedQuery | ConvertFrom-Json | |
# GitHub release API provides the latest | |
if ($jsonObject.assets[0].name -eq 'typewriter.zip') { |
OlderNewer