Skip to content

Instantly share code, notes, and snippets.

mrico / campaignkit-auth0-actions.js
Created Apr 20, 2022
Email Address Validation for Auth0
View campaignkit-auth0-actions.js
const fetch = require('node-fetch');
* Validate the given email address using
const validateEmail = async (event) => {
const token = event.secrets.TOKEN;
const { user: { email } } = event;
const body = {
emails: [email],
View UserCollection.js
], function (Collection, _, Backbone, UserModel) {
'use strict';
Collection.namespace = 'users';
View changelog.rb
#!/usr/bin/env ruby
require 'rubygems'
require 'set'
require 'net/http'
require "net/https"
require 'json'
require 'pathname'
config_file = "#{ENV['HOME']}/.changelog"
View gist:1835942
15:02:51.783 [http-8080-2] INFO io.leon.unitofwork.UOWManager - Starting new unit of work for thread [Thread[http-8080-2,5,main]] with context [org.apache.catalina.connector.RequestFacade@ffce2f2].
15:02:52.032 [http-8080-2] DEBUG i.l.w.r.ExposedUrlCheckFilter - Requested exposed URL /leon/comet/connect
15:02:52.406 [http-8080-2] ERROR org.atmosphere.cpr.AtmosphereServlet - AtmosphereServlet exception
java.lang.IllegalStateException: !(Jetty || Servlet 3.0 || ContinuationFilter)
at org.eclipse.jetty.continuation.ContinuationSupport.getContinuation( ~[jetty-continuation-7.0.2.v20100331.jar:7.0.2.v20100331]
at org.atmosphere.container.Jetty7CometSupport.service( ~[atmosphere-runtime-0.7.1.jar:0.7.1]
at org.atmosphere.container.Jetty8WebSocketSupport.service( ~[atmosphere-runtime-0.7.1.jar:0.7.1]
at org.atmosphere.cpr.AtmosphereServlet.doCometSupport( [atmosphere-runtime-0.7.1.jar:0.7.1]
at or
mrico / enumfield_question.scala
Created Dec 27, 2010
Question about Record's EnumField and Enumeration types
View enumfield_question.scala
import net.liftweb._
import record._
import record.field._
object State extends State
sealed abstract class State extends Enumeration("created", "destroyed") {
type State = Value
val Created, Destroyed = Value
mrico / GridFSHelper.scala
Created Oct 29, 2010
Helper for streaming MongoDB GridFS files in lift web applications.
View GridFSHelper.scala
package code.lib
import net.liftweb._
import http._
import util._
import Helpers._
import common._
import mongodb._
import com.mongodb._
mrico / roller_wxr_exporter.scala
Created Oct 16, 2010
Basic script to import comments from a Apache Roller site to
View roller_wxr_exporter.scala
exec scala "$0" "$@"
Basic script to import comments from a Apache Roller site to
The script reads the entries and comments rss feeds from the roller website and generates a simple wxr file
that can be imported by
usage: roller_wxr_exporter.scala