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
<# | |
Default git color settings ("red", "green") for powershell are too dim to read easily. Rather than finagle the window colors (which | |
probably interferes with other Windows tools (PSCX, PowerTab) that assume certain color settings), we change the colors in git. | |
#> | |
git config --global color.status.added "bold green" | |
git config --global color.status.untracked "bold red" | |
git config --global color.status.nobranch "bold red red" # Bright red on dim red | |
# Could also just use the following if you don't want to mess around with color at all: |
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
# Update the following two variables to modify the window title more-or-less permanently. Otherwise, your attempt to | |
# update the window title will be immediately wiped out by this prompt function. | |
# Update these variables from other functions like this: Set-Variable -Name PROMPT_TITLE_PREFIX -Value $title -Scope Global | |
$PROMPT_TITLE_PREFIX = "" | |
$PROMPT_TITLE_SUFFIX = "" | |
<# | |
.SYNOPSIS | |
Returns true iff current PowerShell session is running with elevated privileges (i.e., "As Administrator"). | |
.NOTES |
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 a handle to the directory. (This won't be a string, but a filesystem object, so you can do it however you need to.) | |
# ('gi' is Get-Item) | |
$dirToPush = gi work\Sunrise\DischargeDisposition\Defect\4960223-2nd-tab-bool-set-activity-not-completed | |
# Get the full path WITHOUT the drive specifier (i.e., rip off the "C:" part) | |
$dirToPushNoq = $dirToPush.FullName | split-path -noq | |
# Start a new PowerShell session (default idle timeout for these things is 2 hours, apparently) | |
# ('nsn' is New-PSSession) | |
$vm = nsn NedDevSrvJ6L |
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> |
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
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
<# | |
.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
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
/// <list type="bullet"> | |
/// <item><description> | |
/// blah blah blah | |
/// </description></item> | |
/// </list> | |
// See https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/xmldoc/list |