Skip to content

Instantly share code, notes, and snippets.

View davidwesst's full-sized avatar

David Wesst davidwesst

View GitHub Profile
@davidwesst
davidwesst / webstorage.html
Last active December 25, 2015 13:18
An example of HTML5 web storage.
<!DOCTYPE html>
<html>
<body>
<section>
<input id="theData" type="text" placeholder="Enter some text to save" />
</section>
<section>
<h1>Local Storage</h1>
<article>
<label for="localValue">Local Storage: </label>
@davidwesst
davidwesst / canvas.html
Last active December 25, 2015 13:19
Example of an HTML Canvas.
<!DOCTYPE html>
<html>
<head>
<title>HTML5 Canvas Game</title>
<script type="text/javascript" src="canvas.js" ></script>
</head>
<body>
<h2>Left/Right to Move. Space to Jump.</h2>
<canvas id="canvas" width="640" height="320" >
Your browser doesn't seem to support the canvas tag...
@davidwesst
davidwesst / idefree
Last active August 29, 2015 14:21
Script to connect and start up a VM in Windows Azure
## IDE Free, presentation demos
This gist contains sample scripts of the terminal demos used throughout the presentation.
@davidwesst
davidwesst / 5reasons
Created June 4, 2015 15:20
5 Reasons - Demo
## 5 Reasons Why Your Website Is[n't] a Native App
These scripts are the commands used for the presentation demonstration
@davidwesst
davidwesst / conemu.base.xml
Last active April 18, 2017 05:38
Inspired by MisterJames, I have created my own good morning script.
<?xml version="1.0" encoding="utf-8"?>
<key name="Software">
<key name="ConEmu">
<key name=".Vanilla" modified="2017-04-17 23:40:13" build="170118">
<value name="StartType" type="hex" data="02"/>
<value name="CmdLine" type="string" data=""/>
<value name="StartTasksFile" type="string" data=""/>
<value name="StartTasksName" type="string" data="{Shells::PowerShell}"/>
<value name="StartFarFolders" type="hex" data="00"/>
<value name="StartFarEditors" type="hex" data="00"/>
<# Create PS Profile #>
New-Item -Path $Profile -Type File -Force
<# Install Chocolatey #>
iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex
<#
Utilities
- FileZilla
- PuTTY Tools
@davidwesst
davidwesst / gist:c6d8b292d71fe3cdc2919e218b9dcc84
Created September 18, 2021 16:45
Which spacing on a chained method call looks better?
// one line
serviceClientMock.Setup(scm => scm.CreateBlobContainer(It.IsAny<string>(), PublicAccessType.Blob, Mock.Of<IDictionary<string, string>>(), CancellationToken.None)).Returns((string s) => Azure.Response.FromValue<BlobContainerClient>(GenerateBlobContainerClient(s).Object, Mock.Of<Azure.Response>()));
// one line per method
serviceClientMock
.Setup(scm => scm.CreateBlobContainer(It.IsAny<string>(), PublicAccessType.Blob, Mock.Of<IDictionary<string, string>>(), CancellationToken.None))
.Returns((string s) => Azure.Response.FromValue<BlobContainerClient>(GenerateBlobContainerClient(s).Object, Mock.Of<Azure.Response>()));
// one line per parameter
serviceClientMock.Setup(scm => scm.CreateBlobContainer(