Skip to content

Instantly share code, notes, and snippets.


Daniel G. Taylor danielgtaylor

  • iStreamPlanet
  • Seattle, WA
View GitHub Profile
danielgtaylor / example.apib
Created Nov 5, 2015
API Blueprint error attributes example for Aglio
View example.apib
# Example API
This is an example showing error information like Stripe does.
## Errors
Errors returned by this API take the following format:
danielgtaylor / gist:0b60c2ed1f069f118562
Last active Oct 22, 2021
Moving to ES6 from CoffeeScript
View gist:0b60c2ed1f069f118562

Moving to ES6 from CoffeeScript

I fell in love with CoffeeScript a couple of years ago. Javascript has always seemed something of an interesting curiosity to me and I was happy to see the meteoric rise of Node.js, but coming from a background of Python I really preferred a cleaner syntax.

In any fast moving community it is inevitable that things will change, and so today we see a big shift toward ES6, the new version of Javascript. It incorporates a handful of the nicer features from CoffeeScript and is usable today through tools like Babel. Here are some of my thoughts and issues on moving away from CoffeeScript in favor of ES6.

While reading I suggest keeping open a tab to Babel's learning ES6 page. The examples there are great.


Holy punctuation, Batman! Say goodbye to your whitespace and hello to parenthesis, curly braces, and semicolons again. Even with the advanced ES6 syntax you'll find yourself writing a lot more punctuatio

danielgtaylor /
Created Mar 10, 2015
Credential Resolver Proposal
def create_credential_resolver(session):
"""Create a default credential resolver.
This creates a pre-configured credential resolver
that includes the default lookup chain for
profile_name = session.get_config_variable('profile') or 'default'
credential_file = session.get_config_variable('credentials_file')
View git diff
diff --git a/tests/unit/resources/ b/tests/unit/resources/
index 544ee61..2ef49c3 100644
--- a/tests/unit/resources/
+++ b/tests/unit/resources/
@@ -41,7 +41,7 @@ class TestResourceFactory(BaseTestCase):
- 'Class was not loaded from definition')
+ 'Class was not loaded from definition')
danielgtaylor / example.html
Last active May 17, 2019 Example
View example.html
<div class="profile">
<img src="/images/profile.jpg"/>
<h1>John Smith</h1>
Writer &amp; Reviewer<br/>Registered 1 Jan 2013
<div class="userbadges" data-service="demo" data-user="jsmith"></div>
danielgtaylor / 01-recipe.js
Last active Dec 17, 2015
Brauhaus.js examples
View 01-recipe.js
// Create a new recipe
var recipe = new Brauhaus.Recipe({
name: 'Daniel\'s Doppelbock',
description: '...',
author: 'Daniel G. Taylor'
batchSize: 20.0,
boilSize: 10.0
danielgtaylor / index.html
Created May 13, 2013
Brauhaus.js getting started in the web browser
View index.html
<title>Brauhaus.js Test</title>
Let's make some beer!
<script type="text/javascript" src="/scripts/brauhaus.min.js"></script>
<script type="text/javascript">
danielgtaylor /
Created May 1, 2013
Brauhaus.js mashing example
Brauhaus = require 'brauhaus'
# Create a new recipe
recipe = new Brauhaus.Recipe
name: 'My new recipe'
batchSize: 20.0
# Add some grain to be mashed
recipe.add 'fermentable',
name: 'Pale malt'
danielgtaylor / gist:5065626
Last active Dec 14, 2015
Calculating gravities, color, IBU, alcohol by volume, and calories for a beer recipe.
View gist:5065626
<script type="text/javascript" src="/scripts/brauhaus.min.js"></script>
<script type="text/javascript">
// Create a recipe
var r = new Brauhaus.Recipe({
name: 'My test brew',
description: 'A new test beer using Brauhaus.js!',
batchSize: 20.0,
boilSize: 10.0
danielgtaylor / gist:3955072
Created Oct 25, 2012
Example httpie call for API
View gist:3955072
$ http limit==1 order==LIKES
HTTP/1.1 200 OK
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Date: Tue, 30 Oct 2012 18:34:17 GMT
ETag: "8xJp6-t04hAv0QlZ8diuygX5EF8/R4Slr4GR8josHmd2u6O0ZhjkW6g"
Expires: Fri, 01 Jan 1990 00:00:00 GMT
Pragma: no-cache
Server: GSE
Transfer-Encoding: chunked