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
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
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
# 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
rem (Run Visual Studio Developer Command Prompt as admin) | |
for %f in (Infragist*.dll) do gacutil -i %f | |
rem Verify... | |
gacutil -l | find /i "infragist" | find /i "17.1" |
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
# Hash table syntax is @{ name = value; name = value; ... } -- Curly braces and semicolons | |
$map = @{ key1 = "value1"; key2 = 3.14 } | |
echo $map.key1 # "value1" | |
echo $map["key2"] # 3.14 | |
# Coerce it to a new object | |
[PSCustomObject] $map | |
# Btw, you can SELECT a "calculated property" (or synthetic property, if that's how your brain works): |
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
od -t x1 -t c 'Allscripts Visit Record.htm' | less | |
# Produces output like the following: | |
# | |
# 0000000 ef bb bf 3c 21 44 4f 43 54 59 50 45 20 48 54 4d | |
# 357 273 277 < ! D O C T Y P E H T M | |
# 0000020 4c 3e 0d 0a 3c 21 2d 2d 20 73 61 76 65 64 20 66 | |
# L > \r \n < ! - - s a v e d f | |
# 0000040 72 6f 6d 20 75 72 6c 3d 28 30 33 38 38 29 68 74 | |
# r o m u r l = ( 0 3 8 8 ) h t |
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> | |
</head> | |
<body> | |
<script>alert("hi, this is some javascript keyed in by the user");</script> | |
</body> |
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
// An experiment in making several types of objects in order to see what is the best one for use with JSON. | |
// Object types created are: | |
// - Object.create(null) - totally blank object, not even inheritance from Object (i.e., not even | |
// hasOwnProperty()). THIS IS PROBABLY THE WAY TO GO FOR MAKING JSON OBJECTS. | |
// - new Object() - inherits all base capabilities and properties | |
// - new Map() - can't be stringified to JSON | |
//----------------------------------------------------------------------------------------------------------------- | |
scribble("================ Object.create(null)"); | |
let obj = Object.create(null); |