javascript
18 posts · All topics
- — Safely Passing Ruby Variables to JavaScript in ERB
A user reported a bug in Slava, a bot that syncs Strava activities to Slack, where they couldn’t subscribe to the paid version because their Slack team name contained a quote. T...
- — Adding eslint and Auto-Fixing an Existing TypeScript Project
In opensearch-api-specification#260 I added eslint, but had a hard time finding a cookbook for auto-fixing specific violations. Here it is.
- — Calling a GraphQL API in Redwood.js
I recently needed to stand up a demo app that invoked an AWS AppSync GraphQL API. The existing endpoint (not available publicly) returned restaurant data for a given zip with th...
- — Asserting Existence with Mocha, Chai and TypeScript Strict Null Checks
I recently encountered a unit test that looked like this.
- — Getting Started with Typescript
I’ve done a fair amount of JavaScript, here and there, and have written some TypeScript, too. But I’ve never actually started anything in TypeScript. Attempting a basic “hello w...
- — The AlexaJS Community Organization
- — Error: No such module on process.binding
``` $ coffee app.coffee
- — EdgeConf 2013 NYC
EdgeConf 2013, an invitation-mostly conference, got perfectly illustrated in that moment where a Microsoft developer argued that the reason Windows XP and IE6 were still being u...
- — Making HTTPs Requests in Ruby & JavaScript w/ Node.js
Making HTTPs requests seems oddly difficult. Why can’t an HTTP library just figure things out for me like curl does? It mostly can.
- — Debugging 'object has no properties' in a MongoDB map/reduce
You got to love debugging JavaScript errors. Here’s one from a MongoDB map/reduce. The operation fails with this:
- — How do I get the name of an object's type in JavaScript?
I love reflection, especially the Ruby kind. JavaScript reflection, though, can exhibit interesting runtime behavior.
- — Grape API Mounted on RACK w/ Static Pages, Tests, JQuery UI, Backbone.js and Even Mongo
Expanding from my previous post on a Grape API mounted on RACK.
- — Pushing Assets to S3 w/ Rake: Versioning and Cache Expiration
A while ago I wrote about how we package and push Rails assets to Amazon S3. We version assets with the GIT hash – varying the assets by URL enables setting indefinite cache exp...
- — JQuery Konami Komando
With so many coffee breaks a day we can’t just have interns writing coffee. Introducing jQuery.konami, a new open-source plugin from @craigspaeth. You know something awesome is ...
- — Barista: Custom Preambles in CoffeeScript => JavaScript
- — Embedding API Sandboxes in Documentation
Oh, I know how much you want this!
- — Storing Server-Side JavaScript Functions w/ Mongoid + Weekly Rollup
I was working on some map/reduce that rolled up daily, weekly and yearly statistics in MongoDB and discovered, to my surprise, that JavaScript Date doesn’t have a getWeek method...
- — Improving tags map/reduce with MongoDB 1.8.x
Today we’ll improve this map/reduce implementation that produces a collection of tags with their counts. We’ll add inline map/reduce for databases that support it, inline JavaSc...
