Skip to content

Instantly share code, notes, and snippets.

View motdotla's full-sized avatar
💛

mot motdotla

💛
View GitHub Profile
@p01
p01 / LICENSE.txt
Last active May 23, 2024 13:46 — forked from 140bytes/LICENSE.txt
Sudoku Solver in 140bytes
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Mathieu 'p01' Henri - http://www.p01.org/releases/
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@calvincorreli
calvincorreli / middleware.rb
Created March 19, 2013 05:31
Middleware to fix the problem with Sendgrid sending webhook POSTs with an incorrect application/json content type even though the content is actually a sequence of JSON structures separated by line breaks. Rails will try to parse the contents as a JSON document and fail. This middleware changes the content type to application/sendgrid-json, thus…
Billing::Application.configure do
config.middleware.insert_before "ActionDispatch::ParamsParser", SendgridWebhookMiddleware
end
var http = require('http');
var qs = require('querystring');
var TempoDBClient = require('tempodb').TempoDBClient;
// Settings for TempoDB as ENV VARS
var tempodb = new TempoDBClient(process.env.tempodb_api_key, process.env.tempodb_api_secret);
var now = new Date();
// Create a series based on the event type