Skip to content

Instantly share code, notes, and snippets.

View pbrdmn's full-sized avatar

Philip Boardman pbrdmn

View GitHub Profile

Engineering values

Our engineering values help us model our behavior, culture, and decision-making. They complement Doist's Core Values, guiding our approach to building and maintaining technology.

Continuous Improvement

We relentlessly pursue continuous improvement, and are adamant about regressions. We're skeptical of heroic efforts, focusing instead on steady steps towards defined goals.

We leave things better than how we found them, even if we don't own them. We frequently perform opportunistic refactors, automate, and prioritize the long term over the short term.

@gene_wood Glad you find the import functionality useful! Using the API you can also merge multiple Swagger files in a single API.
API Gateway calls Lambda functions using the public invoke endpoint. There are 2 ways to authorize a call to Lambda:
1. You can use roles in your account (what was call the invocation role). API Gateway will assume the role in your account and invoke the Lambda function. In this case your role needs to allow invocations in Lambda and have a trust relationship with apigateway.amazonaws.com that allows sts:AssumeRole
2. Using resource policies in Lambda, this is why you see the popup in the console. In this case the API Gateway console makes an AddPermission call to Lambda in the background to authorize API Gateway as a caller on your Lambda function (http://docs.aws.amazon.com/lambda/latest/dg/API_AddPermission.html)
when deploying APIs using the Swagger import you can use either method. For the first one, simply specify the invocation role ARN in the credentials field of the x-a
@aclave1
aclave1 / angularretry.js
Last active October 21, 2019 20:34
Angularjs auto retry after request failure and resolution
var app = angular.module('app', []);
app
.factory('AuthToken', [
'$http',
'$q',
'$window',
function($http, $q, $window) {
var authToken = {};
//gets the token and sets it on the windows session storage
@samknight
samknight / fuzzyregex.js
Created February 7, 2014 14:39
Fuzzy Regex match
// This will allow unordered search terms to match relevant string
// e.g. Really Long String will be matched by
// - long string
// - long really
// - all ring
// ..etc
// I have used this anonymous function to override the matcher function in select2
function(term, text) {
@74togo
74togo / rainbow.js
Last active November 28, 2018 00:20
This rainbows a page. Use a bookmarklet if you want.
(function(){var m = "@-webkit-keyframes super-rainbow { 0% { -webkit-filter:hue-rotate(1deg); } 100% { -webkit-filter:hue-rotate(360deg); } } html { -webkit-animation: super-rainbow 2s linear infinite normal }";
var styletag = document.createElement("style");
styletag.textContent = m;
document.body.appendChild(styletag);
}());
@dhavaln
dhavaln / camera.html
Created March 29, 2012 14:33
Phonegap Camera Capture Example
<!DOCTYPE html>
<html>
<head>
<title>Capture Photo</title>
<meta name="viewport" content="width=device-width,height=device-height,initial-scale=1"/>
<script type="text/javascript" charset="utf-8" src="js/phonegap.js"></script>
<script type="text/javascript" charset="utf-8">
var pictureSource; // picture source
var destinationType; // sets the format of returned value