I hereby claim:
- I am joshuap on github.
- I am joshuawood (https://keybase.io/joshuawood) on keybase.
- I have a public key whose fingerprint is D3BB F6B6 9348 B77E 21EC 8176 3B5A E18B 78E3 1A12
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
# config/initializers/redis.rb | |
require 'redis' | |
# Disables the `flushdb` and `flushall` commands. | |
class Redis | |
module DangerousCommands | |
def flushdb | |
raise 'This is EXTREMELY DANGEROUS! If you really want to EMPTY THE ENTIRE DATABASE, do it from `redis-cli`.' | |
# You could call `super` here if you want to allow access in some circumstances. | |
end |
# app/jobs/application_job.rb | |
class ApplicationJob < ActiveJob::Base | |
include HoneybadgerActiveJob | |
end |
Honeybadger.configure do |config| | |
config.before_notify do |notice| | |
# break out of our hook if component is not our errors controller | |
break if notice.component != 'errors' | |
# correct the component and action info based on the url | |
params = Rails.application.routes.recognize_path(notice.url) | |
# => {:controller=>"page", :action=>"index"} | |
notice.controller = params[:controller] | |
notice.action = params[:action] |
// Netlify function to tag subscribers in ConvertKit | |
// https://www.netlify.com/products/functions/ | |
// POST to /.netlify/functions/tag?id={subscriberId} with JSON array of tag ids: `[{tagId}, {tagId}, ...]` | |
const request = require("request-promise"); | |
const apiKey = process.env.CONVERTKIT_API_KEY; | |
const apiSecret = process.env.CONVERTKIT_API_SECRET; | |
exports.handler = function(event, context, callback) { |
package main | |
import "errors" | |
import "fmt" | |
import "github.com/honeybadger-io/honeybadger-go" | |
func notifyHoneybadger(err error) { | |
if err == nil { | |
return | |
} |
This creates a 4-part email series to welcome users who sign up for your Jumpstart app. The first email is sent immediately, and the following emails are sent 2 days apart.
This guide assumes you meet Jumpstart's requirements.
These are my notes from deploying a boilerplate Rails app to AWS Lambda (yeah, you read that right) using Lamby. Basically this is me going through the Quick Start guide.
Questions/comments: https://twitter.com/heyjoshwood
<!-- Do Not Track --> | |
<script type="text/javascript"> | |
// Global | |
window.trackingEnabled = function() { | |
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack; | |
return !(dnt === "1" || dnt === "yes"); | |
}(); | |
</script> | |
<!-- Google Tag Manager, Segment, etc. --> |
// https://github.com/honeybadger-io/honeybadger-node | |
// https://github.com/koajs/koa/blob/master/docs/guide.md | |
// https://github.com/koajs/koa/blob/master/docs/error-handling.md | |
const Honeybadger = require('honeybadger') | |
const Koa = require('koa') | |
const app = new Koa() | |
// Should probably be the first middleware you use | |
app.use(async (ctx, next) => { |