Skip to content

Instantly share code, notes, and snippets.

jboner / OrderManagement.scala
Created Nov 10, 2017
Demo of an Event-driven Architecture in Akka and Scala. Show-casing Events-first DDD, Event Sourced Aggregates, Process Manager, etc.
View OrderManagement.scala
package sample.eventdriven.scala
import{Actor, ActorRef, ActorSystem, Inbox, Props}
import akka.persistence.PersistentActor
import scala.concurrent.ExecutionContext.Implicits._
import scala.concurrent.duration._
// ===============================================================
// Demo of an Event-driven Architecture in Akka and Scala.
bastman /
Created Mar 31, 2016
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see:

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

hassy /
Last active Jun 6, 2021
Deploying Parse Server on AWS (WIP)

Deploying Parse Server on AWS

Note: this is a work-in-progress and will be updated with more information over the next few days.


This guide will walk you through deploying your own instance of the open-source Parse Server. This would be a good starting point for testing your existing application to see if the functionality provided by the server is enough for your application, and to potentially plan your migration off the Parse Platform.

This guide will walk you through using Elastic Beanstalk (EB), which is an AWS service similar to Heroku. Why use EB rather than Heroku? Elastic Beanstalk does not lock you into Heroku-specific ways of doing things, is likely cheaper to run your backend on than Heroku, and it integrates with other services that AWS offer (and they offer almost everything one needs to run an application these days).


This cheat sheet originated from the forum, credits to Laurent Poulain. We copied it and changed or added a few things.

Evaluation Rules

  • Call by value: evaluates the function arguments before calling the function
  • Call by name: evaluates the function first, and then evaluates the arguments if need be
    def example = 2      // evaluated when called
    val example = 2      // evaluated immediately
Vestride /
Last active Aug 9, 2022
Encoding video for the web

Encoding Video


Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
yoavniran /
Last active Aug 6, 2022
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai, Sinon, and Jest
View gist:9919357

Pry Cheat Sheet

Command Line

  • pry -r ./config/app_init_file.rb - load your app into a pry session (look at the file loaded by
  • pry -r ./config/environment.rb - load your rails into a pry session


askmike / candleCalculator.js
Created Jun 21, 2013
Calculate trade candles for the MtGox exchange from a [sqlite trade database](
View candleCalculator.js
var mtgoxDump = './dump.sql'; // this is the database file outputted by the Trade Downloader ( )
var output = './candles-' + (+new Date()) + '.csv'; // csv file with your candles
var db = require('sqlite-wrapper')(mtgoxDump);
var moment = require('moment');
var _ = require('underscore');
var fs = require('fs');
var i = 0;