This file contains 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
function copyToClipboard( text ){ | |
var copyDiv = document.createElement('div'); | |
copyDiv.contentEditable = true; | |
document.body.appendChild(copyDiv); | |
copyDiv.innerHTML = text; | |
copyDiv.unselectable = "off"; | |
copyDiv.focus(); | |
document.execCommand('SelectAll'); | |
document.execCommand("Copy", false, null); | |
document.body.removeChild(copyDiv); |
This file contains 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
$ErrorActionPreference = "Stop" | |
$notificationTitle = "Notification: " + [DateTime]::Now.ToShortTimeString() | |
[Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] > $null | |
$template = [Windows.UI.Notifications.ToastNotificationManager]::GetTemplateContent([Windows.UI.Notifications.ToastTemplateType]::ToastText01) | |
#Convert to .NET type for XML manipuration | |
$toastXml = [xml] $template.GetXml() | |
$toastXml.GetElementsByTagName("text").AppendChild($toastXml.CreateTextNode($notificationTitle)) > $null |
This file contains 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
function Get-KeyPropertyValue($key, $property) | |
{ | |
if($key.Property -contains $property) | |
{ | |
Get-ItemProperty $key.PSPath -name $property | select -expand $property | |
} | |
} | |
function Get-VersionName($key) | |
{ |
This file contains 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
[ | |
"alert", | |
"arrow-down", | |
"arrow-left", | |
"arrow-right", | |
"arrow-small-down", | |
"arrow-small-left", | |
"arrow-small-right", | |
"arrow-small-up", | |
"arrow-up", |
This file contains 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
Param( | |
$solrVersion = "6.6.2", | |
$installFolder = "c:\solr", | |
$solrPort = "8983", | |
$solrHost = "solr", | |
$solrSSL = $true, | |
$nssmVersion = "2.24", | |
$JREVersion = "1.8.0_151" | |
) |
This file contains 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
function Resolve-MsBuild { | |
$msb2017 = Resolve-Path "${env:ProgramFiles(x86)}\Microsoft Visual Studio\*\*\MSBuild\*\bin\msbuild.exe" -ErrorAction SilentlyContinue | |
if($msb2017) { | |
Write-Host "Found MSBuild 2017 (or later)." | |
Write-Host $msb2017 | |
return $msb2017 | Select-Object -First 1 | |
} | |
$msBuild2015 = "${env:ProgramFiles(x86)}\MSBuild\14.0\bin\msbuild.exe" |
This file contains 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
########## | |
# Tweaked Win10 Initial Setup Script | |
# Primary Author: Disassembler <[email protected]> | |
# Modified by: alirobe <[email protected]> based on my personal preferences. | |
# Version: 2.20.2, 2018-09-14 | |
# Primary Author Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script | |
# Tweaked Source: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1/ | |
# Tweak difference: | |
# | |
# @alirobe's version is a subset focused on safely disabling telemetry, some 'smart' features and 3rd party bloat ... |
This file contains 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
function exportSpreadsheet() { | |
//All requests must include id in the path and a format parameter | |
//https://docs.google.com/spreadsheets/d/{SpreadsheetId}/export | |
//FORMATS WITH NO ADDITIONAL OPTIONS | |
//format=xlsx //excel | |
//format=ods //Open Document Spreadsheet | |
//format=zip //html zipped | |
This file contains 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
# This is a super **SIMPLE** example of how to create a very basic powershell webserver | |
# 2019-05-18 UPDATE — Created by me and and evalued by @jakobii and the comunity. | |
# Http Server | |
$http = [System.Net.HttpListener]::new() | |
# Hostname and port to listen on | |
$http.Prefixes.Add("http://localhost:8080/") | |
# Start the Http Server |
This file contains 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
using System; | |
using System.Threading; | |
static class Program { | |
static void Main() { | |
Console.Write("Performing some task... "); | |
using (var progress = new ProgressBar()) { | |
for (int i = 0; i <= 100; i++) { | |
progress.Report((double) i / 100); |
OlderNewer