Skip to content

Instantly share code, notes, and snippets.

@stevematthew
stevematthew / logging.conf
Created January 27, 2025 06:06 — forked from wrunk/logging.conf
Getting setup with proper python logging
# ---------------------------------------------------------------------------- #
# Standard setup stuff. In general you will want to alter the formatters
#
[formatters]
keys: detailed,simple
[handlers]
keys: console
[formatter_simple]
package cc.velosimple.loader.job
import org.quartz._
import org.quartz.impl.StdSchedulerFactory
import org.quartz.listeners.JobChainingJobListener
import org.quartz.JobBuilder._
import org.quartz.TriggerBuilder._
import org.quartz.CronScheduleBuilder._
import cc.velosimple.loader.Logger
#!/bin/bash
PROJECT_NAME="$1"
SCALA_VERSION="2.9.1"
SCALATEST_VERSION="1.6.1"
MOCKITO_VERSION="1.8.5"
mkdir $PROJECT_NAME
cd $PROJECT_NAME
@stevematthew
stevematthew / 3nightclubs.scala
Created July 12, 2012 03:16 — forked from oxbowlakes/3nightclubs.scala
A Tale of 3 Nightclubs
/**
* Part Zero : 10:15 Saturday Night
*
* (In which we will see how to let the type system help you handle failure)...
*
* First let's define a domain. (All the following requires scala 2.9.x and scalaz 6.0)
*/
import scalaz._
import Scalaz._
@stevematthew
stevematthew / Extractors.scala
Last active September 11, 2017 13:40 — forked from arnolddevos/examples.scala
Extractors
import Pattern._
import Family._
def pattern[B](pf: PartialFunction[Name,B]) = new Extractor(pf.lift)
val Parents = new Extractor(parents.get)
val Children = new Extractor(children.get)
"Julie" match {
case Parents(p) => "Julies parents are: " + p
@stevematthew
stevematthew / type-bounds.scala
Created September 30, 2011 15:43 — forked from retronym/type-bounds.scala
Tour of Scala Type Bounds
class A
class A2 extends A
class B
trait M[X]
//
// Upper Type Bound
//
def upperTypeBound[AA <: A](x: AA): A = x