Skip to content

Instantly share code, notes, and snippets.

View tuhlmann's full-sized avatar
Having fun developing new stuff

Torsten Uhlmann tuhlmann

Having fun developing new stuff
View GitHub Profile
View gatsby-config.js
const path = require("path")
const config = require("./config/website")
const here = (...p) => path.join(__dirname, ...p)
const pathPrefix = config.pathPrefix === "/" ? "" : config.pathPrefix
path: `.env.${process.env.NODE_ENV}`,
tuhlmann / core.clj
Created October 4, 2015 18:35
Quick & Dirty conversion of exported Wordpress posts into markdown
View core.clj
(ns word-parsos.core
(:require [clojure.xml]
[ :as zip]
[ :as zip-xml]
[clj-time.core :as t]
[clj-time.format :as f]
[cuerdas.core :as str]
[clojure.pprint :as pprint]
[clj-commons-exec :as exec])

Keybase proof

I hereby claim:

  • I am tuhlmann on github.
  • I am tuhlmann ( on keybase.
  • I have a public key whose fingerprint is 6BB0 B2B1 B082 51D6 0B5D D1E3 3AE5 C98C 3996 38E5

To claim this, I am signing this object:

tuhlmann / gist:d2b82572fb9e73cfde78
Created November 24, 2014 18:55
Extending Lift's Mailer
View gist:d2b82572fb9e73cfde78
package code.lib
import javax.mail.BodyPart
import javax.mail.internet.{MimeMultipart, MimeBodyPart}
import net.liftweb.util.Mailer
object ExtendedMailer extends Mailer with ExtendedMailer
trait ExtendedMailer extends Mailer {
tuhlmann / gist:fcce99ecc21e5a686076
Created October 11, 2014 07:24
View gist:fcce99ecc21e5a686076
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
View gist:bb65690b9c6dd592d1d6
object Menus extends MyBsMenu
trait MyBsMenu extends SnippetHelper {
* Produces a menu UL from a group, for use with Bootstrap.
def group = {
val menus: NodeSeq =
for {
View APost
package code
package snippet
import scala.xml.{NodeSeq, Text}
import net.liftweb.util._
import net.liftweb.common._
import java.util.Date
import code.lib._
import Helpers._
import net.liftweb._
tuhlmann / gist:7019727
Created October 17, 2013 05:57
Using Localization without a Session
View gist:7019727
* Copyright 2006-2011 WorldWide Conferencing, LLC
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* Unless required by applicable law or agreed to in writing, software
View gist:6039092
trait DocumentForm[OwnerType <: MongoIdRecord[OwnerType] with ClientId[OwnerType]] extends ObjectIdRefListField[OwnerType, Document] {
self: ObjectIdRefListField[OwnerType, Document] =>
def uploadDoneCallback: JsCmd
override def toForm =
uniqueFieldId match {
case Full(id) => Full(elem(id))
case _ => Full(elem(nextFuncName))
tuhlmann / gist:5227734
Created March 23, 2013 13:27
An example that shows a rescheduling comet that calculates stuff in the background and then causes a reRender after its ready.
View gist:5227734
class SchedulingComet extends CometActor {
case class ContentReady(html: RenderOut)
case class Refresh()
val waitTime = 10 minutes
private var laContent = new LAFuture[ContentReady]
override def localSetup() {