This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
go: | |
image: giftig/go:latest | |
volumes: | |
- ${DATA_DIR}:/usr/src/db | |
go_static: | |
image: giftig/go-static:latest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scala.concurrent.{Await, ExecutionContext, Future} | |
import scala.concurrent.ExecutionContext.Implicits.global | |
import scala.concurrent.duration._ | |
import scala.util.Random | |
// Demo how to page through and group up matching rows in a source like a slick table, writing | |
// to some sink before proceeding to the next batch. Handles issues like matching entries being | |
// astride the boundary of pages or there being enough rows to group that it exceeds your standard | |
// page size | |
// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2.7 | |
import codecs | |
import sys | |
from xml.dom import minidom | |
filename = '/dev/stdin' | |
if len(sys.argv) > 1: | |
filename = sys.argv[1] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
QF_TYPE='files' | |
ACK_FLAGS='--scala --python' | |
while [[ "$1" != '' ]]; do | |
case "$1" in | |
-d|--def|--definition) | |
shift | |
QF_TYPE='def' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
import string | |
class DateParser(object): | |
"""Parse various convenient date phrases""" | |
DATE_FORMAT = '%Y-%m-%dT%H:%M:%SZ' | |
@staticmethod | |
def _parse_timedelta(n, unit): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
import optparse | |
class ColourMixin(object): | |
"""Mix this into classes to provide nice colourised text support""" | |
_default_colours = { | |
'red': '\033[31m', | |
'green': '\033[32m', | |
'yellow': '\033[33m', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
java -jar build/realmclicker-0.2.jar -i 100ms -r 25ms -p 1s -d 25s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WARNING: problems were encountered during transaction test: | |
broken dependencies | |
perl-PlRPC-0.2020-13.fc19.noarch requires perl-4:5.16.3-266.fc19.x86_64 | |
kmod-nvidia-3.11.8-200.fc19.x86_64-1:331.67-1.fc19.x86_64 requires kernel-3.11.7-200.fc19.x86_64, kernel-3.11.8-200.fc19.x86_64, kernel-3.14.23-100.fc19.x86_64 | |
Continue with the upgrade at your own risk. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scala> val hmm: Option[String] = Some("lala") | |
scala> hmm collect {{ | |
| case rawr if rawr == "lala" => rawr * 2 | |
| }: PartialFunction[String, String]} | |
res2: Option[String] = Some(lalalala) | |
scala> res2 ++ List("teehee") | |
res3: Iterable[String] = List(lalalala, teehee) | |
scala> hmm collect {{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scala> val hmm: Option[String] = Some("lala") | |
scala> hmm collect {{ | |
| case rawr if rawr == "lala" => rawr * 2 | |
| }: PartialFunction[String, String]} | |
res2: Option[String] = Some(lalalala) | |
scala> res2 ++ List("teehee") | |
res3: Iterable[String] = List(lalalala, teehee) | |
scala> hmm collect {{ |
NewerOlder