Skip to content

Instantly share code, notes, and snippets.

Alex Lindgren alindgren

Block or report user

Report or block alindgren

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 index.js
let AWS = require('aws-sdk');
let sqs = new AWS.SQS();
let Airtable = require('airtable');
let base = new Airtable({apiKey: 'keyql7soeJgu7cdsP'}).base('appJdKhgVuGZUv0va');
exports.handler = (event, context, callback) => {
sqs.receiveMessage({
QueueUrl: 'https://sqs.us-west-2.amazonaws.com/852229429830/FundraiseDonations',
AttributeNames: ['All'],
@alindgren
alindgren / deploy.cmd
Created Dec 18, 2017
Azure AppService deployment node-based build script
View deploy.cmd
@if "%SCM_TRACE_LEVEL%" NEQ "4" @echo off
:: ----------------------
:: KUDU Deployment Script
:: Version: 1.0.15
:: ----------------------
:: Prerequisites
:: -------------
View keybase.md

Keybase proof

I hereby claim:

  • I am alindgren on github.
  • I am alexlindgren (https://keybase.io/alexlindgren) on keybase.
  • I have a public key ASCMYchBaTK5BH0ThZ1oyXJKXS7NAKQg3eDu-1INPjqVFQo

To claim this, I am signing this object:

@alindgren
alindgren / BotController.cs
Created Mar 9, 2017
Bot Framework example 5
View BotController.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using Microsoft.Bot.Connector;
using System.Threading.Tasks;
namespace BotDemo.Controllers
@alindgren
alindgren / BotController.cs
Created Mar 9, 2017
Bot Framework example 4
View BotController.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using Microsoft.Bot.Connector;
using System.Threading.Tasks;
namespace BotDemo.Controllers
@alindgren
alindgren / BotController.cs
Created Mar 9, 2017
Bot Framework example 3
View BotController.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using Microsoft.Bot.Connector;
using System.Threading.Tasks;
namespace BotDemo.Controllers
@alindgren
alindgren / BotController.cs
Created Mar 9, 2017
Bot Framework example 2
View BotController.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using Microsoft.Bot.Connector;
using System.Threading.Tasks;
namespace BotDemo.Controllers
@alindgren
alindgren / BotController.cs
Created Mar 9, 2017
Bot Framework example 1
View BotController.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using Microsoft.Bot.Connector;
using System.Threading.Tasks;
namespace BotDemo.Controllers
@alindgren
alindgren / Readme.md
Created Jan 17, 2017
Powershell script for grabbing Umbraco Cloud database locally
View Readme.md

Notes

Umbraco Cloud uses SQL Azure in the cloud, but for local environments it normally pulls the data down to a local SQL CE database using 'dark magic.' You can, however, pull down the Dev database and restore it to a local SQL Server install. For this, use database.ps1 PowerShell script. You may need to Set-ExecutionPolicy RemoteSigned to run the script. If you are using Windows 7, you may need to configure powershell to use .NET 4 (see http://tfl09.blogspot.com/2010/08/using-newer-versions-of-net-with.html).

In the script, set the location of the folder where you want the DB bacpac file to get saved. Once the file is saved, in SQL Server Management Studio 2014 in the Object Explorer, right click

@alindgren
alindgren / Readme.md
Created Dec 2, 2016
Canonical Domain Redirect for Azure App Service deployment slots
View Readme.md

I often create a canonical host name URL Rewrite rule for a production site so that requests redirect to a single domain -- for example from alexlindgren.com to www.alexlindgren.com. For sites hosted with Azure App Service using deployment slots, we only want the production slot to redirect, otherwise going to the staging slot will redirect you to production since each slot uses uses the same web.config. To handle this, one can just add the non production domains to the conditions as seen in this gist.

You can’t perform that action at this time.