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
# So, we're not dependent on filename sort order ("9" > "10"). | |
if (Test-Path "c:/usr/local/Java") { | |
$env:JAVA_HOME = $(ls c:/usr/local/Java | sort CreationTime -desc | select -first 1 FullName).FullName | |
} | |
else { | |
Write-Warning "No Java" | |
} | |
# TODO: could probably use a list of directories to search (e.g., @("c:/usr/local/Java", "c:/Program Files/Java")). |
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
someMethod( 12, new String[] {"aaa","bbb","ccc"}, FontType.Bold); |
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
c:\bin\sed -E /([0-9a-f][0-9a-f],)+\/d |
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
cat .\hklm-after-scm-client-but-before-reboot.reg ` | |
| % {$_ -replace '([0-9a-f][0-9a-f](,|$))+','hex-codes'} ` | |
> ..\RegistryHijinks.edited\hklm-after-scm-client-but-before-reboot.reg |
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
/// <list type="bullet"> | |
/// <item><description> | |
/// blah blah blah | |
/// </description></item> | |
/// </list> | |
// See https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/xmldoc/list |
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
In emacs lisp (emacs 25.2.1; org-mode 9.1.2): | |
(add-hook 'org-mode-hook | |
(lambda () | |
(add-hook 'after-save-hook 'org-html-export-to-html nil t) | |
)) | |
In org-mode file (having downloaded live.js from https://livejs.com): | |
#+HTML_HEAD: <script src="/live.js"></script> |
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
<# | |
.SYNOPSIS | |
Transform Sunrise Nlog output (e.g., UIShell.log) to more-readable text | |
.DESCRIPTION | |
The UIShell.log file will be found in (for example) c:/ProgramData/Allscripts Sunrise/Helios/8.4/Gateway/Log | |
#> | |
param( | |
[Parameter( Mandatory = $true)] | |
[string] |
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
get-service | ? {$_.Name -match 'allscripts|sunrise|helios' -or $_.DisplayName -match 'allscripts|sunrise|helios'} | |
<# Could maybe create a string variable w/the regexp so we don't have to type it twice. #> |
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
ls $src | ? {$_.LastWriteTime -ge (Get-Date).AddMinutes( -5)} | cp -dest $dest -for -pass |
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
#+HTML_HEAD: <style>a.footref { background-color: cyan; font-weight: bold; padding: 0.3em; }</style> |