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 gist:631b89efb66213b97b26c8463c71c02c
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"siteName": {
"type": "string",
"metadata": {
"description": "The name of the web app that you wish to create."
}
},
View render.js
var render = function (encoding) {
return function (page, req, res) {
if (encoding && !req.acceptsEncodings(encoding)) {
return false;
}
var content = getContent(page, encoding);
if (content) {
res.set('Content-Encoding', encoding);
res.set('Content-Type', 'text/html');
res.end(content, encoding ? 'binary' : null);
View watch.js
var gulp = require('gulp');
gulp.task('watch', function() {
gulp.watch('source/scss/**', ['styles']);
gulp.watch('source/js/**', ['scripts']);
gulp.watch('source/images/**', ['images']);
gulp.watch('source/templates/**', ['html']);
gulp.watch('source/data/**', ['html']);
gulp.watch('source/webconfigs/**/*', ['webconfigs']);
gulp.watch('deploy/*.html', ['a11y']);
View images.js
var gulp = require('gulp'),
newer = require('gulp-newer'),
imagemin = require('gulp-imagemin'),
notify = require('gulp-notify'),
webp = require('gulp-webp');
gulp.task('images', function() {
var source = './source/images',
destination = './deploy/i';
View html.js
var gulp = require('gulp'),
htmlmin = require('gulp-htmlmin'),
rename = require('gulp-rename'),
notify = require('gulp-notify'),
mustache = require('gulp-mustache'),
mustache_vars = require('../../source/data/mustache_vars.json');
gulp.task('html', function() {
var source = './source/templates/*.mustache',
destination = './deploy',
View scripts.js
var gulp = require('gulp'),
path = require('path'),
folder = require('gulp-folders'),
gulpIf = require('gulp-if'),
insert = require('gulp-insert'),
concat = require('gulp-concat'),
uglify = require('gulp-uglify'),
notify = require('gulp-notify'),
rename = require('gulp-rename'),
source_folder = 'source/js',
View undesirable.css
* {
margin-top: 0;
margin-bottom: 0;
box-sizing: border-box;
}
* + * {
margin-top: 1.375rem;
}
View desired.css
* {
margin-top: 0;
margin-bottom: 0;
box-sizing: border-box;
}
* + * {
margin-top: 22px;
margin-top: 1.375rem;
}
View sass.js
var gulp = require('gulp'),
sass = require('gulp-sass'),
autoprefixer = require('gulp-autoprefixer'),
minifycss = require('gulp-clean-css'),
notify = require('gulp-notify'),
rename = require('gulp-rename'),
csso = require('gulp-csso'),
shorthand = require('gulp-shorthand'),
uncss = require('gulp-uncss');
View update-status.ps1
$Table = Get-AzureStorageTable -Name $tableName -Context $Context
$entity = New-Object -TypeName Microsoft.WindowsAzure.Storage.Table.DynamicTableEntity -ArgumentList $partitionKey, $rowKey
$entity.Properties.Add("status", $status)
$Table.CloudTable.Execute([Microsoft.WindowsAzure.Storage.Table.TableOperation]::InsertOrMerge(($entity)))
You can’t perform that action at this time.