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
/** | |
* Write the given message in a PRE element of the document. | |
*/ | |
function scribble(aMsg: string): void { | |
console.log(aMsg); | |
// Get a reference to the document's PRE element, or null if there isn't one. | |
var preElt = document.body.querySelector("pre"); | |
if (preElt) { | |
// Do nothing, we're good | |
// console.log("got preElt"); |
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 $E - escape | |
@rem ESC [ 7 m - reverse video | |
@rem ESC [ 0 m - normal mode | |
@rem $P - current path | |
@rem @G - greater-than sign | |
@rem $S - space | |
@prompt $E[7m$P$G$E[0m$S |
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
// ============================================================================================ | |
// Typescript is Javascript annotated with type info. | |
// "Compilation" of Typescript is (in the simple case) | |
// stripping out the type annotations. | |
var someNumber: number; | |
someNumber = 2; | |
someNumber = "bad"; // Type mismatch | |
// A slightly fancy way of telling Typescript that this variable is |
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
$wshell = New-Object -ComObject Wscript.Shell | |
$wshell.Popup("Operation Completed",0,"Done",0x1) | |
# From https://blogs.technet.microsoft.com/heyscriptingguy/2014/04/04/powertip-use-powershell-to-display-pop-up-window/ |
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); |
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
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
# 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
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" |