##The Singleton Pattern
class SantaClaus {
private static uniqueInstance : SantaClaus;
ArrayBuffer.littleEndian = new Int8Array(new Int16Array([1]).buffer)[0] > 0; | |
var arrayToNative = function(array, arrayIsLittleEndian) { | |
if (!!arrayIsLittleEndian == ArrayBuffer.littleEndian) { | |
return array; | |
} else { | |
return flipArrayEndianness(array); | |
} | |
}; |
<# | |
.SYNOPSIS | |
Converts Markdown formatted text to HTML. | |
.DESCRIPTION | |
Converts Markdown formatted text to HTML using the Github API. Output is "flavored" depending on | |
the chosen mode. The default output flavor is 'Markdown' and includes Syntax highlighting and | |
Github stylesheets. | |
Based on the Ruby version by Brett Terpstra: | |
http://brettterpstra.com/easy-command-line-github-flavored-markdown/ |
##The Singleton Pattern
class SantaClaus {
private static uniqueInstance : SantaClaus;
Set-ExecutionPolicy RemoteSigned | |
$mongoDbPath = "C:\MongoDB" | |
$mongoDbConfigPath = "$mongoDbPath\mongod.cfg" | |
$url = "http://downloads.mongodb.org/win32/mongodb-win32-x86_64-2008plus-2.4.9.zip" | |
$zipFile = "$mongoDbPath\mongo.zip" | |
$unzippedFolderContent ="$mongoDbPath\mongodb-win32-x86_64-2008plus-2.4.9" | |
if ((Test-Path -path $mongoDbPath) -eq $True) | |
{ |
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- | |
## SOURCE: xe.com | |
--> | |
<currency-symbol count="115"> | |
<entry code="ALL" unicode-decimal="76, 101, 107" unicode-hex="4c, 65, 6b">Albania Lek</entry> | |
<entry code="AFN" unicode-decimal="1547" unicode-hex="60b">Afghanistan Afghani</entry> | |
<entry code="ARS" unicode-decimal="36" unicode-hex="24">Argentina Peso</entry> | |
<entry code="AWG" unicode-decimal="402" unicode-hex="192">Aruba Guilder</entry> | |
<entry code="AUD" unicode-decimal="36" unicode-hex="24">Australia Dollar</entry> |
Let's have some command-line fun with curl, [jq][1], and the [new GitHub Search API][2].
Today we're looking for:
if (window.File && window.FileReader && window.FileList && window.Blob) { | |
// Great success! | |
function handleJSONDrop(evt) { | |
evt.stopPropagation(); | |
evt.preventDefault(); | |
var files = evt.dataTransfer.files; | |
// Loop through the FileList and read | |
for (var i = 0, f; f = files[i]; i++) { | |
// Only process json files. |
/(#([0-9a-f]{3}){1,2}|(rgba|hsla)\(\d{1,3}%?(,\s?\d{1,3}%?){2},\s?(1|0?\.\d+)\)|(rgb|hsl)\(\d{1,3}%?(,\s?\d{1,3}%?\)){2})/i |
Add-Type -AssemblyName PresentationFrameWork | |
$MainWindow=@' | |
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
Topmost="True" | |
WindowStartupLocation="CenterScreen" | |
Title="PowerSHell Summit Videos" Height="850" Width="1200"> | |
<Grid> | |
<Grid.RowDefinitions> |