Skip to content

Instantly share code, notes, and snippets.

View ChristopherThorpe's full-sized avatar

Christopher Thorpe ChristopherThorpe

View GitHub Profile
@ChristopherThorpe
ChristopherThorpe / nestedmaplookup.go
Created October 31, 2018 05:40
Nested Map Lookup: find elements in golang maps of arbitrary depth
// NestedMapLookup implementation and usage example
// Run it at https://play.golang.org/p/VHRgMcLf0b1
//
// JSON is not required, but used to show the example in a "real" setting.
//
// This gist is copyright (c) 2018 Brightgate Inc.
// and licensed under the Creative Commons Attribution 4.0 International license
// https://creativecommons.org/licenses/by/4.0/legalcode
//

Keybase proof

I hereby claim:

  • I am christopherthorpe on github.
  • I am christhorpe (https://keybase.io/christhorpe) on keybase.
  • I have a public key ASAAzHwTRG4qPbOCcUXvrOdrTUl9KhOnja9QDrXshYX9wgo

To claim this, I am signing this object:

@ChristopherThorpe
ChristopherThorpe / twilio-pbx-fn.js
Created June 13, 2017 00:17
Twilio simple PBX function
exports.handler = function(context, event, callback) {
const moment = require('moment');
//// Useful for debugging
//const util = require('util');
//console.log(util.inspect(context.getTwilioClient()));
//console.log(util.inspect(event));
// be sure to update numDigits below to match, or delete it for variable length
let phoneBook = {
@ChristopherThorpe
ChristopherThorpe / I18n devise es
Created October 2, 2011 06:00 — forked from ianmurrays/I18n devise es
devise I18n file in spanish
es:
errors:
messages:
not_found: 'no encontrado'
already_confirmed: 'ya ha sido confirmada'
not_locked: 'no está bloqueada'
expired: "ha caducado, por favor pida uno nuevo"
not_saved:
one: "1 error evitó guardar este %{resource}:"
other: "%{count} errores evitaron guardar este %{resource}:"