Skip to content

Instantly share code, notes, and snippets.

👋
he/him/his

Aaron Gustafson aarongustafson

👋
he/him/his
Block or report user

Report or block aarongustafson

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View deplyment.ps1
$deploy = New-AzureRmResourceGroupDeployment -ResourceGroupName $(Get-ResourceGroupName) `
-TemplateFile $TemplateFile `
-TemplateParameterObject $parameters
View deployment-template.ps1
$TemplateFile = Join-Path (pwd) "templates/deployment.json"
$parameters = @{
"hostingPlanName" = "${siteName}-hostPlan";
"repo" = $repo;
"siteName" = $siteName;
"python" = $python;
}
View deploy.ps1
$Table = Get-AzureStorageTable -Name $tableName -Context $Context
$query = New-Object Microsoft.WindowsAzure.Storage.Table.TableQuery
$query.FilterString = "status eq '${status}'"
$entities = $Table.CloudTable.ExecuteQuery($query)
View web.config
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="false" targetFramework="4.0" />
</system.web>
<system.webServer>
<urlCompression doStaticCompression="true" doDynamicCompression="true" dynamicCompressionBeforeCache="false" />
<!-- add a mime type for br, otherwise we get 404 -->
<staticContent>
View sw-vs-ss.js
// Caching fallback from ServiceWorker to sessionStorage
function setCacheItem(){}
function getCacheItem(){ return undefined; }
if ( ! ( 'serviceWorker' in window.navigator ) )
{
var cache = window.sessionStorage;
setCacheItem = function( key, text ) {
return cache.setItem( key, text );
};
getCacheItem = function( key ) {
View cache-key.js
// Cache Key
const VERSION = '{{BUILD_TIME}}';
View fetch.js
function fetchRequest( req, options )
{
return fetch( req, options ).then(res => {
if ( res.ok || res.type === 'opaque' )
{
const clone = res.clone();
openCacheFor(req).then(cache => {
return cache.put(req, clone);
});
}
View count-color.css
@keyframes count-issue {
0% {
background-color: #f5baba;
}
100% {
background-color: #fff;
}
}
@keyframes count-good {
0% {
View aria-live.html
<strong id="e-d" aria-live="polite" aria-atomic="true">Your description should be between 10 and 500 characters long.</strong>
You can’t perform that action at this time.