Skip to content

Instantly share code, notes, and snippets.

@alan-null
alan-null / Install-Solr.ps1
Created December 5, 2017 09:07 — forked from jermdavis/Install-Solr.ps1
A PowerShell script to help installing Solr as a service - See https://jermdavis.wordpress.com/2017/10/30/low-effort-solr-installs/ for details
Param(
$solrVersion = "6.6.2",
$installFolder = "c:\solr",
$solrPort = "8983",
$solrHost = "solr",
$solrSSL = $true,
$nssmVersion = "2.24",
$JREVersion = "1.8.0_151"
)
@alan-null
alan-null / vs-code-icon-names.json
Created April 8, 2017 13:19 — forked from reyawn/vs-code-icon-names.json
Visual Studio Code icon names for shortcuts
[
"alert",
"arrow-down",
"arrow-left",
"arrow-right",
"arrow-small-down",
"arrow-small-left",
"arrow-small-right",
"arrow-small-up",
"arrow-up",
@alan-null
alan-null / UnicornDependencyGraphGenerator.ps1
Last active January 29, 2023 13:39
Generate unicorn dependency graph using PowerShell. Analyse and improve your configurations or easily fix existing issues
function Get-ComputedDependencyGraphUrl {
[CmdletBinding()]
param(
[Parameter(Mandatory=$true, Position=0 )]
[Hashtable]$allDependenciesClean
)
begin {
Write-Verbose "Cmdlet Get-ComputedDependencyGraphUrl - Begin"
}
@alan-null
alan-null / README.md
Created January 8, 2017 10:29
AutoHotkey scripts

What is AutoHotkey?

AutoHotkey (AHK) is a free, open-source macro-creation and automation software for Windows that allows users to automate repetitive tasks. It is driven by a scripting language that was initially aimed at providing keyboard shortcuts, otherwise known as hotkeys, that over time evolved into a full-fledged scripting language

Feedly - mark as read

This script allows you to mark as read and hide articles that might not be interesting.

Decision is made based on the engagement value of each entry.

How it works

Once you run the script you wil be asked to provide two values:

  • minimum engagement - value of the engagement that allows to make a decision whether article should be dismissed or not.
function Get-KeyPropertyValue($key, $property)
{
if($key.Property -contains $property)
{
Get-ItemProperty $key.PSPath -name $property | select -expand $property
}
}
function Get-VersionName($key)
{
@alan-null
alan-null / ToastNotification_Windows10.ps1
Created October 13, 2016 10:50 — forked from altrive/ToastNotification_Windows10.ps1
Windows 10 toast notification sample
$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
@alan-null
alan-null / Merge-Layout.ps1
Last active January 20, 2018 11:46
Merging Final Renderings back down into Shared Renderings
function Merge-Layout {
[CmdletBinding()]
param(
[Parameter(Mandatory = $true,Position = 0,ValueFromPipeline = $true)]
[item]$Item
)
process {
$layoutField = New-Object "Sitecore.Data.Fields.LayoutField" -ArgumentList ($Item.Fields[[Sitecore.FieldIDs]::LayoutField]);
$finalLayoutField = New-Object -TypeName "Sitecore.Data.Fields.LayoutField" -ArgumentList $Item.Fields[[Sitecore.FieldIDs]::FinalLayoutField]
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);
LWin & WheelUp::
; Previous Desktop
Send {LWin down}{Ctrl down}{Left down}{LWin up}{Ctrl up}{Left up}
return
LWin & WheelDown::
; Next Desktop
Send {LWin down}{Ctrl down}{Right down}{LWin up}{Ctrl up}{Right up}
return