Skip to content

Instantly share code, notes, and snippets.

View glennblock's full-sized avatar

Glenn Block glennblock

View GitHub Profile
const Authz = require('auth0-ext-compilers/lib/authorization');
const Factory = require('auth0-ext-compilers/lib/compilers/compilerFactory');
const Generic = require('auth0-ext-compilers').generic;
module.exports = Factory.createCompiler(zeroCRMHandler);
function zeroCRMHandler(func, ctx, cb) {
Authz.is_authorized(ctx, err => {
if (err) return cb(err);
func.secrets = ctx.secrets;
var express = require('express');
var fromExpress = require('webtask-tools').fromExpress;
var bodyParser = require('body-parser');
var nexmo = require('nexmo');
var app = express();
app.use(bodyParser.urlencoded({ extended: true }));
app.post('/send', (req,res) => {
var ctx = req.webtaskContext;
Build FAILED.
"/Users/glennblock/src/graphql-dotnet/src/GraphQL.sln" (default target) (1) ->
"/Users/glennblock/src/graphql-dotnet/src/GraphQL.GraphiQL/GraphQL.GraphiQL.csproj.metaproj" (default target) (2) ->
"/Users/glennblock/src/graphql-dotnet/src/GraphQL.GraphiQL/GraphQL.GraphiQL.csproj" (default target) (4) ->
(ResolveAssemblyReferences target) ->
/Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2001,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "GraphQL.StarWars". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/Users/glennblock/src/graphql-dotnet/src/GraphQL.GraphiQL/GraphQL.GraphiQL.csproj]
/Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets(2001,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "System.Web.Entity". Ch
gbmac:src glennblock$ msbuild
Microsoft (R) Build Engine version 15.2.0.0 (xplat-2017-02/c2edfeb Thu May 18 13:58:03 EDT 2017)
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 8/5/2017 10:57:13 PM.
Project "/Users/glennblock/src/graphql-dotnet/src/GraphQL.sln" on node 1 (default targets).
ValidateSolutionConfiguration:
Building solution configuration "Debug|Any CPU".
Project "/Users/glennblock/src/graphql-dotnet/src/GraphQL.sln" (1) is building "/Users/glennblock/src/graphql-dotnet/src/GraphQL.GraphiQL/GraphQL.GraphiQL.csproj.metaproj" (2) on node 1 (default targets).
Project "/Users/glennblock/src/graphql-dotnet/src/GraphQL.GraphiQL/GraphQL.GraphiQL.csproj.metaproj" (2) is building "/Users/glennblock/src/graphql-dotnet/src/GraphQL/GraphQL.csproj" (3) on node 1 (default targets).

The Year of Living Serverlessly

In this workshop you'll cut the server ties that bind you and learn how to start living on the edge, Serverlessly. You'll get a deep dive into building Serverless applications powered by Webtask and Auth0 Extend. Your cup will be full by the end and you'll never look at servers the same way again!

Note: Bring your laptops, this WILL be hands on!

Pre-reqs

  • Node installed
{ type: 'notification_event',
app_id: '6543b80da436916e2d7fb2a94b5cd014b92f6b86',
data:
{ type: 'notification_event_data',
item:
{ type: 'conversation',
id: '4907116390',
created_at: 1495435113,
updated_at: 1495436298,
user:
module.exports = function(context, cb) {
var slack = require("slack-notify")(context.secrets.SLACK_URL);
var htmlToText = require("html-to-text");
var body = context.body;
var util = require('util');
if(body !== null && body.data !== null && body.data.item !== null) {
var item = body.data.item;
if (isAuth0ExtendMessage(item, context.secrets.SUBJECT)) {
@glennblock
glennblock / start.csx
Last active April 18, 2017 04:31
scriptcs sqlite extension test
using System.Data.SQLite;
public class SpatialScript
{
DatabaseAdministrationClass _DatabaseAdministration = null;
public DatabaseAdministrationClass DatabaseAdministration
{
get
{
return _DatabaseAdministration == null ? new DatabaseAdministrationClass() : _DatabaseAdministration;
@glennblock
glennblock / scriptcs-vscode-debugging.md
Last active January 19, 2021 17:51
Debugging with scriptcs in VS Code

scripts debugging in VS Code!

Pre-requisites

  1. Install latest mono here (don't use brew) http://www.mono-project.com/docs/getting-started/install/mac/
  2. Clone the dev branch of scriptcs or download from here
  3. Run brew_build.sh in the scriptcs folder this will build the scriptcs binaries into scriptcs\artifacts
  4. Install Visual Studio Code.
  5. Open VS code and install the Mono Debug extension.

Debugging

@glennblock
glennblock / simpletask.js
Last active May 15, 2017 17:09
simple-json-webtask
// You can require 1000+ Node.js modules here. Search the full list here: https://tehsis.github.io/webtaskio-canirequire/
var request = require('request');
module.exports = function(ctx, cb) {
// Call to forismatic's API to get a random quote
request.get(
{
uri:'http://api.forismatic.com/api/1.0/?method=getQuote&lang=en&format=json',
json: true
}, (err,resp, body) => {