Skip to content

Instantly share code, notes, and snippets.

Michael Ahlers michaelahlers

Block or report user

Report or block michaelahlers

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
michaelahlers /
Last active Jul 5, 2019
Don't escape single quotes around paths
ffmpeg -safe 0 \
-f concat -i <(ls "$IN_FILE" | while read file; do echo file '$PWD/$file'; done) \
-c copy "$OUT_FILE"
michaelahlers /
Last active Apr 4, 2019
Bulk restore-request of objects in S3.
DAYS = "10"
aws s3 ls --recursive "s3://$BUCKET_NAME/$KEY_PREFIX" |\
awk '{$1=$2=$3=""; print $0}' |\
sed 's/^[[:space:]]*//g' |\
tr '\n' '\0' |\
michaelahlers / EntityReferenceSpec.scala
Last active Nov 13, 2018
Illustrates why inheritance produces unexpected behavior when an entity may also service as a reference.
View EntityReferenceSpec.scala
import org.scalamock.scalatest._
import org.scalatest._
import scala.language.implicitConversions
class EntityReferenceSpec extends WordSpec with MockFactory {
"An entity" that {
"is also a reference" when {
michaelahlers / Embedded.scala
Last active May 4, 2018
Neo4j Impermanent Database with Bolt Connector
View Embedded.scala
import org.neo4j.driver.v1._
import org.neo4j.graphdb.factory.GraphDatabaseSettings
import org.neo4j.helpers.ListenSocketAddress._
import org.neo4j.kernel.configuration.BoltConnector.EncryptionLevel._
import org.neo4j.kernel.configuration.Connector.ConnectorType._
import org.neo4j.kernel.configuration.Settings.{ FALSE, TRUE }
import org.neo4j.kernel.configuration._
import org.neo4j.test._
import org.scalatest._
michaelahlers / idea.vmoptions
Last active Apr 21, 2017
Helpful IntelliJ IDEA settings for coping with egregiously-large SBT projects.
View idea.vmoptions
# See for detials.


I hereby claim:

  • I am michaelahlers on github.
  • I am michaelahlers ( on keybase.
  • I have a public key ASDxnGn9BcucjilpJv6GW8GVTmYa1Tb7dPtHwA6fsGymMwo


michaelahlers /
Last active Apr 2, 2019
Pyramid Generator Challenge!
import scalaz.PLens._
import scalaz.Lens._
import scalaz._
case class Name(given: Option[String] = None, family: Option[String] = None)
val givenL: Name @> Option[String] = lensg(a => v => a.copy(given = v), _.given)
val familyL: Name @> Option[String] = lensg(a => v => a.copy(family = v),
case class Contact(name: Option[Name] = None)
You can’t perform that action at this time.